summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-01-02 21:53:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-01-02 21:53:31 +0000
commited20caeb6538453f861baf8d5c17e5bdf9d25595 (patch)
treeb614d443f8cff7d033f8d3d94e3694437856ac71 /target
parent10c2bdbc4f49c2d0ecdf83721ea41b84c3a28336 (diff)
downloadmtk-20170518-ed20caeb6538453f861baf8d5c17e5bdf9d25595.zip
mtk-20170518-ed20caeb6538453f861baf8d5c17e5bdf9d25595.tar.gz
mtk-20170518-ed20caeb6538453f861baf8d5c17e5bdf9d25595.tar.bz2
ramips: fix image format for WSR-1166
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43812
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/image/Makefile20
-rw-r--r--target/linux/ramips/mt7621/config-3.141
2 files changed, 20 insertions, 1 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index c5478ce..7da1ffe 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -79,6 +79,17 @@ define MkImageSysupgrade/squashfs
fi
endef
+define MkImageTrx/squashfs
+ $(eval output_name=$(IMG_PREFIX)-$(2)-$(1)-$(if $(4),$(4),sysupgrade).bin)
+ $(STAGING_DIR_HOST)/bin/trx \
+ -o $(KDIR)/$(output_name) \
+ -m $(3) \
+ -f $(KDIR)/vmlinux-$(2).uImage \
+ -a 4 -f $(KDIR)/root.$(1)
+ $(call prepare_generic_squashfs,$(KDIR)/$(output_name))
+ $(CP) $(KDIR)/$(output_name) $(BIN_DIR)/$(output_name)
+endef
+
# $(1), lowercase board name like "mt7620a_v22sg"
# $(2), DTS filename without .dts extension
# $(3), optional filename suffix, e.g. "-initramfs"
@@ -108,6 +119,11 @@ define BuildFirmware/OF
$(call MkImageSysupgrade/$(1),$(1),$(2),$(4),$(6))
endef
+define BuildFirmware/OF/trx
+ $(call MkImageLzmaDtb,$(2),$(3),$(5))
+ $(call MkImageTrx/$(1),$(1),$(2),$(4),$(6))
+endef
+
# $(1), squashfs/initramfs
# $(2), lowercase board name
# $(3), DTS filename without .dts extension
@@ -136,6 +152,8 @@ BuildFirmware/Default4M/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(
ralink_default_fw_size_8M=8060928
BuildFirmware/Default8M/squashfs=$(call BuildFirmware/OF,$(1),$(2),$(3),$(ralink_default_fw_size_8M),$(4))
BuildFirmware/Default8M/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
+BuildFirmware/Trx8M/squashfs=$(call BuildFirmware/OF/trx,$(1),$(2),$(3),$(ralink_default_fw_size_8M),$(4))
+BuildFirmware/Trx8M/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
ralink_default_fw_size_16M=16121856
BuildFirmware/Default16M/squashfs=$(call BuildFirmware/OF,$(1),$(2),$(3),$(ralink_default_fw_size_16M),$(4))
@@ -827,7 +845,7 @@ endif
Image/Build/Profile/MT7621=$(call BuildFirmware/Default4M/$(1),$(1),mt7621,MT7621)
Image/Build/Profile/WSR-600=$(call BuildFirmware/Default4M/$(1),$(1),wsr-600,WSR-600)
-Image/Build/Profile/WSR-1166=$(call BuildFirmware/Default4M/$(1),$(1),wsr-1166,WSR-1166)
+Image/Build/Profile/WSR-1166=$(call BuildFirmware/Trx8M/$(1),$(1),wsr-1166,WSR-1166)
ifeq ($(SUBTARGET),mt7621)
define Image/Build/Profile/Default
diff --git a/target/linux/ramips/mt7621/config-3.14 b/target/linux/ramips/mt7621/config-3.14
index 70fe0cb..3f1bf67 100644
--- a/target/linux/ramips/mt7621/config-3.14
+++ b/target/linux/ramips/mt7621/config-3.14
@@ -120,6 +120,7 @@ CONFIG_MTD_M25P80=y
CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_UIMAGE_SPLIT=y
+CONFIG_MTD_SPLIT_TRX_FW=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NET_FLOW_LIMIT=y
CONFIG_NET_RALINK=y