summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/image
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2014-08-21 11:28:59 +0000
committerJonas Gorski <jogo@openwrt.org>2014-08-21 11:28:59 +0000
commit51e1f1476f74d6788b106a066dfebd8ec6ac1bd9 (patch)
tree7c4c7f82270f65d0c10000a8f240e88f0d270235 /target/linux/brcm63xx/image
parentb339304425b63073e8757cf104621279a5a38b5d (diff)
downloadmtk-20170518-51e1f1476f74d6788b106a066dfebd8ec6ac1bd9.zip
mtk-20170518-51e1f1476f74d6788b106a066dfebd8ec6ac1bd9.tar.gz
mtk-20170518-51e1f1476f74d6788b106a066dfebd8ec6ac1bd9.tar.bz2
brcm63xx: Add DT support for P870HW-51anearest-from-mtk-20170518
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> [jogo: fix nvram partition offset] Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 42248
Diffstat (limited to 'target/linux/brcm63xx/image')
-rwxr-xr-xtarget/linux/brcm63xx/image/Makefile50
1 files changed, 34 insertions, 16 deletions
diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
index b56e27d..a9d938f 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -57,6 +57,20 @@ define Image/Build/CFEDTB
$(7) $(8) $(9) $(10)
endef
+define Image/Build/ZYXCFEDTB
+ # Generate the tagged image
+ $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f $(KDIR)/root.$(1) \
+ --output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
+ --boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
+ --load-addr $(LOADADDR) --rsa-signature "$(6)" \
+ --info1 "-$(call Image/LimitName16,$(5))" --info2 $(1) \
+ $(7) $(8) $(9) $(10)
+ # Fix up header
+ $(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
+ -o $(BIN_DIR)/openwrt-$(5)-$(1)-zyxcfe.bin
+ rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp
+endef
+
define Image/Build/CFEAGPF
# Generate the tagged image
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
@@ -99,20 +113,6 @@ define Image/Build/SPW303V
rm -f $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp
endef
-define Image/Build/ZyXEL
- # Generate the tagged image
- $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
- --output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
- --boardid $(2) --chipid $(4) --entry $(KERNEL_ENTRY) \
- --load-addr $(LOADADDR) --rsa-signature "$(6)" \
- --info1 "+$(call Image/LimitName16,$(3))" --info2 $(1) \
- $(7) $(8) $(9) $(10)
- # Fix up header
- $(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
- -o $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin
- rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp
-endef
-
define Image/Build/CFEOLD
$(TOPDIR)/scripts/brcmImage.pl -t -p \
-b $(2) -c $(3) \
@@ -212,6 +212,24 @@ define CfeImageDTB
TARGET_$(1)_IMAGES += $(5)
endef
+# $(1) = Profile
+# $(2) = dtb
+# $(3) = boardname
+# $(4) = chipid
+# $(5) = imagename
+# $(6) = rsa signature
+# $(7) = additional options
+define ZyxCfeImageDTB
+ define Image/Build/$(5)
+ $$(call Image/Build/ZYXCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6),$(7))
+ endef
+
+ TARGET_Default_DTBS += $(2)
+ TARGET_Default_IMAGES += $(5)
+ TARGET_$(1)_DTBS += $(2)
+ TARGET_$(1)_IMAGES += $(5)
+endef
+
define Image/Build
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
@@ -252,8 +270,6 @@ define Image/Build
$(call Image/Build/CFE,$(1),RTA1025W_16,6348,RTA1025W_16,,--layoutver 5)
# RTA1320_16M (numerous routers)
$(call Image/Build/CFE,$(1),RTA1320_16M,6338,RTA1320_16M,,--layoutver 5)
- # Zyxel P870HW-51a v2
- $(call Image/Build/ZyXEL,$(1),96368VVW,P870HW-51a_v2,6368,P870HW-51a_v2,ZyXEL,--signature "ZyXEL_0001")
# Sagem F@ST2504n
$(call Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION))
@@ -373,5 +389,7 @@ $(eval $(call CfeImageDTB,Neufbox4,nb4-ser-r0,96358VW,6358,NEUFBOX4-SER,OpenWRT-
$(eval $(call CfeImageDTB,Neufbox4,nb4-fxc-r1,96358VW,6358,NEUFBOX4-FXC,OpenWRT-$(REVISION)))
# SFR neufbox 6
$(eval $(call CfeImageDTB,Neufbox6,nb6-ser-r0,NB6-SER-r0,6362,NEUFBOX6,OpenWRT-$(REVISION)))
+# ZyXEL P870HW-51a v2
+$(eval $(call ZyxCfeImageDTB,P870HW_51a_v2,p870hw-51a-v2,96368VVW,6368,P870HW-51a_v2,ZyXEL,--signature "ZyXEL_0001"))
$(eval $(call BuildImage))