到底该怎么解决呢
user4132396:
两个板子是从同一个sd卡上启动的,一个可以,一个不可以,什么原因呢
Nancy Wang:
由于之前的帖子您没有给出反馈,我们需要一些时间继续跟进您的帖子。
Nancy Wang:
你可以尝试一下在<Processor SDK>/board-support/u-boot-<version>/include/configs/am335x_evm.h的最开始添加#define DEBUG ,然后执行saveev命令并且把log文件贴出来看一下。
user4132396:
回复 Nancy Wang:
=> saveenv
Saving Environment to FAT… EXPORTtable = 9ffd0aec, htab.size = 521, htab.filled = 116, size = 131068
Unsorted: n=1160: 9df3b7b4 ==> ramargs=> setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}1: 9df3b7f0 ==> bootdir=> /boot2: 9df3b804 ==> ramrootfstype => ext23: 9df3b82c ==> boot_prefixes => / /boot/4: 9df3b840 ==> 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_fdtfile5: 9df3b854 ==> bootm_size => 0x100000006: 9df3b868 ==> nandboot=> echo Booting from nand …; run nandargs; nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} – ${fdtaddr}7: 9df3b890 ==> boot_scripts => boot.scr.uimg boot.scr8: 9df3b958 ==> boot_fit=> 09: 9df3b9f8 ==> loadbootscript => load mmc ${mmcdev} ${loadaddr} boot.scr10: 9df3ba20 ==> ver=> U-Boot 2019.01-g7a49b7b85e-dirty (Aug 08 2019 – 16:45:51 +0800)11: 9df3ba48 ==> findfdt=> 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-prueth.dtb; fi; if test $fdtfile = undefined; then echo12: 9df3ba98 ==> loadramdisk => load mmc ${mmcdev} ${rdaddr} ramdisk.gz13: 9df3bb4c ==> netloadimage => tftp ${loadaddr} ${bootfile}14: 9df3bc14 ==> arch=> arm15: 9df3bc28 ==> run_fit=> bootm ${fit_loadaddr}#${fdtfile}${overlaystring}16: 9df3bcc8 ==> boot_syslinux_conf => extlinux/extlinux.conf17: 9df3bd18 ==> mmcdev=> 018: 9df3be44 ==> fdtcontroladdr => 9df298d819: 9df3be80 ==> serial#=> FCNO.000000120: 9df3bed0 ==> board_name => AM3352FC21: 9df3bee4 ==> pxefile_addr_r => 0x8010000022: 9df3bf5c ==> bootcmd_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;23: 9df3bf70 ==> bootcmd_legacy_mmc0 => setenv mmcdev 0; setenv bootpart 0:2 ; run mmcboot24: 9df3bfd4 ==> eth1addr=> 4c:3f:d3:3b:38:cd25: 9df3c038 ==> ramroot=> /dev/ram0 rw26: 9df3c04c ==> importbootenv => echo Importing environment from mmc${mmcdev} …; env import -t ${loadaddr} ${filesize}27: 9df3c074 ==> scriptaddr => 0x8000000028: 9df3c088 ==> 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;29: 9df3c100 ==> boot_a_script => load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}30: 9df3c114 ==> dfu_alt_info_ram => kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x400000031: 9df3c18c ==> ethaddr=> 4c:3f:d3:3b:38:cb32: 9df3c1dc ==> fdt_addr_r => 0x8800000033: 9df3c290 ==> finduuid=> part uuid mmc ${bootpart} uuid34: 9df3c358 ==> bootscript => echo Running bootscript from mmc${mmcdev} …; source ${loadaddr}35: 9df3c380 ==> boot_fdt=> try36: 9df3c394 ==> nandargs=> setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}37: 9df3c3f8 ==> baudrate=> 11520038: 9df3c45c ==> boot_extlinux => sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}39: 9df3c59c ==> nandrootfstype => ubifs rootwait=140: 9df3c6c8 ==> dfu_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 141: 9df3c718 ==> usb_boot=> usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi42: 9df3c790 ==> bootcmd_mmc1 => setenv devnum 1; run mmc_boot43: 9df3c81c ==> bootcmd=> if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd44: 9df3c880 ==> kernel_addr_r => 0x8200000045: 9df3c8d0 ==> ramboot=> echo Booting from ramdisk …; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}46: 9df3ca24 ==> mmcrootfstype => ext4 rootwait47: 9df3cad8 ==> get_overlaystring => for overlay in $overlay_files;do;setenv overlaystring ${overlaystring}'#'${overlay};done;48: 9df3cb00 ==> fit_loadaddr => 0x9000000049: 9df3cb3c ==> bootfile=> zImage50: 9df3cb64 ==> netloadfdt => tftp ${fdtaddr} ${fdtfile}51: 9df3cb8c ==> mtdids=> nand0=nand.052: 9df3cbc8 ==> board=> am335x53: 9df3cbf0 ==> spiargs=> setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}54: 9df3cc18 ==> stderr=> serial@44e0900055: 9df3cc2c ==> bootenvfile => uEnv.txt56: 9df3cc40 ==> spirootfstype => jffs257: 9df3cc54 ==> distro_bootcmd => for target in ${boot_targets}; do run bootcmd_${target}; done58: 9df3cd1c ==> fdtfile=> undefined59: 9df3ce48 ==> netargs=> setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp60: 9df3cefc ==> loadaddr=> 0x8200000061: 9df3cf24 ==> 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};fi62: 9df3cf4c ==> usbnet_devaddr => de:ad:be:ef:00:0163: 9df3cfb0 ==> bootcmd_legacy_mmc1 => setenv mmcdev 1; setenv bootpart 1:2 ; run mmcboot64: 9df3d064 ==> rdaddr=> 0x8808000065: 9df3d078 ==> bootdelay=> 266: 9df3d08c ==> dfu_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 167: 9df3d12c ==> spiimgsize => 0x36200068: 9df3d154 ==> rootpath=> /export/rootfs69: 9df3d1a4 ==> loadimage=> load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}70: 9df3d1b8 ==> nandroot=> ubi0:rootfs rw ubi.mtd=NAND.file-system,204871: 9df3d21c ==> fdtaddr=> 0x8800000072: 9df3d244 ==> mtdparts=> mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)73: 9df3d2d0 ==> nfsopts=> nolock74: 9df3d2f8 ==> mmc_boot=> if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi75: 9df3d3fc ==> stdin=> serial@44e0900076: 9df3d410 ==> cpu=> armv777: 9df3d424 ==> partitions => uuid_disk=${uuid_gpt_disk};name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}78: 9df3d438 ==> init_console => if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;else setenv console ttyO0,115200n8;fi;79: 9df3d474 ==> spiroot=> /dev/mtdblock4 rw80: 9df3d488 ==> stdout=> serial@44e0900081: 9df3d49c ==> vendor=> ti82: 9df3d4d8 ==> efi_dtb_prefixes => / /dtb/ /dtb/current/83: 9df3d53c ==> loadfdt=> load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}84: 9df3d578 ==> board_serial => FCNO.000000185: 9df3d5a0 ==> ramdisk_addr_r => 0x8808000086: 9df3d5f0 ==> boot_targets => mmc0 legacy_mmc0 mmc1 legacy_mmc1 nand0 pxe dhcp 87: 9df3d6e0 ==> boot_net_usb_start => usb start88: 9df3d71c ==> update_to_fit => setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}89: 9df3d780 ==> board_rev=> FCV190: 9df3d7d0 ==> bootcmd_nand => run nandboot91: 9df3d7e4 ==> bootcmd_mmc0 => setenv devnum 0; run mmc_boot92: 9df3d7f8 ==> ice_mii=> mii93: 9df3d8e8 ==> spisrcaddr => 0xe000094: 9df3d94c ==> spibusno=> 095: 9df3d9b0 ==> loadfit=> run args_mmc; run run_fit;96: 9df3da28 ==> console=> ttyO0,115200n897: 9df3da50 ==> dfu_alt_info_nand => SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;u-boot-spl-os part 0 6;kernel part 0 8;rootfs part 0 998: 9df3da64 ==> soc=> am33xx99: 9df3daf0 ==> mmcboot=> 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;100: 9df3db68 ==> static_ip=> ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off101: 9df3dbcc ==> fit_bootfile => fitImage102: 9df3dc08 ==> bootpart=> 0:2103: 9df3dc44 ==> 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; done104: 9df3dd0c ==> spiboot=> echo Booting from spi …; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}105: 9df3dd34 ==> 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;106: 9df3dd5c ==> loadbootenv => fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}107: 9df3dd70 ==> load_efi_dtb => load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}108: 9df3de24 ==> 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; done109: 9df3dec4 ==> boot_script_dhcp => boot.scr.uimg110: 9df3deec ==> mmcloados=> 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;111: 9df3df14 ==> 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…; fi112: 9df3df64 ==> netboot=> echo Booting from network …; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} – ${fdtaddr}113: 9df3dfc8 ==> bootcount=> 1114: 9df3dff0 ==> bootcmd_pxe => run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi115: 9df3e004 ==> args_mmc=> run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
blk_get_devnum_by_typename: if_type=6, devnum=0: mmc@48060000.blk, 6, 0
uclass_find_device_by_seq: 0 -1
uclass_find_device_by_seq: 0 0- -1 -1 'mmc@48060000.blk'- not found
mmc_blk_probe: mmc_init() failed (err=-123)
get_dev_hwpart: No device for iface 'mmc', dev 0
** Bad device mmc 0 **
Failed (1)
Command failed, result=1
user4132396:
回复 Nancy Wang:
已经贴出来了,您看下
user4132396:
回复 user4132396:
** Bad device mmc 0 **这里有问题,mmc0是sd卡,是从sd卡的fat32分区去读的MLO文件,那怎么还能有问题呢
出现的一些错误信息:
user4132396:
回复 Nancy Wang:
刚刚测试了下,貌似mmc相关的命令都不能执行,对了,我使用的是3354
这是mmc初始化的时候:
Nancy Wang:
回复 user4132396:
这些命令都无法执行吗?如果可以的话,贴出来看一下。
=> mmc list
=> mmc dev 0
=> mmc part
=> mmc info
=> mmc dev 1
=> mmc part
=> mmc info
=> mmc rescan
=> mmc list
=> mmc dev 0
=> mmc dev 1
user4132396:
回复 Nancy Wang:
是这样,目前已经大概知道问题所在了,由于板子硬件mmc0接口中cd引脚和evm不同导致的,现在已经可以保存了,但是重启后uboot提示成功读取已经保存的环境变量,但环境变量的值是默认的而不是uEnv里面保存的,单独使用文本查看环境变量确实已经成功保存了,这一般什么问题呢?