diff options
author | Guodong Xu <guodong.xu@linaro.org> | 2014-06-20 15:01:05 +0800 |
---|---|---|
committer | Guodong Xu <guodong.xu@linaro.org> | 2014-06-20 15:01:05 +0800 |
commit | b6fe821a00f43b33d422bb84a133b9866029b6dc (patch) | |
tree | 69dd16bf30748a76c2634cad398c2a04a6a225fd | |
parent | 26cf50f1fa322f4b40c75217162233b3f21aa152 (diff) | |
parent | ed9f0f33a6b20dd096ee38ae1e72efec03e9b13a (diff) |
Merge branch 'tracking-hilt-zImage-dtb-combo' into integration-hilt-working-v3.14
* tracking-hilt-zImage-dtb-combo:
hip04-d01.dtb: append hip04-d01.dtb at build time
ARM: convert build of appended dtb zImage to list of dtbs
ARM: add config option to build zImage/dtb combo
-rw-r--r-- | arch/arm/Kconfig | 15 | ||||
-rw-r--r-- | arch/arm/Makefile | 5 | ||||
-rw-r--r-- | arch/arm/boot/.gitignore | 1 | ||||
-rw-r--r-- | arch/arm/boot/Makefile | 12 | ||||
-rw-r--r-- | arch/arm/boot/dts/Makefile | 11 | ||||
-rw-r--r-- | arch/arm/configs/hip04_defconfig | 2 | ||||
-rw-r--r-- | scripts/Makefile.lib | 6 |
7 files changed, 50 insertions, 2 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5b0cb17f10af..aefc4c887159 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1951,6 +1951,21 @@ config DEPRECATED_PARAM_STRUCT This was deprecated in 2001 and announced to live on for 5 years. Some old boot loaders still use this way. +config BUILD_ARM_APPENDED_DTB_IMAGE + bool "Build a concatenated zImage/dtb by default" + depends on OF + help + Enabling this option will cause a concatenated zImage and list of + DTBs to be built by default (instead of a standalone zImage.) + The image will built in arch/arm/boot/zImage-dtb + +config BUILD_ARM_APPENDED_DTB_IMAGE_NAMES + string "Default dtb names" + depends on BUILD_ARM_APPENDED_DTB_IMAGE + help + Space separated list of names of dtbs to append when + building a concatenated zImage-dtb. + # Compressed boot loader in ROM. Yes, we really want to ask about # TEXT and BSS so we preserve their values in the config files. config ZBOOT_ROM_TEXT diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 9a4fae86e19a..d84e76e30715 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -277,6 +277,8 @@ libs-y := arch/arm/lib/ $(libs-y) # Default target when executing plain make ifeq ($(CONFIG_XIP_KERNEL),y) KBUILD_IMAGE := xipImage +else ifeq ($(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE),y) +KBUILD_IMAGE := zImage-dtb else KBUILD_IMAGE := zImage endif @@ -314,6 +316,9 @@ PHONY += dtbs dtbs: scripts $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) dtbs +zImage-dtb: vmlinux scripts dtbs + $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ + # We use MRPROPER_FILES and CLEAN_FILES now archclean: $(Q)$(MAKE) $(clean)=$(boot) diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore index 3c79f85975aa..ad7a0253ea96 100644 --- a/arch/arm/boot/.gitignore +++ b/arch/arm/boot/.gitignore @@ -4,3 +4,4 @@ xipImage bootpImage uImage *.dtb +zImage-dtb
\ No newline at end of file diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index ec2f8065f955..a30beab472e6 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -27,6 +27,14 @@ export ZRELADDR INITRD_PHYS PARAMS_PHYS targets := Image zImage xipImage bootpImage uImage +DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES)) +ifneq ($(DTB_NAMES),) +DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES)) +else +DTB_LIST := $(dtb-y) +endif +DTB_OBJS := $(addprefix $(obj)/dts/,$(DTB_LIST)) + ifeq ($(CONFIG_XIP_KERNEL),y) $(obj)/xipImage: vmlinux FORCE @@ -55,6 +63,10 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy) @$(kecho) ' Kernel: $@ is ready' +$(obj)/zImage-dtb: $(obj)/zImage $(DTB_OBJS) FORCE + $(call if_changed,cat) + @echo ' Kernel: $@ is ready' + endif ifneq ($(LOADADDR),) diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index c2e1049b2fc1..8912f04cd6fb 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -324,13 +324,20 @@ dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \ zynq-zc706.dtb \ zynq-zed.dtb +DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES)) +ifneq ($(DTB_NAMES),) +DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES)) +else +DTB_LIST := $(dtb-y) +endif + targets += dtbs -targets += $(dtb-y) +targets += $(DTB_LIST) endif # *.dtb used to be generated in the directory above. Clean out the # old build results so people don't accidentally use them. -dtbs: $(addprefix $(obj)/, $(dtb-y)) +dtbs: $(addprefix $(obj)/, $(DTB_LIST)) $(Q)rm -f $(obj)/../*.dtb clean-files := *.dtb diff --git a/arch/arm/configs/hip04_defconfig b/arch/arm/configs/hip04_defconfig index 0b30c7093b3b..3b545d0a5fd4 100644 --- a/arch/arm/configs/hip04_defconfig +++ b/arch/arm/configs/hip04_defconfig @@ -17,6 +17,8 @@ CONFIG_MCPM=y CONFIG_MCPM_QUAD_CLUSTER=y CONFIG_PREEMPT=y CONFIG_AEABI=y +CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y +CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="hip04-d01" CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 79c059e70860..85c0e97b2238 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -274,6 +274,12 @@ $(obj)/%.dtb: $(src)/%.dts FORCE dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) +# cat +# --------------------------------------------------------------------------- +# Concatentate multiple files together +quiet_cmd_cat = CAT $@ +cmd_cat = (cat $(filter-out FORCE,$^) > $@) || (rm -f $@; false) + # Bzip2 # --------------------------------------------------------------------------- |