diff options
author | Sungbo Eo <mans0n@gorani.run> | 2020-02-07 20:26:05 +0900 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-02-11 15:13:52 +0100 |
commit | be3e98ce26da5e737744427e1d59dd1c0508edef (patch) | |
tree | f6b2f91459f331fc7eb2ad2feb9c3e0cefeeae7e /target/linux | |
parent | fb99ac6807f29eb5fe50271eff711e7415038731 (diff) | |
download | upstream-be3e98ce26da5e737744427e1d59dd1c0508edef.tar.gz upstream-be3e98ce26da5e737744427e1d59dd1c0508edef.tar.bz2 upstream-be3e98ce26da5e737744427e1d59dd1c0508edef.zip |
ramips: append tail to WF2881 initramfs image
Stock firmware has a vendor-defined tail at the end of uImage for image
validation. This patch enables OpenWrt installation from stock firmware
without having to access the UART console.
Installation via web interface:
1. Flash **initramfs** image through the stock web interface.
2. Boot into OpenWrt and perform sysupgrade with sysupgrade image.
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ramips/image/mt7621.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 878d70c98e..4c27cdbd31 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -81,6 +81,12 @@ define Build/iodata-mstc-header ) endef +define Build/netis-tail + echo -n $(1) >> $@ + echo -n $(UIMAGE_NAME)-yun | $(STAGING_DIR_HOST)/bin/mkhash md5 | \ + sed 's/../\\\\x&/g' | xargs echo -ne >> $@ +endef + define Build/ubnt-erx-factory-image if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \ echo '21001:6' > $(1).compat; \ @@ -631,6 +637,8 @@ define Device/netis_wf2881 KERNEL_SIZE := 4096k IMAGE_SIZE := 129280k UBINIZE_OPTS := -E 5 + UIMAGE_NAME := WF2881_0.0.00 + KERNEL_INITRAMFS := $(KERNEL_DTB) | netis-tail WF2881 | uImage lzma IMAGES += factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \ |