diff options
author | INAGAKI Hiroshi <musashino.open@gmail.com> | 2019-09-25 03:02:04 +0900 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-02-05 17:03:21 +0100 |
commit | be4d53bf69b63f0534fba37fad56dcf4c6de3e5c (patch) | |
tree | ca0cead4bd48ae3cd4fafadb42ff2bf5ee74b980 /target/linux | |
parent | 5f5ec7660ca26d5637c77f45d88c2e2eb35d3bb1 (diff) | |
download | upstream-be4d53bf69b63f0534fba37fad56dcf4c6de3e5c.tar.gz upstream-be4d53bf69b63f0534fba37fad56dcf4c6de3e5c.tar.bz2 upstream-be4d53bf69b63f0534fba37fad56dcf4c6de3e5c.zip |
ramips: extend and rename wr1201-factory-header
This commit adds the ability to set custom uImage magic to
Build/wr1201-factory-header and renames it to
"Build/custom-initramfs-uimage".
Custom uImage header in initramfs image is required on following
devices:
- I-O DATA WN-AX1167GR2
- I-O DATA WN-AX2033GR
- I-O DATA WN-AX2033GR2
- I-O DATA WN-DX1167R
While at it, fix typo in comment.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
[shorten commit title, minor commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ramips/image/mt7621.mk | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 6d0af9d994..ae83501c9d 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -7,6 +7,21 @@ include ./common-tp-link.mk DEFAULT_SOC := mt7621 KERNEL_DTB += -d21 +DEVICE_VARS += UIMAGE_MAGIC + +# The OEM webinterface expects an kernel with initramfs which has the uImage +# header field ih_name. +# We don't want to set the header name field for the kernel include in the +# sysupgrade image as well, as this image shouldn't be accepted by the OEM +# webinterface. It will soft-brick the board. +define Build/custom-initramfs-uimage + mkimage -A $(LINUX_KARCH) \ + -O linux -T kernel \ + -C lzma -a $(KERNEL_LOADADDR) $(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC),) \ + -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + -n '$(1)' -d $@ $@.new + mv $@.new $@ +endef define Build/elecom-gst-factory $(eval product=$(word 1,$(1))) @@ -74,19 +89,6 @@ define Build/ubnt-erx-factory-image fi endef -# The OEM webinterface expects an kernel with initramfs which has the uImage -# header field ih_name. -# We don't wan't to set the header name field for the kernel include in the -# sysupgrade image as well, as this image shouldn't be accepted by the OEM -# webinterface. It will soft-brick the board. -define Build/wr1201-factory-header - mkimage -A $(LINUX_KARCH) \ - -O linux -T kernel \ - -C lzma -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -n 'WR1201_8_128' -d $@ $@.new - mv $@.new $@ -endef - define Device/afoundry_ew1200 IMAGE_SIZE := 16064k DEVICE_VENDOR := AFOUNDRY @@ -466,7 +468,7 @@ define Device/mtc_wr1201 IMAGE_SIZE := 16000k DEVICE_VENDOR := MTC DEVICE_MODEL := Wireless Router WR1201 - KERNEL_INITRAMFS := $(KERNEL_DTB) | wr1201-factory-header + KERNEL_INITRAMFS := $(KERNEL_DTB) | custom-initramfs-uimage WR1201_8_128 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ kmod-usb-ledtrig-usbport wpad-basic endef |