Raspberry Pi 4 U-Boot在启动时挂在启动内核中

信息流

我正在一个项目中,我想使用U-Boot创建自己的嵌入式Linux。因此,我正在使用buildroot,最近我开始学习。成功创建我自己的rasberrypi4_defconfig后,我目前正在努力解决该问题,以使u-boot正常工作。

我正在使用什么版本:

  1. Rpi 4
  2. buildroot-2019.11
  3. u-boot(因此,我每天都会进行新更改)

工作现状:

我建立在Ubuntu(32位)上。我配置的buildroot与raspberrypi4_defconfig并使其无需改动。然后,我为rpi_4_32b_defconfig创建一个u-boot defconfig并使用创建一个u-boot.bin。make CROSS_COMPILE=arm-linux-gnueabihf- u-boot.bin现在,我的下一步是配置config.txt并与以下内容交换内容:

enable_uart=1
kernel=u-boot.bin

另外,我将u-boot.bin复制到了SD卡中。

我实际上所做的最后一步是使用以下内容构建自己的boot.scr.uimg

mmc dev 0
fatload mmc O:1 ${fdt_addr_r} bcm2711-rpi-4-b.dtb
fatload mmc 0:1 ${kernel_addr_r} zImage
setenv bootargs console=ttyS0,115200 \
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw
bootz ${kernel_addr_r} - ${fdt_addr_r}

问题到目前为止,我一直在归档以进入U-boot菜单,但是在启动时,我被卡在了启动内核中,我实际上认为我的boot.scr.uimg可能不正确,但没有得到。

环境

arch=arm
baudrate=115200
board=rpi
board_name=4 Model B
board_rev=0x11
board_rev_scheme=1
board_revision=0xC03111
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devty
pe} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${f
dt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 mmc1 pxe dhcp
bootargs=console=ttyS0,115200 \
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw
bootcmd=run distro_bootcmd
bootcmd_dhcp=if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${f
dtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_
arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot $
{fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r
} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;s
etenv efi_old_vci;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_pxe=dhcp; if pxe get; then pxe boot; fi
bootdelay=2
bootfstype=fat
cpu=armv7
dhcpuboot=usb start; dhcp u-boot.uimg; bootm
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
ethaddr=dc:a6:32:45:1f:d1
fdt_addr=2eff5d00
fdt_addr_r=0x02600000
fdt_high=ffffffff
fdtcontroladdr=3af6ac98
fdtfile=bcm2711-rpi-4-b.dtb
fileaddr=2600000
filesize=9e6f
initrd_high=ffffffff
kernel_addr_r=0x00080000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x00200000
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
pxefile_addr_r=0x02500000
ramdisk_addr_r=0x02700000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x02400000
serial#=10000000f58b842c
soc=bcm283x
stderr=serial,vidconsole
stdin=serial,usbkbd
stdout=serial,vidconsole
usbethaddr=dc:a6:32:45:1f:d1
vendor=raspberrypi

Environment size: 3996/16380 bytes

启动日志

U-Boot 2020.01-rc4-00066-g7e5ee346fc (Dec 05 2019 - 16:55:27 +0100)

DRAM:  948 MiB
RPI 4 Model B (0xc03111)
MMC:   emmc2@7e340000: 0, mmcnr@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr.uimg
297 bytes read in 18 ms (15.6 KiB/s)
## Executing script at 02400000
switch to partitions #0, OK
mmc0 is current device
40559 bytes read in 29 ms (1.3 MiB/s)
5601344 bytes read in 1084 ms (4.9 MiB/s)
Kernel image @ 0x080000 [ 0x000000 - 0x557840 ]
## Flattened Device Tree blob at 02600000
   Booting using the fdt blob at 0x2600000
   Using Device Tree in place at 02600000, end 0260ce6e

Starting kernel ...
弗兰克·霍夫利希
  1. 尝试使用不带任何行继续符()的bootargs,以确保您不会混淆U-Boot。
  2. 这可能是initrd内容的问题(是否包括所有正确的驱动程序?是否正确构建?已加载到内存?)。
  3. 请参阅https://stackoverflow.com/a/58832898/7158800中的注释,重新选择.dts / .dtb文件中选定行。确定要指定的控制台设备后,请确保.dtb与U-Boot bootargs匹配。
  4. 如果您有JTAG调试器,请确保您甚至在Linux中都可以进入start_kernel()。在使用grub包装器之前,我已经挂断了电话,所以您认为您正在将控制权转移到Linux,但是实际上您正在跳入深空空间,或者至少是一些尚不准备就绪的代码。如果您看不到任何早期声明(例如,在物理CPU 0x0上引导Linux),确保完全使用Linux

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

重启后Raspberry Pi 4无法启动

来自分类Dev

在Raspberry Pi上启动时启动Node App

来自分类Dev

在 Raspberry pi 上启动时启动 python 脚本的困难

来自分类Dev

有时在Raspbian Buster,Raspberry Pi 4中重新启动时有时未加载蓝牙模块

来自分类Dev

无法在Raspberry Pi启动时执行python脚本

来自分类Dev

在启动时为Raspberry PI运行OpenVINO Python脚本

来自分类Dev

Raspberry Pi脚本启动顺序

来自分类Dev

从NFS共享启动Raspberry Pi

来自分类Dev

在Raspberry Pi上启动时自动启动Deluge守护程序1.3.10

来自分类Dev

如何在Debian无头服务器(Raspberry Pi)上启动时启动服务?

来自分类Dev

在Raspberry Pi上启动时自动启动Deluge守护程序1.3.10

来自分类Dev

Neo4j无法在Raspberry Pi上启动(内存问题和java.lang.NoClassDefFoundError)

来自分类Dev

Raspberry Pi 4 Microk8s 集群没有启动容器?

来自分类Dev

升级后停止从 SSD 在 raspberry pi 4 上启动 ubuntu 20.04

来自分类Dev

外部USB 3.0硬盘在关闭或重新启动Raspberry Pi 4B时旋转并关闭电源

来自分类Dev

Raspberry Pi上的Sqlite4java

来自分类Dev

在Raspberry Pi 4上安装Steam

来自分类Dev

Raspberry Pi上的Sqlite4java

来自分类Dev

Raspberry Pi上的4TB硬盘

来自分类Dev

在启动时挂载 USB 会导致 Pi4 启动时出错

来自分类Dev

启动时的Shell脚本无法在Raspberry pi上执行

来自分类Dev

运行命令以在Raspberry Pi上的启动时挂载CIFS卷

来自分类Dev

如何每周重新启动Raspberry PI

来自分类Dev

在sudo关闭后启动Raspberry Pi吗?

来自分类Dev

Raspberry Pi在启动后运行脚本

来自分类Dev

Raspberry Pi-启动Tkinter脚本问题

来自分类Dev

在Raspberry Pi中安装QtQml

来自分类Dev

在带有 DAS U-Boot 的 Raspberry Pi 计算模块上使用 GPIO-Poweroff 关闭 PSU

来自分类Dev

在Pyglet(Raspberry Pi 4B,Raspbian)中播放音频时听不到声音

Related 相关文章

  1. 1

    重启后Raspberry Pi 4无法启动

  2. 2

    在Raspberry Pi上启动时启动Node App

  3. 3

    在 Raspberry pi 上启动时启动 python 脚本的困难

  4. 4

    有时在Raspbian Buster,Raspberry Pi 4中重新启动时有时未加载蓝牙模块

  5. 5

    无法在Raspberry Pi启动时执行python脚本

  6. 6

    在启动时为Raspberry PI运行OpenVINO Python脚本

  7. 7

    Raspberry Pi脚本启动顺序

  8. 8

    从NFS共享启动Raspberry Pi

  9. 9

    在Raspberry Pi上启动时自动启动Deluge守护程序1.3.10

  10. 10

    如何在Debian无头服务器(Raspberry Pi)上启动时启动服务?

  11. 11

    在Raspberry Pi上启动时自动启动Deluge守护程序1.3.10

  12. 12

    Neo4j无法在Raspberry Pi上启动(内存问题和java.lang.NoClassDefFoundError)

  13. 13

    Raspberry Pi 4 Microk8s 集群没有启动容器?

  14. 14

    升级后停止从 SSD 在 raspberry pi 4 上启动 ubuntu 20.04

  15. 15

    外部USB 3.0硬盘在关闭或重新启动Raspberry Pi 4B时旋转并关闭电源

  16. 16

    Raspberry Pi上的Sqlite4java

  17. 17

    在Raspberry Pi 4上安装Steam

  18. 18

    Raspberry Pi上的Sqlite4java

  19. 19

    Raspberry Pi上的4TB硬盘

  20. 20

    在启动时挂载 USB 会导致 Pi4 启动时出错

  21. 21

    启动时的Shell脚本无法在Raspberry pi上执行

  22. 22

    运行命令以在Raspberry Pi上的启动时挂载CIFS卷

  23. 23

    如何每周重新启动Raspberry PI

  24. 24

    在sudo关闭后启动Raspberry Pi吗?

  25. 25

    Raspberry Pi在启动后运行脚本

  26. 26

    Raspberry Pi-启动Tkinter脚本问题

  27. 27

    在Raspberry Pi中安装QtQml

  28. 28

    在带有 DAS U-Boot 的 Raspberry Pi 计算模块上使用 GPIO-Poweroff 关闭 PSU

  29. 29

    在Pyglet(Raspberry Pi 4B,Raspbian)中播放音频时听不到声音

热门标签

归档