aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/image/Makefile
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-02-27 17:39:07 +0000
committerJonas Gorski <jogo@openwrt.org>2015-02-27 17:39:07 +0000
commit36ce877190c577a0a9b66259eef35aa4261a71e2 (patch)
tree9f10ef5f94e68410af16e67e608b065fbe4dccf0 /target/linux/brcm63xx/image/Makefile
parent84d3d8799f258cfa4ca7586142d30324f733cef1 (diff)
downloadmaster-187ad058-36ce877190c577a0a9b66259eef35aa4261a71e2.tar.gz
master-187ad058-36ce877190c577a0a9b66259eef35aa4261a71e2.tar.bz2
master-187ad058-36ce877190c577a0a9b66259eef35aa4261a71e2.zip
brcm63xx: use dtb for cvg834g
Add a dtsi for bcm3368, add a dts and profile for cvg834g, and convert it to use ImageDTB. Since HCS requires more arguments, enhance the max arguments of the call. The image name is intentionally left blank to prevent non-initramfs images to be built, as they currently contain no rootfs and consequently won't work. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44561 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/image/Makefile')
-rwxr-xr-xtarget/linux/brcm63xx/image/Makefile33
1 files changed, 19 insertions, 14 deletions
diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
index 4c56693038..e7b633bfa4 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -103,9 +103,9 @@ define Image/Build/RedBootDTB
dd if=$(KDIR)/vmlinux-$(3).bin.gz of=$(BIN_DIR)/openwrt-$(2)-vmlinux.gz bs=65536 conv=sync
endef
-define Image/Build/HCS
- $(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_byte=$(3) \
- --rev_maj=$(4) --rev_min=$(5) --input_file=$(6) \
+define Image/Build/HCSDTB
+ $(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_byte=$(4) \
+ --rev_maj=$(5) --rev_min=$(6) --input_file=$(KDIR)/$(7) \
--output_file=$(BIN_DIR)/openwrt-$(2)-$(1).bin
endef
@@ -122,10 +122,10 @@ define Image/PrepareLoader
$(MAKE) -C lzma-loader \
$(LOADER_MAKEOPTS) \
BUILD_DIR="$(KDIR)" \
- TARGET_DIR="$(BIN_DIR)" \
+ TARGET_DIR="$(2)" \
LOADER_DATA="$(KDIR)/vmlinux$(1).lzma" \
- LOADER=$(IMG_PREFIX)-loader$(1).elf \
- compile loader.elf
+ LOADER=$(IMG_PREFIX)-loader$(1) \
+ compile $(3)
rm -f $(KDIR)/vmlinux$(1).lzma
endef
@@ -133,7 +133,7 @@ endef
define Image/PrepareLoaderDTB
# append dtb to vmlinux, then build a standard LZMA loader
cat $(KDIR)/vmlinux$(1) $(DTS_DIR)/$(2).dtb > $(KDIR)/vmlinux$(1)-$(2)
- $(call Image/PrepareLoader,$(1)-$(2))
+ $(call Image/PrepareLoader,$(1)-$(2),$(3),$(4))
endef
define Image/PrepareCFELzmaKernel
@@ -162,14 +162,20 @@ define Image/Prepare
$(foreach board,$(sort $(TARGET_$(PROFILE)_DTBS)), $(call Image/PrepareCFELzmaKernelDTB,$(board)))
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- $(call Image/PrepareLoader,-initramfs)
- $(foreach board,$(sort $(TARGET_$(PROFILE)_DTBS)), $(call Image/PrepareLoaderDTB,-initramfs,$(board)))
+ $(call Image/PrepareLoader,-initramfs,$(BIN_DIR),loader.elf)
+ $(foreach board,$(sort $(TARGET_$(PROFILE)_DTBS)), \
+ $(call Image/PrepareLoaderDTB,-initramfs,$(board),$(BIN_DIR),loader.elf))
+ ifneq (,$(findstring cvg834g,$(TARGET_$(PROFILE)_DTBS)))
+ $(call Image/PrepareLoaderDTB,-initramfs,cvg834g,$(KDIR),loader.bin)
+ endif
endif
endef
define Image/Build/Initramfs
# Netgear CVG834G
- $(call Image/Build/HCS,initramfs,cvg834g,a020,0001,0022,$(KDIR)/vmlinux-initramfs)
+ ifneq (,$(findstring cvg834g,$(TARGET_$(PROFILE)_DTBS)))
+ $(call Image/Build/HCSDTB,initramfs,cvg834g,cvg834g,a020,0001,0022,$(IMG_PREFIX)-loader-initramfs-cvg834g.bin)
+ endif
endef
# $(1) = Image build
@@ -181,7 +187,7 @@ endef
# $(7) = additional options
define ImageDTB
define Image/Build/$(3)
- $$(call Image/Build/$(1),$$(1),$(3),$(4),$(5),$(6),$(7))
+ $$(call Image/Build/$(1),$$(1),$(3),$(4),$(5),$(6),$(7),$(8))
endef
TARGET_Default_DTBS += $(4)
@@ -200,9 +206,6 @@ define Image/Build
# RTA1320_16M (numerous routers)
$(call Image/Build/CFE,$(1),RTA1320_16M,6338,RTA1320_16M,,--layoutver 5)
- # Netgear CVG834G
- $(call Image/Build/HCS,$(1),cvg834g,a020,0001,0022,$(KDIR)/vmlinux)
-
# build dtb image list
$(foreach image,$(TARGET_$(PROFILE)_IMAGES),$(call Image/Build/$(image),$(1)))
@@ -295,6 +298,8 @@ $(eval $(call ImageDTB,CFEDTB,HG556a_AB,HG556a_B,hg556a-b,HW556,6358,--rsa-signa
$(eval $(call ImageDTB,CFEDTB,HG556a_C,HG556a_C,hg556a-c,HW556,6358,--rsa-signature "EchoLife_HG556a" --image-offset 0x20000 --block-size 0x20000 --tag-version 8))
# Inventel Livebox 1
$(eval $(call ImageDTB,RedBootDTB,Livebox,livebox,livebox-blue-5g))
+# Netgear CVG834G
+$(eval $(call ImageDTB,HCSDTB,CVG834G,,cvg834g,a020,0001,0022,vmlinux-cvg834g))
# Netgear DG834GT/PN
$(eval $(call ImageDTB,CFEDTB,DG834GTPN,DG834GT_PN,dg834gtpn,96348GW-10,6348))
# Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0