SN=EC2052000403 active=1 altbootcmd=if test $changed = 0; then run do_change; else run do_recovery; fi args_common=root=mtd:ubi_rootfs rootfstype=squashfs baudrate=115200 boot1=echo Booting from partition: ${partname} boot2=nand device 0 && setenv mtdids nand0=nand0,nand1=spi0.0 boot3=setenv mtdparts mtdparts=nand0:0x3c00000@0x0(fs1),0x3c00000@0x3c00000(fs2) boot4=ubi part fs${partname} && ubi read 44000000 kernel boot5=cfgsel 44000000 && run bootfdtcmd bootargs=console=ttyMSM0,115200n8 bootcmd=run setup && run bootlinux bootcount=4 bootdelay=3 bootlimit=3 bootlinux=run boot1 boot2 boot3 boot4 boot5 || reset change1=if test $active = 1; then setenv active 2; else setenv active 1; fi change2=setenv bootcount; setenv changed 1; saveenv change3=echo Active partition changed to [$active] changed=1 do_change=run change1 change2 change3; reset do_recovery=run rec1 rec2 rec3 rec4 rec5 rec6 rec7 rec8; reset eth1addr=90:3c:b3:6a:e5:44 eth2addr=90:3c:b3:6a:e5:45 ethact=eth0 ethaddr=90:3c:b3:6a:e5:43 fdt_high=0x48500000 fdtcontroladdr=4a477210 flash_type=7 ipaddr=10.50.24.98 machid=8030000 netmask=255.255.255.0 rec1=echo Doing firmware recovery! rec2=setenv active 1 && setenv changed 0 && setenv bootcount 0 rec3=saveenv rec4=sleep 2 && tftpboot ${tftp_loadaddr} ${recovery_file} rec5=imxtract ${tftp_loadaddr} ubi rec6=nand device default && nand erase.chip rec7=nand write ${fileaddr} 0x0 ${filesize} rec8=nand write ${fileaddr} 0x3c00000 ${filesize} recovery_file=fwupdate.bin serverip=10.50.24.254 setup=if test $active = 1; then run setup1; else run setup2; fi setup1=partname=1 && setenv bootargs ubi.mtd=rootfs${partname} ${args_common} setup2=partname=2 && setenv bootargs ubi.mtd=rootfs${partname} ${args_common} soc_version_major=1 soc_version_minor=0 stderr=serial@78B1000 stdin=serial@78B1000 stdout=serial@78B1000 tftp_loadaddr=0x42000000 upgrade_available=1