[PATCH 2/3] ixp4xx: Support sysupgrade on WG302 v1
Linus Walleij
linus.walleij at linaro.org
Sun Dec 22 16:32:04 PST 2024
The WG302 v1 have a separate rootfs partition that we
simply just upgrade with a new rootfs image. The kernel
need to be updated on the TFTP server.
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
.../ixp4xx/base-files/lib/upgrade/platform.sh | 27 ++++++++++++++++++++++
target/linux/ixp4xx/image/Makefile | 1 +
2 files changed, 28 insertions(+)
diff --git a/target/linux/ixp4xx/base-files/lib/upgrade/platform.sh b/target/linux/ixp4xx/base-files/lib/upgrade/platform.sh
new file mode 100644
index 0000000000000000000000000000000000000000..869eab32140b396c2435145242d170111dd0fe05
--- /dev/null
+++ b/target/linux/ixp4xx/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+REQUIRE_IMAGE_METADATA=1
+
+platform_check_image() {
+ local board=$(board_name)
+
+ case "$board" in
+ netgear,wg302v1)
+ return 0
+ ;;
+ esac
+
+ echo "Sysupgrade is not yet supported on $board."
+ return 1
+}
+
+platform_do_upgrade() {
+ local board=$(board_name)
+
+ case "$board" in
+ netgear,wg302v1)
+ PART_NAME=rootfs
+ default_do_upgrade "$1"
+ ;;
+ esac
+}
diff --git a/target/linux/ixp4xx/image/Makefile b/target/linux/ixp4xx/image/Makefile
index 2c3f542279c3fd19f9c5f53f668d3ab0b6242aca..64dffd23198133614bfabd08b194037afb499185 100644
--- a/target/linux/ixp4xx/image/Makefile
+++ b/target/linux/ixp4xx/image/Makefile
@@ -135,6 +135,7 @@ define Device/netgear_wg302v1
IMAGES := kernel.bin rootfs.bin
IMAGE/kernel.bin := append-kernel
IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to 128k
+ IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 128k | append-metadata
endef
TARGET_DEVICES += netgear_wg302v1
--
2.47.1
More information about the openwrt-devel
mailing list