Revert "ARM: convert build of appended dtb zImage to list of dtbs"
authorJohn Stultz <john.stultz@linaro.org>
Wed, 8 May 2013 20:50:33 +0000 (13:50 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Fri, 18 Oct 2013 02:43:12 +0000 (19:43 -0700)
This reverts commit 5e9468632ea81e7d17fc9bd4457acbaffda7b370.

Tixy was seeing trouble with "make dtbs" and "make my-boards.dtb",
and found reverting this resolves the issue. So for now lets
revert this.

Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/boot/.gitignore
arch/arm/boot/Makefile
arch/arm/boot/dts/Makefile
scripts/Makefile.lib

index 99887aaa04bb06c6d8d5774c3ae8d884f57661a0..351e48e45cbb54830711caea8f51fd6ad4223fac 100644 (file)
@@ -1861,16 +1861,16 @@ 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
+         Enabling this option will cause a concatenated zImage and DTB to
+         be built by default (instead of a standalone zImage.)  The image
+         will built in arch/arm/boot/zImage-dtb.<dtb name>
 
-config BUILD_ARM_APPENDED_DTB_IMAGE_NAMES
-       string "Default dtb names"
+config BUILD_ARM_APPENDED_DTB_IMAGE_NAME
+       string "Default dtb name"
        depends on BUILD_ARM_APPENDED_DTB_IMAGE
        help
-         Space separated list of names of dtbs to append when
-         building a concatenated zImage-dtb.
+         name of the dtb 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.
index 314c7be492a9b919025c359085ea6ac16c6621a7..883e4bec807fe3614a767de19b21783e93b11cfd 100644 (file)
@@ -265,7 +265,7 @@ libs-y                              := arch/arm/lib/ $(libs-y)
 ifeq ($(CONFIG_XIP_KERNEL),y)
 KBUILD_IMAGE := xipImage
 else ifeq ($(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE),y)
-KBUILD_IMAGE := zImage-dtb
+KBUILD_IMAGE := zImage-dtb.$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAME)
 else
 KBUILD_IMAGE := zImage
 endif
@@ -297,9 +297,6 @@ zinstall uinstall install: vmlinux
 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)
index ad7a0253ea961a405fb13bb284bd1c5942e28675..3c79f85975aaa26c7c2e353fefc54d71d89bc5bf 100644 (file)
@@ -4,4 +4,3 @@ xipImage
 bootpImage
 uImage
 *.dtb
-zImage-dtb
\ No newline at end of file
index 3310df3a0569070f99acc2ed7f9f53f347273c32..84aa2caf07ed203fb810220258401a1b51f7cab3 100644 (file)
@@ -27,14 +27,6 @@ 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
@@ -63,10 +55,6 @@ $(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),)
index b83cc5083a2c618b4aaf6c3c6d35e982450e2586..f0895c581a89be8668a99db10e6873ae94be0cef 100644 (file)
@@ -210,20 +210,13 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
        wm8850-w70v2.dtb
 dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.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_LIST)
+targets += $(dtb-y)
 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_LIST))
+dtbs: $(addprefix $(obj)/, $(dtb-y))
        $(Q)rm -f $(obj)/../*.dtb
 
 clean-files := *.dtb
index ef2142a6159319f2bdf5f153bf7f551a937a2168..bd161eff6921ff4b0ddfa92645d57a72ee3fd59b 100644 (file)
@@ -273,11 +273,17 @@ $(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)
+$(obj)/%.dtb: $(src)/%.dts FORCE
+       $(call if_changed_dep,dtc)
+
+dtc-tmp = $(subst $(comma),_,$(dot-target).dts)
+
+quiet_cmd_dtc_cpp = DTC+CPP $@
+cmd_dtc_cpp = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
+       $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) $(dtc-tmp)
+
+$(obj)/%.dtb: $(src)/%.dtsp FORCE
+       $(call if_changed_dep,dtc_cpp)
 
 # Bzip2
 # ---------------------------------------------------------------------------