diff options
author | Alan Luck <luckyhome2008@gmail.com> | 2021-04-20 19:44:01 +1000 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2021-09-24 12:32:28 +0200 |
commit | 2c9a07ed28e87bbe2d221d48aaa19b04672646a5 (patch) | |
tree | cbc9a4e4de214c8a1ac9426789e14840a6f4c13e /target/linux/ramips | |
parent | 5269c47e8db549695ceaf6a19afdd0cb90074622 (diff) | |
download | upstream-2c9a07ed28e87bbe2d221d48aaa19b04672646a5.tar.gz upstream-2c9a07ed28e87bbe2d221d48aaa19b04672646a5.tar.bz2 upstream-2c9a07ed28e87bbe2d221d48aaa19b04672646a5.zip |
ramips: add missing information to dlink headers
Add additional header information required for newer
bootloaders found on DIR-2660-A1 & A2.
Also remove the MTD splitter compatible from the second firmware
partition, as OpenWrt only supports handling of the first one.
Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
[rephrase commit message, remove removal of read-only flags]
Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r-- | target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi | 2 | ||||
-rw-r--r-- | target/linux/ramips/image/Makefile | 6 | ||||
-rw-r--r-- | target/linux/ramips/image/mt7621.mk | 11 |
3 files changed, 11 insertions, 8 deletions
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi index a1550cfb40..9dcc050af2 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -102,8 +102,6 @@ partition@4980000 { label = "firmware2"; - compatible = "openwrt,uimage", "denx,uimage"; - openwrt,padding = <96>; reg = <0x4980000 0x2800000>; }; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 3671caef9d..d523a62e0b 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -144,6 +144,12 @@ define Build/uimage-padhdr mv $@.new $@ endef +define Build/uimage-sgehdr + uimage_sgehdr -i $@ -o $@.new -m $(DEVICE_MODEL) \ + -h $(DEVICE_VARIANT) -s V1.00000 + mv $@.new $@ +endef + define Build/umedia-header fix-u-media-header -T 0x46 -B $(1) -i $@ -o $@.new && mv $@.new $@ endef diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index c115d04bd6..6e7391baef 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -286,12 +286,11 @@ define Device/dlink_dir-8xx-a1 IMAGE_SIZE := 16000k DEVICE_VENDOR := D-Link DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware - KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr 96 + KERNEL := $$(KERNEL) | uimage-sgehdr IMAGES += factory.bin - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\ - pad-rootfs | check-size | append-metadata - IMAGE/factory.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\ - check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ + check-size | append-metadata + IMAGE/factory.bin := append-kernel | append-rootfs | check-size endef define Device/dlink_dir-8xx-r1 @@ -314,7 +313,7 @@ define Device/dlink_dir-xx60-a1 DEVICE_VENDOR := D-Link DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \ kmod-usb-ledtrig-usbport - KERNEL := $$(KERNEL) | uimage-padhdr 96 + KERNEL := $$(KERNEL) | uimage-sgehdr IMAGES += factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ |