]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
uboot-envtools: add support for Gateworks venice 19347/head
authorTim Harvey <tharvey@gateworks.com>
Fri, 20 Jun 2025 19:49:51 +0000 (12:49 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 12 Jul 2025 18:24:28 +0000 (20:24 +0200)
Add uboot-envtools support for Gateworks venice boards based on i.MX8M
SoC's (imx_cortexa53) which boot from and store their U-Boot env on
eMMC boot0 hardware partition.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-tools/uboot-envtools/files/imx_cortexa53 [new file with mode: 0644]

diff --git a/package/boot/uboot-tools/uboot-envtools/files/imx_cortexa53 b/package/boot/uboot-tools/uboot-envtools/files/imx_cortexa53
new file mode 100644 (file)
index 0000000..6aad4ce
--- /dev/null
@@ -0,0 +1,21 @@
+[ -e /etc/config/ubootenv ] && exit 0
+
+touch /etc/config/ubootenv
+
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(board_name)
+
+case "$board" in
+gw,imx8m*|\
+gateworks,imx8m*)
+       # board boots from emmc boot0 hardware partition
+       ubootenv_add_uci_config /dev/mmcblk2boot0 0x3f0000 0x8000
+       ubootenv_add_uci_config /dev/mmcblk2boot0 0x3f8000 0x8000
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0