From: Jan-Niklas Burfeind Date: Tue, 20 Dec 2022 15:43:23 +0000 (+0100) Subject: uboot-sunxi: use UUID of bootdev and bootpart X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bf06a7c865531cf20735cbdfac46d4947fcc18a6;p=openwrt%2Fstaging%2Fsvanheule.git uboot-sunxi: use UUID of bootdev and bootpart Several sunxi devices come with multiple mmc devices. On such devices, the mmc device order is unpredictable, so using /dev/mmcblk0p2 as root device doesn't always work, which results in unbootable devices. For the Banana Pi BPI-R3 in the mediatek target, this has been solved by defining aliases for the mmc devices in the DTS. Ideally we would do the same here, but for sunxi-a64 we already use UUID probing, so let's start with that (5f2ff607e286 ("uboot-sunxi: a64: allow booting directly from eMMC")). Since we're building and including u-boot in each supported device image, and this method has been proven to work fine for a64, let's just change the default u-boot env file to do the same. Fixes: #10080 Fixes: e6d9f6fdff ("sunxi: add support for FriendlyARM NanoPi R1") Co-authored-by: Karl Palsson Signed-off-by: Jan-Niklas Burfeind [use UUID in default u-boot env, rewrite commit message] Signed-off-by: Stijn Tintel --- diff --git a/package/boot/uboot-sunxi/uEnv-default.txt b/package/boot/uboot-sunxi/uEnv-default.txt index e024954516..36e41c59b1 100644 --- a/package/boot/uboot-sunxi/uEnv-default.txt +++ b/package/boot/uboot-sunxi/uEnv-default.txt @@ -1,6 +1,8 @@ setenv fdt_high ffffffff -setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage -setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb -setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait +setenv mmc_rootpart 2 +part uuid mmc ${mmc_bootdev}:${mmc_rootpart} uuid +setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_addr_r uImage +setenv loaddtb fatload mmc \$mmc_bootdev \$fdt_addr_r dtb +setenv bootargs console=ttyS0,115200 earlyprintk root=PARTUUID=${uuid} rootwait setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r run uenvcmd