lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  8 Oct 2015 12:53:44 -0500
From:	Rob Herring <robh@...nel.org>
To:	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Grant Likely <grant.likely@...aro.org>,
	Frank Rowand <frowand.list@...il.com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Olof Johansson <olof@...om.net>,
	Ley Foon Tan <lftan@...era.com>,
	nios2-dev@...ts.rocketboards.org
Subject: [PATCH v2 10/13] nios2: use common make variables for dtb builds

Use common rules and dtb-y and always make variables to build dtbs
instead of explicit dtbs rule. Add the missing script dependencies as
well.

This is in preparation to support building all dtbs.

Signed-off-by: Rob Herring <robh@...nel.org>
Cc: Ley Foon Tan <lftan@...era.com>
Cc: nios2-dev@...ts.rocketboards.org
---
 arch/nios2/Makefile          | 10 +++++-----
 arch/nios2/boot/Makefile     | 13 +++----------
 arch/nios2/boot/dts/Makefile |  3 +++
 3 files changed, 11 insertions(+), 15 deletions(-)
 create mode 100644 arch/nios2/boot/dts/Makefile

diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile
index 2328f82..5508587 100644
--- a/arch/nios2/Makefile
+++ b/arch/nios2/Makefile
@@ -41,7 +41,7 @@ core-y		+= arch/nios2/platform/
 INSTALL_PATH ?= /tftpboot
 nios2-boot := arch/$(ARCH)/boot
 BOOT_TARGETS = vmImage zImage
-PHONY += $(BOOT_TARGETS) install
+PHONY += $(BOOT_TARGETS) install dtbs
 KBUILD_IMAGE := $(nios2-boot)/vmImage
 
 ifneq ($(CONFIG_NIOS2_DTB_SOURCE),"")
@@ -53,11 +53,11 @@ all: vmImage
 archclean:
 	$(Q)$(MAKE) $(clean)=$(nios2-boot)
 
-%.dtb:
-	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
+%.dtb: scripts
+	$(Q)$(MAKE) $(build)=$(nios2-boot)/dts $(nios2-boot)/dts/$@
 
-dtbs:
-	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
+dtbs: prepare scripts
+	$(Q)$(MAKE) $(build)=$(nios2-boot)/dts
 
 $(BOOT_TARGETS): vmlinux
 	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
diff --git a/arch/nios2/boot/Makefile b/arch/nios2/boot/Makefile
index c899876..187e45d 100644
--- a/arch/nios2/boot/Makefile
+++ b/arch/nios2/boot/Makefile
@@ -31,6 +31,9 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
 $(obj)/compressed/vmlinux: $(obj)/vmlinux.gz FORCE
 	$(Q)$(MAKE) $(build)=$(obj)/compressed $@
 
+# Let clean descend into subdirs
+subdir- := dts
+
 # Rule to build device tree blobs
 DTB_SRC := $(patsubst "%",%,$(CONFIG_NIOS2_DTB_SOURCE))
 
@@ -45,15 +48,5 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb
 
 obj-$(CONFIG_NIOS2_DTB_SOURCE_BOOL) += linked_dtb.o
 
-targets += $(dtb-y)
-
-# Rule to build device tree blobs with make command
-$(obj)/%.dtb: $(src)/dts/%.dts FORCE
-	$(call if_changed_dep,dtc)
-
-$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
-
-clean-files := *.dtb
-
 install:
 	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
diff --git a/arch/nios2/boot/dts/Makefile b/arch/nios2/boot/dts/Makefile
new file mode 100644
index 0000000..1c52039
--- /dev/null
+++ b/arch/nios2/boot/dts/Makefile
@@ -0,0 +1,3 @@
+always          := $(dtb-y)
+clean-files     := *.dtb
+
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ