This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358

##These are needed to be compliant with Angstrom's 2013.06.20 u-boot.

loadaddr=0x82000000
fdtaddr=0x88000000
rdaddr=0x88080000
fdtfile=am335x-bonegreen-wireless.dtb

uSD_interface=0
uSD_rootfspart=2

backup_interface=1
backup_rootfspart=6

uname_r=4.9.31-gf9f6f0db2d
cmdline=coherent_pool=1M cape_universal=enable

##These are needed to be compliant with Debian 2014-05-14 u-boot.

loadkern=\
	if load mmc ${mmcinterface}:${rootfspart} ${loadaddr} /boot/vmlinuz-${uname_r}; \
	then #echo debug: [Kernel from partition - ${mmcinterface}:${rootfspart}]; \
	else setenv mmcinterface ${backup_interface}; \
	     setenv rootfspart ${backup_rootfspart}; \
	     echo debug: [Kernel -NOT- found loading from - ${mmcinterface}:${rootfspart}]; \
	     load mmc ${mmcinterface}:${rootfspart} ${loadaddr} /boot/vmlinuz-${uname_r}; \
	fi

				
loadxfdt= \
	if load mmc ${mmcinterface}:${rootfspart} ${fdtaddr} /boot/dtbs/${uname_r}/${fdtfile}; \
	then  \
		echo debug: [DTB loaded from ${mmcinterface}:${rootfspart}]; \
	else \
		setenv mmcinterface ${backup_interface}; \
		setenv rootfspart ${backup_rootfspart}; \
		load mmc ${mmcinterface}:${rootfspart} ${fdtaddr} /boot/dtbs/${uname_r}/${fdtfile}; \
		echo debug: [DTB -NOT- found, switching to - ${mmcinterface}:${rootfspart}]; \
		echo debug :[reload DTB from other partition]; \
	fi

check_dtb=if test -n ${dtb}; then setenv fdtfile ${dtb};fi
loadall=run check_dtb; run loadkern; run loadxfdt;

mmcargs=setenv bootargs console=tty0 ${optargs} ${cape_disable} ${cape_enable} root=/dev/mmcblk${mmcinterface}p${linux_backup_rootfs} rootfstype=${mmcrootfstype} ${cmdline} panic=1 fsck.mode=force fsck.repair=yes
debugargs=setenv bootargs console=ttyO0,115200n8 console=tty0 ${optargs} ${cape_disable} ${cape_enable} root=/dev/mmcblk${mmcinterface}p${linux_backup_rootfs} rootfstype=${mmcrootfstype} ${cmdline} panic=1

uenvcmd=if mmc dev 0; then \
		echo debug [uSD]; \
		setenv mmcinterface ${uSD_interface}; setenv rootfspart ${uSD_rootfspart}; \
		setenv linux_backup_rootfs ${uSD_rootfspart}; \
	fi; \
	echo =---debug: About to boot from --- ${mmcinterface}p${rootfspart} -----====; \
	run loadall; \
	run mmcargs; \
	bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; 
	

debug_envcmd=if mmc dev 0; then \
		echo debug [uSD]; \
		echo debug: [Fariya mmcinterface and linux_backuo_rootfs values are ${mmcinterface} ${uSD_rootfspart} ${linux_backup_rootfs}]; \
		setenv mmcinterface ${uSD_interface}; setenv rootfspart ${uSD_rootfspart}; \
		setenv linux_backup_rootfs ${uSD_rootfspart}; \
	fi; \
	echo =---debug: yes did it here. About to boot from --- ${mmcinterface}p${rootfspart} -----====; \
	run loadall; \
	echo Ran loadall here; \
	run debugargs; \
	bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr};

Hi,

I am migrating U-boot 2016 to 2020 version for AM335x based custom board. I am facing issue in booting kernel from U-boot 2020 using autoboot commands. I am specifying the env boot commands in include/configs/am335x_evm.h file but while executing run loadbootenv command for loading our uEnv.txt file It was giving syntax error.  Here I want to load uEnv.txt file from mmc1 and 2nd partition. The same commands working in U-boot 2016 version. I am posting the commands and as well as error logs. Please check and help me out in this...

"bootenv=uEnv.txt\0" \

"loadbootenv=" \
"echo reading uEnv.txt;" \
"echo --${mmcinterface}:${rootfspart}--;" \
"if load mmc 0:2 ${loadaddr} ${bootenv}; then" \
"echo uEnv.txt read fom uSD main partition;" \
"else " \
"if load mmc ${mmcinterface}:${rootfspart} ${loadaddr} ${bootenv}; then" \
"echo uEnv.txt read fom eMMC main partition;" \
"else" \
"echo uEnv.txt not found in active partition" \
"fi; " \
"fi;\0" \

"if run loadbootscript; then " \
"run bootscript;" \
"else " \
"if run loadbootenv; then" \
"echo Loaded environment from ${bootenv};" \
"run importbootenv;" \
"fi;" \
"if test -n $uenvcmd; then " \
"echo Running uenvcmd ...;" \
"run uenvcmd;" \
"fi;" \
"if run loadimage; then " \
"run mmcloados;" \
"fi;" \
"fi;\0" \

error logs:

 Debug: run  loadbootscript

 Debug: load  mmc  0  0x82000000  boot.scr clock is disabled (0Hz)

clock is enabled (400000Hz)

Card did not respond to voltage select!

get_dev_hwpart: No device for iface 'mmc', dev 0

** Bad device mmc 0 **

Command failed, result=1

Command failed, result=1

 

 Debug: run  loadbootenv syntax error

Command failed, result=1

Thanks&Regards,

Jyothi.