diff options
author | Pawel Dembicki <paweldembicki@gmail.com> | 2018-04-19 19:36:55 +0200 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-03-24 01:44:24 +0100 |
commit | 1f149fcad38677cc917d249e32b4b791cde95702 (patch) | |
tree | 4d082a6e2b1612cf1fda307ad86bca81dce1f060 /target/linux/ramips | |
parent | 5f40b519f3b211f440a8f96dc1ce9a1be60aa0c9 (diff) | |
download | upstream-1f149fcad38677cc917d249e32b4b791cde95702.tar.gz upstream-1f149fcad38677cc917d249e32b4b791cde95702.tar.bz2 upstream-1f149fcad38677cc917d249e32b4b791cde95702.zip |
firmware-utils: mkdlinkfw: add kernel image offset
Some boards with JBOOT have partiton between bootloader
and kernel image. This patch add possibility to change kernel
partition start address.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r-- | target/linux/ramips/image/Makefile | 2 | ||||
-rw-r--r-- | target/linux/ramips/image/mt7620.mk | 54 |
2 files changed, 23 insertions, 33 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 33c4f3132f..6eef596caf 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -114,6 +114,7 @@ define Build/mkdlinkfw -k $(IMAGE_KERNEL) \ -r $(IMAGE_ROOTFS) \ -o $@ \ + $(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \ -s $(DLINK_FIRMWARE_SIZE) endef @@ -122,6 +123,7 @@ define Build/mkdlinkfw-factory -m $(DLINK_ROM_ID) -f $(DLINK_FAMILY_MEMBER) \ -F $@ \ -o $@.new \ + $(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \ -s $(DLINK_FIRMWARE_SIZE) mv $@.new $@ endef diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 0098613c27..234b6df098 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -3,7 +3,7 @@ # DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION \ - DLINK_ROM_ID DLINK_FAMILY_MEMBER DLINK_FIRMWARE_SIZE + DLINK_ROM_ID DLINK_FAMILY_MEMBER DLINK_FIRMWARE_SIZE DLINK_IMAGE_OFFSET define Build/elecom-header cp $@ $(KDIR)/v_0.0.0.bin @@ -60,6 +60,15 @@ define Device/alfa-network_tube-e4g endef TARGET_DEVICES += alfa-network_tube-e4g +define Device/amit_jboot + DLINK_IMAGE_OFFSET := 0x10000 + KERNEL := $(KERNEL_DTB) + IMAGES += factory.bin + IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata + IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory + DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-usb-ohci +endef + define Device/Archer TPLINK_HWREVADD := 0 TPLINK_HVERSION := 3 @@ -182,60 +191,46 @@ endef TARGET_DEVICES += dir-810l define Device/dlink_dwr-116-a1 + $(Device/amit_jboot) DTS := DWR-116-A1 DEVICE_TITLE := D-Link DWR-116 A1/A2 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci jboot-tools DLINK_ROM_ID := DLK6E3803001 DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FIRMWARE_SIZE := 0x7E0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory endef TARGET_DEVICES += dlink_dwr-116-a1 define Device/dlink_dwr-118-a1 + $(Device/amit_jboot) DTS := DWR-118-A1 DEVICE_TITLE := D-Link DWR-118 A1 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci jboot-tools kmod-mt76x0e + DEVICE_PACKAGES += kmod-mt76x0e DLINK_ROM_ID := DLK6E3811001 DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory endef TARGET_DEVICES += dlink_dwr-118-a1 define Device/dlink_dwr-118-a2 + $(Device/amit_jboot) DTS := DWR-118-A2 DEVICE_TITLE := D-Link DWR-118 A2 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci jboot-tools + DEVICE_PACKAGES += kmod-mt76x2 DLINK_ROM_ID := DLK6E3814001 DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory endef TARGET_DEVICES += dlink_dwr-118-a2 define Device/dlink_dwr-921-c1 + $(Device/amit_jboot) DTS := DWR-921-C1 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := D-Link DWR-921 C1 DLINK_ROM_ID := DLK6E2414001 DLINK_FAMILY_MEMBER := 0x6E24 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory - DEVICE_PACKAGES := jboot-tools \ - kmod-usb2 kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + DEVICE_PACKAGES += kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi endef TARGET_DEVICES += dlink_dwr-921-c1 @@ -248,18 +243,14 @@ endef TARGET_DEVICES += dlink_dwr-921-c3 define Device/dlink_dwr-922-e2 + $(Device/amit_jboot) DTS := DWR-922-E2 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := D-Link DWR-922 E2 DLINK_ROM_ID := DLK6E2414005 DLINK_FAMILY_MEMBER := 0x6E24 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory - DEVICE_PACKAGES := jboot-tools \ - kmod-usb2 kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + DEVICE_PACKAGES += kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi endef TARGET_DEVICES += dlink_dwr-922-e2 @@ -430,16 +421,13 @@ endef TARGET_DEVICES += microwrt define Device/lava_lr-25g001 + $(Device/amit_jboot) DTS := LR-25G001 DEVICE_TITLE := LAVA LR-25G001 DLINK_ROM_ID := LVA6E3804001 DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory - DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-usb-ohci kmod-mt76x0e + DEVICE_PACKAGES += kmod-mt76x0e endef TARGET_DEVICES += lava_lr-25g001 |