aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot
diff options
context:
space:
mode:
authorJan-Niklas Burfeind <git@aiyionpri.me>2022-12-20 16:43:23 +0100
committerStijn Tintel <stijn@linux-ipv6.be>2022-12-22 13:33:47 +0200
commitbf06a7c865531cf20735cbdfac46d4947fcc18a6 (patch)
tree7842d0842cd3c4ec7e77b275cdd19e9c353cea04 /package/boot
parent5b82eeb320d9f8e543232bb5dd004e644b35983e (diff)
downloadupstream-bf06a7c865531cf20735cbdfac46d4947fcc18a6.tar.gz
upstream-bf06a7c865531cf20735cbdfac46d4947fcc18a6.tar.bz2
upstream-bf06a7c865531cf20735cbdfac46d4947fcc18a6.zip
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 <karlp@etactica.com> Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me> [use UUID in default u-boot env, rewrite commit message] Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'package/boot')
-rw-r--r--package/boot/uboot-sunxi/uEnv-default.txt8
1 files changed, 5 insertions, 3 deletions
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