brcm63xx: add helpers for building cfe images with dtb
Add a helper for building images with dtb appended kernels. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42122 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
ac01f9dc1d
commit
a030157d76
|
@ -33,6 +33,8 @@ endef
|
||||||
|
|
||||||
TARGET_DTBS:=
|
TARGET_DTBS:=
|
||||||
|
|
||||||
|
TARGET_IMAGES:=
|
||||||
|
|
||||||
define Image/Build/CFE
|
define Image/Build/CFE
|
||||||
# Generate the tagged image
|
# Generate the tagged image
|
||||||
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
|
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
|
||||||
|
@ -43,6 +45,16 @@ define Image/Build/CFE
|
||||||
$(6) $(7) $(8) $(9)
|
$(6) $(7) $(8) $(9)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Image/Build/CFEDTB
|
||||||
|
# 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)-cfe.bin \
|
||||||
|
--boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
|
||||||
|
--load-addr $(LOADADDR) --rsa-signature "$(6)" \
|
||||||
|
--info1 "-$(call Image/LimitName16,$(5))" --info2 $(1) \
|
||||||
|
$(7) $(8) $(9) $(10)
|
||||||
|
endef
|
||||||
|
|
||||||
define Image/Build/CFEFIXUP
|
define Image/Build/CFEFIXUP
|
||||||
# Generate the tagged image
|
# Generate the tagged image
|
||||||
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
|
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
|
||||||
|
@ -208,6 +220,15 @@ define Image/Build/Initramfs
|
||||||
$(call Image/Build/HCS,initramfs,cvg834g,a020,0001,0022,$(KDIR)/vmlinux-initramfs)
|
$(call Image/Build/HCS,initramfs,cvg834g,a020,0001,0022,$(KDIR)/vmlinux-initramfs)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define CfeImageDTB
|
||||||
|
define Image/Build/$(4)
|
||||||
|
$$(call Image/Build/CFEDTB,$$(1),$(1),$(2),$(3),$(4),$(5),$(6))
|
||||||
|
endef
|
||||||
|
|
||||||
|
TARGET_DTBS += $(1)
|
||||||
|
TARGET_IMAGES += $(4)
|
||||||
|
endef
|
||||||
|
|
||||||
define Image/Build
|
define Image/Build
|
||||||
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
|
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
|
||||||
# Various routers
|
# Various routers
|
||||||
|
@ -359,6 +380,9 @@ define Image/Build
|
||||||
# Netgear CVG834G
|
# Netgear CVG834G
|
||||||
$(call Image/Build/HCS,$(1),cvg834g,a020,0001,0022,$(KDIR)/vmlinux)
|
$(call Image/Build/HCS,$(1),cvg834g,a020,0001,0022,$(KDIR)/vmlinux)
|
||||||
|
|
||||||
|
# build dtb image list
|
||||||
|
$(foreach image,$(TARGET_IMAGES),$(call Image/Build/$(image),$(1)))
|
||||||
|
|
||||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||||
$(call Image/Build/Initramfs)
|
$(call Image/Build/Initramfs)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue