我的Linux内核镜像uImage
在我的U盘中。我想从U-Boot引导它。同时,设备树文件am335x-evm.dtb
也在我的U盘中。
我的操作如下:
U-Boot# usb start
(Re)start USB...
USB0: scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
U-Boot# fatls usb 0:1
3821960 uimage
kit3/
4065280 modules.tar
my_modules/
extra/
system volume information/
375 uenv.txt
40474 am335x-evm.dtb
4 file(s), 4 dir(s)
U-Boot# fatload usb 0:1 0xC0700000 uImage
reading uImage
3821960 bytes read in 2375 ms (1.5 MiB/s)
U-Boot# fatload usb 0:1 0xC0e00000 am335x-evm.dtb
reading am335x-evm.dtb
40474 bytes read in 48 ms (823.2 KiB/s)
U-Boot# bootm 0xC0700000 - 0xC0e00000
## Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-3.12.10-ge35dc10-dirty
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3821896 Bytes = 3.6 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at c0e00000
Booting using the fdt blob at 0xc0e00000
Loading Kernel Image ... OK
OK
Using Device Tree in place at c0e00000, end c0e0ce19
Starting kernel ...
非常感谢在这篇帖子中回答我的每个人!现在我可以通过使用U盘中的映像启动系统。我所做的是:
到此为止。怎么办?谢谢!
setenv bootargs "console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 mem=512M coherent_pool=8M loglevel=0 lpj=3317760 rootwait"
usb start; fatls usb 0:1; fatload usb 0:1 0x82000000 uImage-orig-onUSB;fatload usb 0:1 0x80F80000 am335x-evm.dtb;bootm 0x82000000 - 0x80F80000
没有第一句话,系统仍然可以启动并启动GUI程序,显示在屏幕上。但是调试串口将不再有反应!
至于第二句话,如果我使用RAM地址0xC0700000和0xC0e00000,像下面这样,那么它将停止加载内核。原因应该是sawdust在他的答案中提到的。@sawdust
setenv bootargs "console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 mem=512M coherent_pool=8M loglevel=0 lpj=3317760 rootwait"
usb start; fatls usb 0:1; fatload usb 0:1 0xC0700000 uImage-orig-onUSB;fatload usb 0:1 0xC0e00000 am335x-evm.dtb;bootm 0xC0700000 - 0xC0e00000
EARLY_PRINTK
(以及相应的UART选项)。同样通过bootargs
变量传递earlyprintk
到cmdline。这样,您就可以看到出了什么问题。还要检查bootargs
中的console
参数(以及内核中的CMDLINE
选项):可能只是使用了错误的/dev/tty...
文件。 - Sam Protsenko