我正在尝试在Beaglebone Black上改进自定义Linux内核的启动时间。到目前为止,我已经使用了“开箱即用”#39;配置u-boot(版本2013.10),在启动过程中增加约3秒(即使删除了倒计时)。我已经发现了falcon模式,我已经设法按照提供的帮助文件中的步骤(在docs / readme.falcon中) - 我正在使用带有FAT分区和root-fs分区的SD卡。
我已按照说明将我的图像(uImage)和设备树写入FAT分区,但是当我尝试启动内核时,我得到的是以下输出,内核无法启动:
U-Boot SPL 2013.10 (Mar 30 2017 - 09:09:35)
reading args
reading uImage
reading uImage
但是,如果我正确地进入u-boot并手动启动内核,那很好:
U-Boot# mmc rescan
U-Boot# fatload mmc 0:1 ${loadaddr} uImage
reading uImage
3617728 bytes read in 340 ms (10.1 MiB/s)
U-Boot# run findfdt
U-Boot# fatload mmc 0:1 ${fdtaddr} ${fdtfile}
reading am335x-boneblack.dtb
34925 bytes read in 9 ms (3.7 MiB/s)
U-Boot# run mmcargs
U-Boot# bootm ${loadaddr} - ${fdtaddr}
## Booting kernel from Legacy Image at 80200000 ...
Image Name: Linux-3.12.10
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3617664 Bytes = 3.5 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
Loading Kernel Image ... OK
Using Device Tree in place at 80f80000, end 80f8b86c
Starting kernel ...
我唯一能看到的就是记忆'结束' 0x80f8b86c的地址与我从< spl;导出'输出的输出不同。命令:
U-Boot# spl export fdt ${loadaddr} - ${fdtaddr}
## Booting kernel from Legacy Image at 80200000 ...
Image Name: Linux-3.12.10
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3617664 Bytes = 3.5 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
Loading Kernel Image ... OK
Using Device Tree in place at 80f80000, end 80f8b86c
subcommand not supported
subcommand not supported
Using Device Tree in place at 80f80000, end 80f8e86c
Argument image is now in RAM: 0x80f80000
所以它在......#e86c'而不是' .... b86c' - 这有关系吗?或者由于其他原因导致内核无法启动?
**** ****编辑 根据Tom的要求,下面是我使用的uboot命令的完整日志。注意:我更改了设备树,因此现在结束地址与上面的不同。
U-Boot# load mmc 0:1 ${loadaddr} uImage
reading uImage
3664576 bytes read in 340 ms (10.3 MiB/s)
U-Boot# run findfdt
U-Boot# load mmc 0:1 ${fdtaddr} ${fdtfile}
reading am335x-boneblack.dtb
37124 bytes read in 8 ms (4.4 MiB/s)
U-Boot# run mmcargs
U-Boot# spl export fdt ${loadaddr} - ${fdtaddr}
## Booting kernel from Legacy Image at 80200000 ...
Image Name: Linux-3.12.10
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3664512 Bytes = 3.5 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
Loading Kernel Image ... OK
Using Device Tree in place at 80f80000, end 80f8c103
subcommand not supported
subcommand not supported
Using Device Tree in place at 80f80000, end 80f8f103
Argument image is now in RAM: 0x80f80000
U-Boot# fatwrite mmc 0:1 0x80f80000 args f103
writing args
61699 bytes written
根据我对u-boot的有限了解,我在运行时设置了bootargs'运行mmcargs' - 这会运行以下命令(同样,这些是beaglebone配置附带的标准开箱即用):
setenv bootargs console=${console} " \
${optargs} " \
"root=${mmcroot} " \
"rootfstype=${mmcrootfstype}\0" \
如果控制台是ttyO0 115200,则optargs =' 0',mmcroot =' / dev / mmcblk0p2 ro'和mmcrootfstype =' ext4 rootwait'。这些是beaglebone black的uboot配置中的标准bootargs。
跑步' printenv bootargs'在运行splexport命令之前,将返回以下内容:
bootargs=console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext2 rootwait
有谁知道我的内核无法启动的原因?
- - - - - - - - UPDATE 正如所建议的那样,我已尝试使用Uboot 2017,但我仍然得到相同的响应 - 它说“阅读uImage'但没有更多。与2013年相比,Uboot 2017与设置截然不同;设置下面后我必须导出一个uBoot.env文件(否则它会抱怨未在环境中设置falcon args文件):
setenv falcon_args_file args
setenv boot_os 1
setenv spl_load_image_fat_os uImage
setenv falcon_image_file uImage
我完全陷入困境;欢迎提出任何建议: - )