From c67912122c5a3ef28394d5156fe43304d0562b63 Mon Sep 17 00:00:00 2001 From: Marek Belisko Date: Thu, 11 May 2023 11:59:05 +0200 Subject: [PATCH] u-boot: Added custom boot.cmd For bananapi emmc is on mmc2 not mmc1 Signed-off-by: Marek Belisko --- recipes-bsp/u-boot/files/bananapi-m64/boot.cmd | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 recipes-bsp/u-boot/files/bananapi-m64/boot.cmd diff --git a/recipes-bsp/u-boot/files/bananapi-m64/boot.cmd b/recipes-bsp/u-boot/files/bananapi-m64/boot.cmd new file mode 100644 index 0000000..f0d8555 --- /dev/null +++ b/recipes-bsp/u-boot/files/bananapi-m64/boot.cmd @@ -0,0 +1,11 @@ +# Default to (primary) SD +rootdev=mmcblk0p2 +if itest.b *0x28 == 0x02 ; then + # U-Boot loaded from eMMC or secondary SD so use it for rootfs too + echo "U-boot loaded from eMMC or secondary SD" + rootdev=mmcblk2p2 +fi +setenv bootargs console=${console} console=tty1 root=/dev/${rootdev} rootwait panic=10 ${extra} +load mmc 0:1 ${fdt_addr_r} ${fdtfile} +load mmc 0:1 ${kernel_addr_r} Image +booti ${kernel_addr_r} - ${fdt_addr_r}