经验总结:vkboard一个板子启动不了内核,可以换其他板子,可能能成功启动安卓
//我在调试时发现如果mmc(flash)工作不正常,系统启动不起来
(可能是因为uboot给内核传过来的参数跟文件系统存放路径不一样:比如uboot会传mmcblk0p1而sd卡会被内核认为是mmcblk1p1)
以前面试时遇到的一个问题:如果你的板子没有任何反应,你会怎么做
分析启动流程:一个板子可能有几个启动方式(usb ,sd卡,flash),先看启动方式选择引脚的电平,是否已配置为相应的启动方式
一:可以挂在 uboot传参数有问题?uboot传参数如下
[ 3.711700] No soundcardsfound.
[ 3.716339]EXT4-fs (mmcblk0p2): mounting ext3 file system using the ext4subsystem
[ 3.740112]EXT4-fs (mmcblk0p2): recovery complete
[ 3.745361]EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode.Opts: (null)
[ 3.754272]VFS: Mounted root (ext3 filesystem) on device 179:2.
[ 3.761047]Freeing init memory: 352K
[ 3.774993]Kernel panic - not syncing: No init found. Trypassing init= option to kernel. See Linux Documentation/init.txtfor guidance.
[ 3.788574]CPU1: stopping
[ 3.791534]Backtrace:
[ 3.794311][] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c)
[ 3.803527] r6:c095f538 r5:c0988d40 r4:d786a000r3:c09c4e50
[ 3.809967][] (dump_stack+0x0/0x1c) from [] (handle_IPI+0x190/0x1c4)
[ 3.818878][] (handle_IPI+0x0/0x1c4) from [] (gic_handle_irq+0x5c/0x64)
[ 3.828094][] (gic_handle_irq+0x0/0x64) from [] (__irq_svc+0x40/0x70)
[ 3.837127]Exception stack(0xd786be88 to 0xd786bed0)
[ 3.842651]be80: d786bed0 00000000 e176b772 00000000 c1391498 d786bed0
[ 3.851593]bea0: e0a7081b 00000000 00000000 c09983fc 00000000 d786bf0c3b9aca00 d786bed0
//raccon uboot传参数,查看uboot的参数
bootdelay=3
baudrate=115200
ipaddr=128.247.77.90
serverip=128.247.77.158
netmask=255.255.254.0
bootfile="uImage"
sdbootcmd=mmcinit; fatload mmc 0 0x81c00000 uImage; bootm0x81c00000
sdbootargs=root=/dev/mmcblk1p2 rw rootdelay=2 init=/initSD_BOOT
stdin=serial
stdout=serial
stderr=serial
emmcbootargs=console=ttyO2,115200n8 mem=456M@0x80000000 mem=512M@0xA0000000 init=/initvram=32M omapfb.vram=0:16M androidboot.console=ttyO2
bootargs=root=/dev/mmcblk1p2 rw rootdelay=2 init=/initSD_BOOT
emmcbootcmd=booti mmc0
bootcmd=mmcinit; fatload mmc 0 0x81c00000 uImage; bootm0x81c00000
ethact=KS8851SNL
//在uboot界面输入可以进入安卓系统,可以解决“一”的问题
setenv bootargs "root=/dev/mmcblk0p2 rw rootdelay=2 init=/initSD_BOOT"
setenv bootcmd "mmcinit; fatload mmc 0 0x81c00000 uImage; bootm0x81c00000"
但是android系统没有成功启动,修改linux/arch/arm/mach-omap2/board-*panda.c //修改对应于hdmi的引脚定义
//raccon 正常挂载
[ 5.106414]omapfb omapfb: failed to apply dispc config
[ 5.115417]twl_rtc twl_rtc: setting system clock to 2000-01-01 00:00:01 UTC(946684801)
[ 5.124328]ALSA device list:
[ 5.127593] #0: tablet
[ 5.130462] #1: OMAPHDMI
[ 5.133636]Waiting 2sec before mounting root device...
[ 7.148742]EXT2-fs (mmcblk1p2): warning: mounting ext3 filesystem asext2
[ 7.156677]EXT2-fs (mmcblk1p2): warning: mounting unchecked fs, running e2fsckis recommended
[ 7.170104]VFS: Mounted root (ext2 filesystem) on device 179:26.
[ 7.177001]Freeing init memory: 352K
[ 7.203704]init (1): /proc/1/oom_adj is deprecated, please use/proc/1/oom_score_adj instead.
[ 7.297943]init: could not open /dev/keychord
[ 7.669006]rproc remoteproc0: skipping power up until last virtio deviceipu_c0
[ 7.677398]virtio_rpmsg_bus virtio0: rpmsg host is online
[ 7.683471]rproc remoteproc0: registered virtio0 (type 7)
[ 7.689727]rproc remoteproc0: powering up ipu_c0
[ 7.759552]rproc remoteproc0: Booting fw image ducati-m3-core0.xem3, size6806939
[ 8.026428]omap-iommu omap-iommu.1: ipu: version 2.1
[ 8.036895]rproc remoteproc0: remote processor ipu_c0 is now up
[ 8.044616]virtio_rpmsg_bus virtio1: rpmsg host is online
[ 8.050598]rproc remoteproc0: registered virtio1 (type 7)
[ 8.059478]omap-rproc omap-rproc.1: received echo reply from ipu_c0
[ 8.066589]virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr0x32
方案一:改uboot参数
方案二:编译jorjin uboot
先将编译出来的u-boot在raccon上做实验:DRAM: 检测失败
U-Boot 1.1.4 (Aug 27 2014 - 09:53:05)
Load address: 0x80e80000
DRAM: 0 kB
Flash: 0 kB
Using default environment
In: serial
Out: serial
Err: serial
Initializing SD(0) Slot.
ptbl slot: SD:(0).
efi partition table not found
efi partition table:
ptbl slot: EMMC:(1).
efi partition table not found
I2C read: I/O error
Net: KS8851SNL
Hit any key to stop autoboot: 0
Usage:
MMC sub system
mmc read: Invalid size
4917328 bytes read
## Booting image at 81c00000 ...
ImageName: Linux-3.4.48
ImageType: ARM Linux Kernel Image(uncompressed)
DataSize: 4917264Bytes = 4.7 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ...OK
OK