这种情况的原因一般是编译驱动时用的内核和开发板上的内核版本不一样。参见http://blog.csdn.net/zhenxisuiyuan/article/details/5570490
但是人家说要重新编译内核,我哪甘心重新编译?明明已经编译好了一个,编译好的直接代替不就行了。。。
于是拿出当年折腾gentoo的精神。。。。
BBB的启动内核是/boot/uimage,而编译生成的内核文件是3.8.13-beaglebone-zImage.uImage是
uboot的专用内核格式,只需要将zImage转换为uImage即可-是用mkimage命令,这个可以在uboot/tool下找到
转换命令mkimage -A arm -O linux -T kernel -C none -a 0x80007fc0 -e 0x80008000 -n Angstrom/3.8.13/beaglebone -d 3.8.13-bone33.1.zImage uImage-3.8.13
然后将uImage-3.8.13放到/boot/下,将/boot目录下的相关文件修改即可。编译内核的时候还会在deploy目录下生成几个压缩文件,将其解压到相应的目录即可
mkimage 的参数可以参考未修改之前的uboot的启动时打印的信息
## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: Angstrom/3.8.13/beaglebone
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3361616 Bytes = 3.2 MiB
Load Address: 80007fc0
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
XIP Kernel Image ... OK
OK
Using Device Tree in place at 80f80000, end 80f89133
就直接停在u-boot了
Hit any key to stop autoboot: 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
mmc0(part 0) is current device
mmc_send_cmd : timeout: No status update
Card did not respond to voltage select!
No micro SD card found, setting mmcdev to 1
mmc_send_cmd : timeout: No status update
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 1
reading uEnv.txt
26 bytes read in 3 ms (7.8 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
gpio: pin 55 (gpio 55) value is 1
U-Boot#
四个User Led也只亮了前三个。