summaryrefslogtreecommitdiff
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
commit9a65e1a5706a9ae9ed45761fa78c863e5b811642 (patch)
tree6acd33fb69d26f74004c234885ff6ecc6f6a6695 /target/linux/brcm63xx/image/Makefile
parent69b327247ca2e9a9b1c9ee8daafaccc507a165c3 (diff)
downloadmtk-20170518-9a65e1a5706a9ae9ed45761fa78c863e5b811642.zip
mtk-20170518-9a65e1a5706a9ae9ed45761fa78c863e5b811642.tar.gz
mtk-20170518-9a65e1a5706a9ae9ed45761fa78c863e5b811642.tar.bz2
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> SVN-Revision: 44561
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 4c56693..e7b633b 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