U-Boot SPL 2019.01-g1ebdbc7-dirty (May 29 2020 – 23:25:29 +0800)
Trying to boot from MMC1
Loading Environment from FAT… *** Warning – bad CRC, using default environment
Loading Environment from MMC… Card did not respond to voltage select!
*** Warning – No block device, using default environment
U-Boot 2019.01-g1ebdbc7-dirty (May 29 2020 – 23:25:29 +0800)
CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0
Loading Environment from FAT… *** Warning – bad CRC, using default environment
Loading Environment from MMC… MMC Device 1 not found
*** Warning – No MMC card found, using default environment
<ethaddr> not set. Validating first E-fuse MAC
Net: Could not get PHY for ethernet@4a100000: addr 0
eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is de:ad:be:ef:00:01
Address in environment is 4c:3f:d3:cb:f2:55
, eth1: usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unable to read file boot.scr **
194 bytes read in 3 ms (62.5 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc0 …
Running uenvcmd …
Wrong Image Format for bootm command
ERROR: can't get kernel image!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1…
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
4264448 bytes read in 363 ms (11.2 MiB/s)
** File not found /boot/am335x-icev2-prueth.dtb **
Starting kernel …
U-Boot SPL 2019.01-g1ebdbc7-dirty (Jun 01 2020 – 22:59:04 +0800)
Trying to boot from MMC1
Loading Environment from FAT… *** Warning – bad CRC, using default environment
Loading Environment from MMC… Card did not respond to voltage select!
*** Warning – No block device, using default environment
U-Boot 2019.01-g1ebdbc7-dirty (Jun 01 2020 – 22:59:04 +0800)
CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0
Loading Environment from FAT… *** Warning – bad CRC, using default environment
Loading Environment from MMC… MMC Device 1 not found
*** Warning – No MMC card found, using default environment
<ethaddr> not set. Validating first E-fuse MAC
Net: Could not get PHY for ethernet@4a100000: addr 0
eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is de:ad:be:ef:00:01
Address in environment is 4c:3f:d3:cb:f2:55
, eth1: usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unable to read file boot.scr **
194 bytes read in 3 ms (62.5 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc0 …
Running uenvcmd …
Wrong Image Format for bootm command
ERROR: can't get kernel image!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1…
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
4264448 bytes read in 363 ms (11.2 MiB/s)
** File not found /boot/am335x-icev2-prueth.dtb **
Starting kernel …
Nancy Wang:
user6350786
** File not found /boot/am335x-icev2-prueth.dtb **
看错误提示找不到设备树。没有拷贝设备树?
you will need to copy the MLO and u-boot.img files to the boot partition. At this point, the card is now bootable in the SD card slot. We default to using /boot/zImage on the rootfs partition and the device tree file loaded from /boot with the same name as in the kernel.
请问是从SD卡启动吗?
Shine:
BBB的设备树是am335x-boneblack.dtb。请看一下uboot环境变量里的fdtfile是怎么设置?
Nancy Wang:
printenv打印信息也贴出来看一下。
user6350786:
回复 Nancy Wang:
=> printenvarch=armargs_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}baudrate=115200board=am335xboot_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 ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fiboot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}boot_fdt=tryboot_fit=0boot_net_usb_start=usb startboot_prefixes=/ /boot/boot_script_dhcp=boot.scr.uimgboot_scripts=boot.scr.uimg boot.scrboot_syslinux_conf=extlinux/extlinux.confboot_targets=mmc0 legacy_mmc0 mmc1 legacy_mmc1 nand0 pxe dhcp bootargs=$board_name = A335BNLTbootcmd=run distro_bootcmdbootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -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;setenv efi_old_vci;bootcmd_legacy_mmc0=setenv mmcdev 0; setenv bootpart 0:2 ; run mmcbootbootcmd_legacy_mmc1=setenv mmcdev 1; setenv bootpart 1:2 ; run mmcbootbootcmd_mmc0=setenv devnum 0; run mmc_bootbootcmd_mmc1=setenv devnum 1; run mmc_bootbootcmd_nand=run nandbootbootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fibootcount=1bootdelay=2bootdir=/bootbootenvfile=uEnv.txtbootfile=uImagebootm_size=0x10000000bootpart=0:2bootscript=echo Running bootscript from mmc${mmcdev} …; source ${loadaddr}console=ttyO0,115200n8cpu=armv7dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x200;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1500 0x200;spl-os-image.raw raw 0x1700 0x6900;spl-os-args fat 1 1;spl-os-image fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x200;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1500 0x200;spl-os-image.raw raw 0x1700 0x6900;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; doneefi_dtb_prefixes=/ /dtb/ /dtb/current/envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd …;run uenvcmd;fi;fi;fi;eth1addr=4c:3f:d3:cb:f2:55ethaddr=4c:3f:d3:cb:f2:53fdt_addr_r=0x88000000fdtaddr=0x88000000fdtcontroladdr=9df49f78fdtfile=/dtbs/am335x-boneblack.dtbfindfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi; if test $board_name = A335PBGL; then setenv fdtfile am335x-pocketbeagle.dtb; fi; if test $board_name = BBBW; then setenv fdtfile am335x-boneblack-wireless.dtb; fi; if test $board_name = BBG1; then setenv fdtfile am335x-bonegreen.dtb; fi; if test $board_name = BBGW; then setenv fdtfile am335x-bonegreen-wireless.dtb; fi; if test $board_name = BBBL; then setenv fdtfile am335x-boneblue.dtb; fi; if test $board_name = BBEN; then setenv fdtfile am335x-sancloud-bbe.dtb; fi; if test $board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $board_name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi; if test $board_name = A335_ICE && test $ice_mii = rmii; then setenv fdtfile am335x-icev2.dtb; fi; if test $board_name = A335_ICE && test $ice_mii = mii; then setenv fdtfile am335x-icev2-pru.dtb; fi; if test $fdtfile = undefined; then echo WARNING: Could not determine device tree to use; fi; finduuid=part uuid mmc ${bootpart} uuidfit_bootfile=fitImagefit_loadaddr=0x90000000get_overlaystring=for overlay in $overlay_files;do;setenv overlaystring ${overlaystring}'#'${overlay};done;ice_mii=miiimportbootenv=echo Importing environment from mmc${mmcdev} …; env import -t ${loadaddr} ${filesize}init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;else setenv console ttyO0,115200n8;fi;kernel_addr_r=0x82000000load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}loadaddr=0x82000000loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scrloadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}loadfit=run args_mmc; run run_fit;loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gzmmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fimmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then if test ${boot_fit} -eq 1; then run loadfit; else run mmcloados;fi;fi;fi;mmcdev=0mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} – ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;mmcrootfstype=ext4 rootwaitnetargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcpnetboot=echo Booting from network …; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} – ${fdtaddr}netloadfdt=tftp ${fdtaddr} ${fdtfile}netloadimage=tftp ${loadaddr} ${bootfile}nfsopts=nolockpartitions=uuid_disk=${uuid_gpt_disk};name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}pxefile_addr_r=0x80100000ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}ramboot=echo Booting from ramdisk …; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}ramdisk_addr_r=0x88080000ramroot=/dev/ram0 rwramrootfstype=ext2rdaddr=0x88080000rootpath=/export/rootfsrun_fit=bootm ${fit_loadaddr}#${fdtfile}${overlaystring}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; donescan_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_fdtfilescan_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…; fiscan_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; donescriptaddr=0x80000000serial#=4c:3f:d3:cb:f2:53soc=am33xxspiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}spiboot=echo Booting from spi …; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}spibusno=0spiimgsize=0x362000spiroot=/dev/mtdblock4 rwspirootfstype=jffs2spisrcaddr=0xe0000static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::offstderr=serial@44e09000stdin=serial@44e09000stdout=serial@44e09000update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fiusbnet_devaddr=de:ad:be:ef:00:01vendor=tiver=U-Boot 2019.01-g1ebdbc7-dirty (Jun 03 2020 – 23:16:11 +0800)
Environment size: 9225/131067 bytes=>
通过修改fdtfile 后可以正确读取am335x-boneblack.dtb和uimage了,但好像还是没有从SD卡上引导内核,应该是启动参数有问题,不知道在哪里修改这个参数,是在configs/am335x_evm.h 这个文件里修改嘛
U-Boot SPL 2019.01-g1ebdbc7-dirty (Jun 03 2020 – 23:16:11 +0800)Trying to boot from MMC1Loading Environment from FAT… *** Warning – bad CRC, using default environment
Loading Environment from MMC… Card did not respond to voltage select!*** Warning – No block device, using default environment
U-Boot 2019.01-g1ebdbc7-dirty (Jun 03 2020 – 23:16:11 +0800)
CPU : AM335X-GP rev 2.1Model: TI AM335x BeagleBone BlackDRAM: 512 MiBMMC: OMAP SD/MMC: 0Loading Environment from FAT… *** Warning – bad CRC, using default environment
Loading Environment from MMC… MMC Device 1 not found*** Warning – No MMC card found, using default environment
<ethaddr> not set. Validating first E-fuse MACNet: Could not get PHY for ethernet@4a100000: addr 0eth0: ethernet@4a100000Warning: usb_ether MAC addresses don't match:Address in ROM is de:ad:be:ef:00:01Address in environment is 4c:3f:d3:cb:f2:55, eth1: usb_etherPress SPACE to abort autoboot in 2 secondsswitch to partitions #0, OKmmc0 is current deviceScanning mmc 0:1…switch to partitions #0, OKmmc0 is current deviceSD/MMC found on device 04244032 bytes read in 362 ms (11.2 MiB/s)48948 bytes read in 7 ms (6.7 MiB/s)MMC Device 1 not foundno mmc device at slot 1MMC Device 1 not foundno mmc device at slot 1SD/MMC found on device 1## Error: "bootcmd_nand0" not definedstarting USB…USB0: Port not available.using musb-hdrc, OUT ep1out IN ep1in STATUS ep2inMAC de:ad:be:ef:00:01HOST MAC de:ad:be:ef:00:00RNDIS readyThe remote end did not respond in time.missing environment variable: pxeuuidRetrieving file: pxelinux.cfg/01-4c-3f-d3-cb-f2-53
user6350786:
回复 Shine:
通过修改fdtfile 后可以正确读取am335x-boneblack.dtb和uimage了,但好像还是没有从SD卡上引导内核,应该是启动参数有问题,不知道在哪里修改这个参数,是在configs/am335x_evm.h 这个文件里修改嘛
U-Boot SPL 2019.01-g1ebdbc7-dirty (Jun 03 2020 – 23:16:11 +0800)
Trying to boot from MMC1
Loading Environment from FAT… *** Warning – bad CRC, using default environment
Loading Environment from MMC… Card did not respond to voltage select!
*** Warning – No block device, using default environment
U-Boot 2019.01-g1ebdbc7-dirty (Jun 03 2020 – 23:16:11 +0800)
CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0
Loading Environment from FAT… *** Warning – bad CRC, using default environment
Loading Environment from MMC… MMC Device 1 not found
*** Warning – No MMC card found, using default environment
<ethaddr> not set. Validating first E-fuse MAC
Net: Could not get PHY for ethernet@4a100000: addr 0
eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is de:ad:be:ef:00:01
Address in environment is 4c:3f:d3:cb:f2:55
, eth1: usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1…
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
4244032 bytes read in 362 ms (11.2 MiB/s)
48948 bytes read in 7 ms (6.7 MiB/s)
MMC Device 1 not found
no mmc device at slot 1
MMC Device 1 not found
no mmc device at slot 1
SD/MMC found on device 1
## Error: "bootcmd_nand0" not defined
starting USB…
USB0: Port not available.
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-4c-3f-d3-cb-f2-53
Shine:
回复 user6350786:
请问您用的是BBB板子吗?有没有按S2键从SD卡启动?可以先用Prebuild里的文件看整个启动流程有没有问题。另外,请参考下面的帖子看是否有帮助。
e2e.ti.com/…/874943