# write u-boot
if [ -f $PREFIX/usr/share/u-boot/$TARGET/u-boot.itb ]; then
	echo "= Writing sunxi-spl.bin for $TARGET ...."
	dd if=$PREFIX/usr/share/u-boot/$TARGET/sunxi-spl.bin of=$MEDIA bs=8k seek=1; sync
	echo "= Writing u-boot FIT image for $TARGET ...."
	dd if=$PREFIX/usr/share/u-boot/$TARGET/u-boot.itb of=$MEDIA bs=8k seek=5; sync; sleep 5
else
	echo "= Writing u-boot-sunxi-with-spl.bin ...."
	dd if=$PREFIX/usr/share/u-boot/$TARGET/u-boot-sunxi-with-spl.bin of=$MEDIA bs=1024 seek=8; sync; sleep 5
fi
# set console for allwinner
SYSCON=ttyS0,115200
