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]
Message-Id: <20240109120738.346061-4-masahiroy@kernel.org>
Date: Tue,  9 Jan 2024 21:07:36 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: linux-kbuild@...r.kernel.org
Cc: devicetree@...r.kernel.org,
	Rob Herring <robh+dt@...nel.org>,
	Simon Glass <sjg@...omium.org>,
	Masahiro Yamada <masahiroy@...nel.org>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Nicolas Schier <nicolas@...sle.eu>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] kbuild: create a list of base and overlays for each DTB

Some *.dtb files are assembled from a base DTB and overlays, but once
they are built, there is no way to propagate such information to
succeeding processes.

This commit introduces the generation of *.dtlst files, listing the
component *.dtb(o) files that construct the corresponding *.dtb.

This is analogous to *.mod, which lists component objects for each
module.

Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---

 .gitignore             | 1 +
 Makefile               | 2 +-
 scripts/Makefile.build | 6 ++++++
 scripts/Makefile.lib   | 2 ++
 4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index c59dc60ba62e..912cb713ad74 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@
 *.dtbo
 *.dtb.S
 *.dtbo.S
+*.dtlst
 *.dwo
 *.elf
 *.gcno
diff --git a/Makefile b/Makefile
index dae6825b8082..3521bdad6db7 100644
--- a/Makefile
+++ b/Makefile
@@ -1927,7 +1927,7 @@ clean: $(clean-dirs)
 		-o -name '*.ko.*' \
 		-o -name '*.dtb' -o -name '*.dtbo' \
 		-o -name '*.dtb.S' -o -name '*.dtbo.S' \
-		-o -name '*.dt.yaml' -o -name 'dtbs-list' \
+		-o -name '*.dt.yaml' -o -name '*.dtlst' -o -name 'dtbs-list' \
 		-o -name '*.dwo' -o -name '*.lst' \
 		-o -name '*.su' -o -name '*.mod' \
 		-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index d23797dbca0f..e9fcf330ff39 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -252,6 +252,12 @@ cmd_mod = printf '%s\n' $(call real-search, $*.o, .o, -objs -y -m) | \
 $(obj)/%.mod: FORCE
 	$(call if_changed,mod)
 
+cmd_dt_list = printf '%s\n' $(call real-search, $*.dtb, .dtb, -dtbs) | \
+	$(AWK) '!x[$$0]++ { print("$(obj)/"$$0) }' > $@
+
+$(obj)/%.dtlst: FORCE
+	$(call if_changed,dt_list)
+
 quiet_cmd_cc_lst_c = MKLST   $@
       cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && \
 		     $(CONFIG_SHELL) $(srctree)/scripts/makelst $*.o \
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index b35d39022a30..0a492a4e4fbb 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -93,6 +93,8 @@ base-dtb-y := $(filter %.dtb, $(call real-search, $(multi-dtb-y), .dtb, -dtbs))
 
 always-y			+= $(dtb-y)
 
+always-y	+= $(patsubst %.dtb, %.dtlst, $(filter %.dtb, $(dtb-y)))
+
 # Add subdir path
 
 ifneq ($(obj),.)
-- 
2.40.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ