# Prepare with:
# mkimage -T script -C none -n 'TS IMX6 Blaster' -d tsinit tsinit.ub

# Some older TS-4900 u-boots did not set the model
if env print model; 
	then true;
else
	env set model '4900';
fi;

env set boot 'usb start;env set bootargs 'console=null ro init=/init enable_wait_mode=off'
if test ${model} = '4900'; then
	load usb 0:1 ${loadaddr} /boot/ts4900-fpga.bin;
	ice40 ${loadaddr} ${filesize};
fi
load usb 0:1 ${fdtaddr} /boot/imx6${cpu}-ts${model}.dtb;
load usb 0:1 ${loadaddr} /boot/zImage;
load usb 0:1 0x14000000 /boot/initramfs;
bootz ${loadaddr} 0x14000000 ${fdtaddr};';
run boot;
