[openwrt/openwrt] ramips: add factory image for ipTIME AX2004M
LEDE Commits
lede-commits at lists.infradead.org
Sat Mar 9 23:43:13 PST 2024
mans0n pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/85a8f58483b223951515219ca9b21c31c36f87c8
commit 85a8f58483b223951515219ca9b21c31c36f87c8
Author: Sungbo Eo <mans0n at gorani.run>
AuthorDate: Mon Feb 5 03:57:27 2024 +0900
ramips: add factory image for ipTIME AX2004M
Unlike the recovery image, this initramfs-factory image can be flashed
using the stock firmware web interface (from any active boot partition),
as well as the bootloader recovery web page. Drop the recovery image in
favor of the factory image.
Installation via stock/recovery web interface:
1. Flash **initramfs-factory** image through the web page.
2. Boot into OpenWrt and perform sysupgrade with sysupgrade image.
Signed-off-by: Sungbo Eo <mans0n at gorani.run>
---
target/linux/ramips/image/mt7621.mk | 6 +++---
target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh | 5 +++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index b644d52708..2ab687fd02 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -1455,8 +1455,8 @@ define Device/iptime_ax2004m
KERNEL_LOADADDR := 0x82000000
KERNEL := kernel-bin | relocate-kernel $(loadaddr-y) | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
- IMAGES += recovery.bin
- IMAGE/recovery.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
+ ARTIFACTS := initramfs-factory.bin
+ ARTIFACT/initramfs-factory.bin := append-image-stage initramfs-kernel.bin | \
check-size | iptime-crc32 ax2004m
DEVICE_VENDOR := ipTIME
DEVICE_MODEL := AX2004M
@@ -1464,7 +1464,7 @@ define Device/iptime_ax2004m
DEVICE_COMPAT_VERSION := 2.0
DEVICE_COMPAT_MESSAGE := NMBM has been newly enabled, and its flash block \
mapping might be incompatible with existing installation. \
- New installation via recovery mode is recommended.
+ New installation with factory image via recovery mode is recommended.
endef
TARGET_DEVICES += iptime_ax2004m
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
index 40a2fb61db..6151714145 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -33,6 +33,11 @@ platform_do_upgrade() {
fw_setenv --lock / bootImage 0 || exit 1
fi
;;
+ iptime,ax2004m)
+ if [ "$(fw_printenv -n boot_from 2>/dev/null)" != "firmware1" ]; then
+ fw_setenv boot_from firmware1 || exit 1
+ fi
+ ;;
mikrotik,ltap-2hnd|\
mikrotik,routerboard-750gr3|\
mikrotik,routerboard-760igs|\
More information about the lede-commits
mailing list