lkml.org 
[lkml]   [2012]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH V7 3/7] arm64: use new common dtc rule
On Tue, Nov 27, 2012 at 11:29:12PM +0000, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> The current rules have the .dtb files build in a different directory
> from the .dts files. This patch changes arm64 to use the generic dtb
> rule which builds .dtb files in the same directory as the source .dts.
>
> This requires moving parts of arch/arm64/boot/Makefile into newly created
> arch/arm64/boot/dts/Makefile, and updating arch/arm64/Makefile to call the
> new Makefile.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Stephen Warren <swarren@nvidia.com>

I had a bit more clean-up in a local patch (see attached). Depending on
the timing, you can just fold it into your patch (basically removing the
MACHINE argument, adding KBUILD_DTBS and dtbs target help). It's been
derived from your arch/arm patch anyway ;).

--
CatalinFrom 906ea5523f1a5c2fadea72b54d5d6a8e5fecdfe5 Mon Sep 17 00:00:00 2001
From: Catalin Marinas <catalin.marinas@arm.com>
Date: Wed, 21 Nov 2012 11:44:59 +0000
Subject: [PATCH] arm64: Add dtbs target for building all the enabled dtb
files

Based on Rob Herring's patches for arch/arm, this patch adds a dtbs
target to arch/arm64/boot/Makefile.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
arch/arm64/Makefile | 17 +++++++++++------
arch/arm64/boot/.gitignore | 1 +
arch/arm64/boot/Makefile | 6 ++++++
3 files changed, 18 insertions(+), 6 deletions(-)
create mode 100644 arch/arm64/boot/dts/Makefile

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 93e871e..ddadd27 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -42,20 +42,24 @@ libs-y := arch/arm64/lib/ $(libs-y)
libs-y += $(LIBGCC)

# Default target when executing plain make
-KBUILD_IMAGE := Image.gz
+KBUILD_IMAGE := Image.gz
+KBUILD_DTBS := dtbs

-all: $(KBUILD_IMAGE)
+all: $(KBUILD_IMAGE) $(KBUILD_DTBS)

boot := arch/arm64/boot

Image Image.gz: vmlinux
- $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
+ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

zinstall install: vmlinux
- $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
+ $(Q)$(MAKE) $(build)=$(boot) $@

-%.dtb:
- $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
+%.dtb: scripts
+ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+
+dtbs: scripts
+ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

# We use MRPROPER_FILES and CLEAN_FILES now
archclean:
@@ -64,6 +68,7 @@ archclean:
define archhelp
echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
+ echo '* dtbs - Build device tree blobs for enabled boards'
echo ' install - Install uncompressed kernel'
echo ' zinstall - Install compressed kernel'
echo ' Install using (your) ~/bin/installkernel or'
diff --git a/arch/arm64/boot/.gitignore b/arch/arm64/boot/.gitignore
index 8dab0bb..98af90a 100644
--- a/arch/arm64/boot/.gitignore
+++ b/arch/arm64/boot/.gitignore
@@ -1,2 +1,3 @@
Image
Image.gz
+*.dtb
diff --git a/arch/arm64/boot/Makefile b/arch/arm64/boot/Makefile
index 20048be..ce8642e 100644
--- a/arch/arm64/boot/Makefile
+++ b/arch/arm64/boot/Makefile
@@ -14,6 +14,8 @@
# Based on the ia64 boot/Makefile.
#

+include $(srctree)/arch/arm64/boot/dts/Makefile
+
targets := Image Image.gz

$(obj)/Image: vmlinux FORCE
@@ -22,6 +24,10 @@ $(obj)/Image: vmlinux FORCE
$(obj)/Image.gz: $(obj)/Image FORCE
$(call if_changed,gzip)

+targets += $(dtb-y)
+
+$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
+
install: $(obj)/Image
$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
$(obj)/Image System.map "$(INSTALL_PATH)"
diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
new file mode 100644
index 0000000..e69de29
\
 
 \ /
  Last update: 2012-11-29 16:01    [W:0.238 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site