active_part_file=sys_active altbootcmd= setenv fallback_active 1;setenv bootargs_base ${bootargs_base} fallback;run distro_bootcmd arch=arm baudrate=115200 board=imx/mx8mm board_name=imx/mx8mm bootargs_base=console=ttymxc2,115200 mtdparts=spi0.0:0x50000(spl),0x100000(u-boot),0x10000(env),0x10000(env_redundant)" bootargs_prepend_A=root=/dev/mmcblk0p2 rootwait bootargs_prepend_B=root=/dev/mmcblk0p3 rootwait bootargs_sd=root=/dev/mmcblk1p2 rootwait bootcmd_mmc0= setenv devnum 0;setenv devpart 1;run mmc0_boot bootcmd_mmc1= setenv devnum 1;setenv devpart 1;run mmc1_boot bootcmd_net=run netargs; setenv bootargs ${bootargs} ${bootargs_base}; tftp ${loadaddr} fitImage; bootm ${loadaddr}${fiti_config} bootcmd=run distro_bootcmd bootdelay=3 bootlimit=3 boot_prefixes=/ /boot/ boot_targets=mmc1 mmc0 bootubipart=spi-nand0 bootubivol=boot cpu=armv8 determine_bootargs=if test $fallback_active = 0;then echo Normal active boot ; setenv fiti_name ${fiti_name}_active; if itest.b *${loadaddr} == 41;then setenv bootargs ${bootargs_prepend_A} ${bootargs_base};echo using rootfs partition ${bootargs_prepend_A};else setenv bootargs ${bootargs_prepend_B} ${bootargs_base};echo using rootfs partition ${bootargs_prepend_B};fi;else echo fallback boot to inactive system ; setenv fiti_name ${fiti_name}_inactive; if itest.w *${loadaddr} == 0x4242 || itest.w *${loadaddr} == 0x4241;then setenv bootargs ${bootargs_prepend_B} ${bootargs_base};echo using rootfs partition ${bootargs_prepend_B};fi; if itest.w *${loadaddr} == 0x4141 || itest.w *${loadaddr} == 0x4142;then setenv bootargs ${bootargs_prepend_A} ${bootargs_base};echo using rootfs partition ${bootargs_prepend_A};fi; fi; determine_wdog_addr=if test ${soc} = mx6; then setenv wdog_wcr_addr 20bc000; elif test ${soc} = imx8m;then setenv wdog_wcr_addr 30280000;fi distro_bootcmd=run detect_fiti_config; for target in ${boot_targets}; do echo searching for u-boot.txt in $target;run load_extra_env_${target};done;echo No u-boot.txt found;for target in ${boot_targets}; do run bootcmd_${target}; done;reset; enable_wdog=if test ${wdog_wcr_addr} != ; then echo Watchdog enabled!; mw.w $wdog_wcr_addr b434 1; else echo wdog_wcr_addr not set. Watchdog cannot be enabled!;fi ethact=eth0 ethprime=eth0 extra_env_file=u-boot.txt fallback_active=0 fdt_addr_r=0x42000000 fdt_high=0xffffffff fiti_config= fiti_name=fitImage gatewayip=192.168.1.10 hostname=kontron-n8000 initrd_high=0xffffffff ipaddr=192.168.1.11 load_extra_env_mmc0=setenv devnum 0;setenv devpart 1; run mmc0_env_load; load_extra_env_mmc1=setenv devnum 1;setenv devpart 1; run mmc1_env_load; mmc0_env_load=if fatload mmc ${devnum}:${devpart} $loadaddr ${extra_env_file};then run import_and_load_env;fi; mmc0_boot=if ext4load mmc ${devnum}:${devpart} $loadaddr ${active_part_file} 2;then run determine_bootargs;if ext4load mmc ${devnum}:${devpart} $loadaddr ${fiti_name}; then if test ${upgrade_available} = 1 ;then run determine_wdog_addr; run enable_wdog;fi; bootm ${loadaddr}${fiti_config};else echo ----------------------- ;echo fitImage $fiti_name not found. ;echo aborting boot and reset ;echo ----------------------- ;reset ; fi;else echo ----------------------- ;echo no partition file found ;echo aborting boot and reset ;echo ----------------------- ;reset ; fi mmc1_env_load=if ext4load mmc ${devnum}:${devpart} $loadaddr ${extra_env_file};then run import_and_load_env;fi; mmc1_boot=setenv bootargs ${bootargs_sd} ${bootargs_base}; if fatload mmc ${devnum}:${devpart} $loadaddr ${fiti_name};then bootm ${loadaddr}${fiti_config};fi mtdids= mtdparts= netargs=setenv bootargs root=/dev/nfs ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:n8010:eth0:any: nfsroot=${serverip}:${nfsroot},v3,tcp netmask=255.255.255.0 nfsroot=/nfsroot kernel_addr_r=0x43000000 loadaddr=0x43000000 scriptaddr=0x43000000 serverip=192.168.1.10 soc=imx8m upgrade_available=0 vendor=kontron auto_detect=1 detect_fiti_config=if test $auto_detect = 1;then i2c dev 1; if i2c probe 0x5d; then echo "Touchscreen detected"; setenv fiti_config '#conf@freescale_imx8mm-kontron-n801x-s-lvds.dtb'; else setenv fiti_config '#conf@freescale_imx8mm-kontron-n801x-s.dtb';fi;fi