[PATCH v2] uboot-sunxi: use UUID of bootdev and bootpart
Jan-Niklas Burfeind
git at aiyionpri.me
Tue Dec 20 07:43:23 PST 2022
for the NanoPi R1 instead of the hardcoded `mmcblk0p2` to support its
multiple mmcs.
Fixes: e6d9f6fdff ("sunxi: add support for FriendlyARM NanoPi R1")
Co-authored-by: Karl Palsson <karlp at etactica.com>
Signed-off-by: Jan-Niklas Burfeind <git at aiyionpri.me>
---
package/boot/uboot-sunxi/Makefile | 1 +
package/boot/uboot-sunxi/uEnv-anymmc.txt | 8 ++++++++
2 files changed, 9 insertions(+)
create mode 100644 package/boot/uboot-sunxi/uEnv-anymmc.txt
diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index 5c27407d15..e4e4089015 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -184,6 +184,7 @@ define U-Boot/nanopi_r1
BUILD_SUBTARGET:=cortexa7
NAME:=U-Boot for NanoPi R1 (H3)
BUILD_DEVICES:=friendlyarm_nanopi-r1
+ UENV:=anymmc
endef
define U-Boot/orangepi_r1
diff --git a/package/boot/uboot-sunxi/uEnv-anymmc.txt b/package/boot/uboot-sunxi/uEnv-anymmc.txt
new file mode 100644
index 0000000000..36e41c59b1
--- /dev/null
+++ b/package/boot/uboot-sunxi/uEnv-anymmc.txt
@@ -0,0 +1,8 @@
+setenv fdt_high ffffffff
+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
--
2.39.0
More information about the openwrt-devel
mailing list