summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Krzak2025-05-22 16:36:38 +0000
committerHauke Mehrtens2025-08-21 20:48:48 +0000
commit124f61eddbdc668ef5fc709b90510278f041bb64 (patch)
tree7bd73381ad7a217b05bdaecdc02287b85c3b70b4
parent05db6b3c5aa1eebbaf510f9954f2c7d2bb7a0963 (diff)
downloadopenwrt-124f61eddbdc668ef5fc709b90510278f041bb64.tar.gz
mediatek: filogic: D-Link M30/M60: include initramfs in recovery
Currently, if OEM recovery flashes OpenWrt to second ubi1, OpenWrt cannot boot. With this commit, recovery image is built with initramfs kernel, so that it can boot from either ubi or ubi1. This adds an extra step to OpenWrt installation from OEM: user needs to sysupgrade from initramfs to full system. Signed-off-by: Mateusz Krzak <kszaquitto+github@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18878 (cherry picked from commit 6615c8cfc85f1373cf93a9fc08cb1cb3bbefc964) Signed-off-by: Mateusz Krzak <kszaquitto+github@gmail.com> Link: https://github.com/openwrt/openwrt/pull/19595 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/mediatek/image/filogic.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index ab5a2b7c87..38db49c692 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -860,7 +860,10 @@ define Device/dlink_aquila-pro-ai-m30-a1
IMAGES += recovery.bin
IMAGE_SIZE := 51200k
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
- IMAGE/recovery.bin := sysupgrade-tar | pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E6110001 \x6A\x28\xEE\x0B \x00\x00\x2C\x00 \x00\x00\x20\x03 \x61\x6E
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ IMAGE/recovery.bin := append-image-stage initramfs-kernel.bin | sysupgrade-tar kernel=$$$$@ |\
+ pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E6110001 \x6A\x28\xEE\x0B \x00\x00\x2C\x00 \x00\x00\x20\x03 \x61\x6E
+endif
endef
TARGET_DEVICES += dlink_aquila-pro-ai-m30-a1
@@ -874,7 +877,10 @@ define Device/dlink_aquila-pro-ai-m60-a1
IMAGES += recovery.bin
IMAGE_SIZE := 51200k
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
- IMAGE/recovery.bin := sysupgrade-tar | pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E8202001 \x30\x6C\x19\x0C \x00\x00\x2C\x00 \x00\x00\x20\x03 \x82\x6E
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ IMAGE/recovery.bin := append-image-stage initramfs-kernel.bin | sysupgrade-tar kernel=$$$$@ |\
+ pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E8202001 \x30\x6C\x19\x0C \x00\x00\x2C\x00 \x00\x00\x20\x03 \x82\x6E
+endif
endef
TARGET_DEVICES += dlink_aquila-pro-ai-m60-a1