setenv bootargs ""
setenv bootdir /
setenv dtbaddr 12000000
setenv bootaddr 10800000
setenv bootimg uvmm.bin
setenv diskaddr 14000000
setenv diskimg udisk.img

dtbname="imx6";
if itest.s x6SOLO == "x${cpu}" ; then
	dtbname=${dtbname}dl-
elif itest.s x6DL == "x${cpu}" ; then
	dtbname=${dtbname}dl-
else
	dtbname=${dtbname}q-
fi

if itest.s x == "x${board}" ; then
	board=sabrelite
fi
dtbname=${dtbname}${board}.dtb;

if itest.s x == x${bootdir} ; then
	bootdir=/boot/
fi

if itest.s "x${boottype}" == "xtftp" ; then
	echo "Load from tftp server"
	if tftpboot ${bootaddr} ${bootimg} ; then
		if tftpboot ${dtbaddr} ${dtbname} ; then
			if tftpboot ${diskaddr} ${diskname} ; then
				bootm ${bootaddr} ${diskaddr} ${dtbaddr}
			else
				bootm ${bootaddr} - ${dtbaddr}
			fi
		else
			bootm ${bootaddr}
		fi
	fi
else
	echo "Load from SD/MMC";
	if ${fs}load mmc ${disk}:1 ${bootaddr} ${bootdir}uvmm.bin ; then
		if ${fs}load mmc ${disk}:1 ${dtbaddr} ${bootdir}$dtbname ; then
			if ${fs}load mmc ${disk}:1 ${diskaddr} ${bootdir}$diskname ; then
				bootm ${bootaddr} ${diskaddr} ${dtbaddr}
			else
				bootm ${bootaddr} - ${dtbaddr}
			fi
		else
			bootm ${bootaddr}
		fi
	fi
fi
echo "Error loading Xvisor image";
