diff --git a/config/bootscripts/boot-sunxi.cmd b/config/bootscripts/boot-sunxi.cmd index 06e1a0616..8f0afad3e 100644 --- a/config/bootscripts/boot-sunxi.cmd +++ b/config/bootscripts/boot-sunxi.cmd @@ -13,10 +13,11 @@ setenv disp_mode "1920x1080p60" setenv rootfstype "ext4" # Print boot source -itest.b *0x28 == 0x00 && echo "Booting from SD" -itest.b *0x28 == 0x02 && echo "Booting from eMMC or secondary SD" +itest.b *0x28 == 0x00 && echo "U-boot loaded from SD" +itest.b *0x28 == 0x02 && echo "U-boot loaded from eMMC or secondary SD" +itest.b *0x28 == 0x03 && echo "U-boot loaded from SPI" -if load mmc 0 ${load_addr} /boot/armbianEnv.txt || load mmc 0 ${load_addr} armbianEnv.txt; then +if load ${devtype} 0 ${load_addr} /boot/armbianEnv.txt || load ${devtype} 0 ${load_addr} armbianEnv.txt; then env import -t ${load_addr} ${filesize} fi @@ -31,14 +32,14 @@ setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs if test "${disp_mem_reserves}" = "off"; then setenv bootargs "${bootargs} sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16"; fi -load mmc 0:1 ${ramdisk_addr_r} /boot/uInitrd || load mmc 0 ${ramdisk_addr_r} uInitrd -load mmc 0:1 ${kernel_addr_r} /boot/zImage || load mmc 0 ${kernel_addr_r} zImage +load ${devtype} 0:1 ${ramdisk_addr_r} /boot/uInitrd || ${devtype} mmc 0 ${ramdisk_addr_r} uInitrd +load ${devtype} 0:1 ${kernel_addr_r} /boot/zImage || ${devtype} mmc 0 ${kernel_addr_r} zImage -if load mmc 0 0x00000000 /boot/.next || load mmc 0 0x00000000 .next; then - load mmc 0 ${fdt_addr_r} /boot/dtb/${fdtfile} || load mmc 0 ${fdt_addr_r} /dtb/${fdtfile} +if load ${devtype} 0 0x00000000 /boot/.next || load ${devtype} 0 0x00000000 .next; then + load ${devtype} 0 ${fdt_addr_r} /boot/dtb/${fdtfile} || load ${devtype} 0 ${fdt_addr_r} /dtb/${fdtfile} bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} else - load mmc 0 ${fdt_addr_r} /boot/script.bin || load mmc 0 ${fdt_addr_r} script.bin + load ${devtype} 0 ${fdt_addr_r} /boot/script.bin || load ${devtype} 0 ${fdt_addr_r} script.bin bootz ${kernel_addr_r} ${ramdisk_addr_r} fi