# This uEnv.txt file can contain additional environment settings that you
# want to set in U-Boot at boot time.  This can be simple variables such
# as the serverip or custom variables.  The format of this file is:
#    variable=value
# NOTE: This file will be evaluated after the bootcmd is run and the
#       bootcmd must be set to load this file if it exists (this is the
#       default on all newer U-Boot images.  This also means that some
#       variables such as bootdelay cannot be changed by this file since
#       it is not evaluated until the bootcmd is run.
psdk_setup_file=.psdk_setup
check_psdk_setup=load mmc 1:1 ${loadaddr} ${psdk_setup_file}

# Reset to the default environment
do_psdk_setup=env default -f -a; saveenv

# If not done previously, then reset to the default environment and indicate this by writing a file
# Also update the Linux hostname based on board_name
uenvcmd=if run check_psdk_setup; then echo "Already setup."; else run do_psdk_setup; mw.b ${loadaddr} 0 1; fatwrite mmc 1:1 ${loadaddr} .psdk_setup 1; reset; fi; if test "$board_name" = "j721e-sk"; then ; setenv args_all $args_all systemd.hostname=tda4vm-sk ; fi; if test ${boot_fit} -eq 1; then  setenv name_overlays $name_overlays_fit; fi;

# Setting the right U-Boot environment variables
dorprocboot=1
name_overlays=k3-j721e-edgeai-apps.dtbo

# Name overlays when booting from fit image
name_overlays_fit=ti/k3-j721e-edgeai-apps.dtbo