Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
themeMidnight
titleexample: u-boot printenv for TE0715
bootcmd_mmc0=devnum=0; run mmc_boot
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi


Code Snippets for Boot.scr file

Expand
titleboot.scr and image.ub on sd card


Code Block
languagebash
themeMidnight
titleimage.ub on sd card
	if test "${boot_target}" = "mmc0"; then
		mmc dev 0
		if test -e ${devtype} 0:${distro_bootpart} /image.ub; then
			#fatload ${devtype} 0:${distro_bootpart} ${imageub_addr} image.ub;
			fatload mmc 0:${distro_bootpart} ${imageub_addr} image.ub;
			bootm ${imageub_addr};
		fi
	fi
	if test "${boot_target}" = "mmc1"; then
		mmc dev 1
		if test -e ${devtype} 1:${distro_bootpart} /image.ub; then
			#fatload ${devtype} 0:${distro_bootpart} ${imageub_addr} image.ub;
			fatload mmc 1:${distro_bootpart} ${imageub_addr} image.ub;
			bootm ${imageub_addr};
		fi
	fi



Expand
titleboot.scr and image.ub on sd card or usb


Code Block
languagebash
themeMidnight
titleimage.ub on sd card
	if test "${boot_target}" = "mmc0"; then
		mmc dev 0
		if test -e ${devtype} 0:${distro_bootpart} /image.ub; then
			#fatload ${devtype} 0:${distro_bootpart} ${imageub_addr} image.ub;
			fatload mmc 0:${distro_bootpart} ${imageub_addr} image.ub;
			bootm ${imageub_addr};
		fi
	fi
	if test "${boot_target}" = "mmc1"; then
		mmc dev 1
		if test -e ${devtype} 1:${distro_bootpart} /image.ub; then
			#fatload ${devtype} 0:${distro_bootpart} ${imageub_addr} image.ub;
			fatload mmc 1:${distro_bootpart} ${imageub_addr} image.ub;
			bootm ${imageub_addr};
		fi
	fi


Expand
titleboot.scr and image.ub on sd card

Image Added


Expand
titleboot.scr and image.ub on usb0

Image Added



Expand
titleboot.scr and image.ub on usb0


Code Block
languagebash
themeMidnight
titleimage.ub on usb0
	if test "${boot_target}" = "usb0"; then
		echo [TE_BOOT-40] Try to use: image.ub from ${boot_target};
		usb start
		#fatload ${devtype} 0:${distro_bootpart} ${imageub_addr} image.ub;
		fatload usb 0:1 ${imageub_addr} image.ub;
		bootm ${imageub_addr};
	fi


boot.scr and image.ub on mmc0

Code Block
languagebash
themeMidnight
titleexample boot.script file
# This is a boot script for U-Boot
# Generate boot.scr:
# mkimage -c none -A arm -T script -d boot.script boot.scr
#
################
imageub_addr=0x10000000
# 
imageub_flash_addr=0x200000
imageub_flash_size=0xD90000

echo [TE_BOOT-01] Trenz Boot-file version 0.1 (development);
echo [TE_BOOT-10] Chosen Bootmode is ${modeboot} from boot_targets=${boot_targets};
echo [TE_BOOT-11] Found boot.scr in device: ${target}

for boot_target in ${boot_targets};
do

	# Boot target is sd card: image.ub on mmc0
	if test "${boot_target}" = "mmc0"; then
		echo [TE_BOOT-20] Try to use: image.ub from ${boot_target};
		mmc dev 0
		if test -e ${devtype} 0:${distro_bootpart} /image.ub; then
			fatload ${devtype} 0:${distro_bootpart} ${imageub_addr} image.ub;
			bootm ${imageub_addr};
		fi
	fi
	if test "${boot_target}" = "mmc1"; then
		echo [TE_BOOT-21] Try to use: image.ub from ${boot_target};
		mmc dev 1
		if test -e ${devtype} 1:${distro_bootpart} /image.ub; then
			fatload ${devtype} 1:${distro_bootpart} ${imageub_addr} image.ub;
			bootm ${imageub_addr};
		fi
	fi
	# Boot target is qspi: image.ub on qspi; image.ub is included in BOOT.bin
	if test "${boot_target}" = "qspi"; then
		echo [TE_BOOT-30] Try to use: image.ub from ${boot_target};
		sf probe 0 0 0;
		sf read ${imageub_addr} ${imageub_flash_addr} ${imageub_flash_size};
		bootm ${imageub_addr};
	fi
done


References

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/749142017/Using+Distro+Boot+With+Xilinx+U-Boot#UsingDistroBootWithXilinxU-Boot-BootTargets

...