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>] [day] [month] [year] [list]
Message-Id: <01b4b67d8cebc00c94e786f6e06f69fc10d39364.1615877125.git.viresh.kumar@linaro.org>
Date:   Tue, 16 Mar 2021 13:02:14 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>
Cc:     Viresh Kumar <viresh.kumar@...aro.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        David Gibson <david@...son.dropbear.id.au>,
        Michal Simek <michal.simek@...inx.com>,
        Bill Mills <bill.mills@...aro.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-kbuild@...r.kernel.org
Subject: [PATCH V3] kbuild: Allow .dtso format for overlay source files

Since the overlays dtb files are now named as .dtbo, there is a lot of
interest in similarly naming the overlay source dts files as .dtso.

This patch makes the necessary changes to allow .dtso format for overlay
source files.

Note that the device-tree unit-tests name their overlay files as .dts
and it would take substantial amount of changes to update them to .dtso
and that would probably involve some local rules in unit-test's Makefile
as well. This patch goes for a simpler solution instead, i.e. allow .dts
to .dtbo conversion for device-tree unit-tests.

Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Tested-by: Geert Uytterhoeven <geert+renesas@...der.be>
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
This was made part of the bigger patchset earlier (most of it already
got merged) whose last version was V11, but this patch was only sent
twice earlier and so starting with Version 3.

Changes since V2:

- Add the dts -> dtbo rule in unittest-data/Makefile.
- Remove the -I parameter to dtc.

 drivers/of/unittest-data/Makefile | 6 ++++++
 scripts/Makefile.lib              | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile
index a5d2d9254b2c..e8dd839bdcbb 100644
--- a/drivers/of/unittest-data/Makefile
+++ b/drivers/of/unittest-data/Makefile
@@ -86,3 +86,9 @@ static_test_1-dtbs := static_base_1.dtb $(apply_static_overlay_1)
 static_test_2-dtbs := static_base_2.dtb $(apply_static_overlay_2)
 
 dtb-$(CONFIG_OF_OVERLAY) += static_test_1.dtb static_test_2.dtb
+
+# We can't name the overlay files .dtso, it would require much more substantial
+# changes in Makefile. Instead allow building the overlay .dtbo files from .dts
+# source files for unittests.
+$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
+	$(call if_changed_dep,dtc)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 90b095c60f79..a682869d8f4b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -347,7 +347,7 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ;
 $(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
 	$(call if_changed_dep,dtc)
 
-$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
+$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
 	$(call if_changed_dep,dtc)
 
 overlay-y := $(addprefix $(obj)/, $(overlay-y))
@@ -376,6 +376,9 @@ endef
 $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
 	$(call if_changed_rule,dtc,yaml)
 
+$(obj)/%.dt.yaml: $(src)/%.dtso $(DTC) $(DT_TMP_SCHEMA) FORCE
+	$(call if_changed_rule,dtc,yaml)
+
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
 
 # Bzip2
-- 
2.25.0.rc1.19.g042ed3e048af

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ