我正在玩 Raspberry 3,并尝试使用 U-Boot 启动 Linux 内核。
我构建了一个 Linux 内核(来自 github.com/raspberrypi)和 Busbox-Userland。 当“直接”启动时(这意味着没有 U-Boot),这个内核启动并工作得很好。
现在我已经构建了 U-Boot(Mainline,denx.de/u-boot.git),它似乎也可以工作。
它启动并可访问(通过 HDMI/USB 和 [添加 pi3-disable-bt-Overlay 后])。
但现在我卡住了;内核不会从 U-Boot 中启动。
我尝试了以下命令:
setenv fdtfile bcm2710-rpi-3-b.dtb
mmc dev 0
fatload mmc 0:1 ${kernel_addr_r} kernel7.img
fatload mmc 0:1 ${fdt_addr_r} ${fdtfile}
setenv bootargs earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext2 rootwait noinitrd
bootz ${kernel_addr_r} - ${fdt_addr_r}
U-Boot 的输出是:
[...]
reading kernel7.img
[...]
Kernel image @ 0x1000000 [ 0x000000 - 0x40e630 ]
## Flattened Device Tree blob at 0x000100
Booting using fdt blob at 0x000100
Using Device Tree in place at 0000100, end 00006b1a
Starting kernel...
然后显示器变黑并显示“无信号”,串行控制台也不再显示任何信息。
我试过提供给内核的 bootargs,但我没有找到工作方案。
有人有想法吗?
正如我所说,U-Boot 和内核似乎都可以工作,但 U-Boot 无法启动内核...
谢谢, 范达伦
最佳答案
我知道这是一个非常古老的问题,但对我来说,不手动加载设备树文件并在 bootz 中使用 ${fdt_addr} 而不是 ${fdt_addr_r} 会有所帮助。 所以……
mmc dev 0
fatload mmc 0:1 ${kernel_addr_r} kernel7.img
setenv bootargs earlyprintk console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext2 rootwait noinitrd
bootz ${kernel_addr_r} - ${fdt_addr}
...应该可以。
关于linux-kernel - 覆盆子 3 : booting a Kernel by using U-Boot,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40510479/