setenv bootargs ""
setenv bootdir /
setenv dtbaddr 12000000
setenv bootaddr 10800000
setenv bootimg uvmm.bin

dtbname="vmm-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
            bootm ${bootaddr} - ${dtbaddr}
	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
            bootm ${bootaddr} - ${dtbaddr}
        else
            bootm ${bootaddr}
	fi
    fi
fi
echo "Error loading Xvisor image";
