From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/2] kbuild: don't mix overlay and normal DTC and CPP flags
Date: Thu, 30 Nov 2023 08:03:19 +0100 [thread overview]
Message-ID: <20231130070320.3295372-1-a.fatoum@pengutronix.de> (raw)
We currently conflate flags for *.dtb and *.dtbo targets:
- -@ doesn't make sense for overlays, but is used there anyway when
CONFIG_OF_OVERLAY_LIVE
- DTC_CPP_FLAGS_basetarget.dtbo and DTC_CPP_FLAGS_basetarget.dtb are
interchangeable
Fix this by allowing flags to be specific to either *.dtb or *.dtbo
generation.
Fixes: 3610ec11f72b ("kbuild: Add target to build dtb overlay files")
Fixes: 5b3d7e66aac0 ("kbuild: support DTC_CPP_FLAGS_file.dtbo")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
scripts/Makefile.lib | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 18b4fc1b9dd2..8aa49b1ee1b0 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -220,8 +220,7 @@ dtc_cpp_flags = -Wp,-MD,$(depfile).pre -nostdinc \
-I$(srctree)/include \
-I$(srctree)/dts/include \
-I$(srctree)/dts/src/ \
- $(DTC_CPP_FLAGS_$(basetarget).dtb) \
- $(DTC_CPP_FLAGS_$(basetarget).dtbo) \
+ $(DTC_CPP_FLAGS_$(basetarget)$(suffix $@)) \
-undef -D__DTS__
ifdef CONFIG_BOOTM_FITIMAGE_PUBKEY
@@ -369,7 +368,7 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
-Wno-interrupt_provider
ifeq ($(CONFIG_OF_OVERLAY_LIVE), y)
-DTC_FLAGS += -@
+DTC_FLAGS.dtb += -@
endif
# Generate an assembly file to wrap the output of the device tree compiler
@@ -391,7 +390,7 @@ quiet_cmd_dtc = DTC $@
cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) \
-D'$(subst -,_,$(*F))_dts=1' $(foreach f,$< $(2),-include '$(f)') /dev/null ; \
$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
- -i $(srctree)/arch/$(SRCARCH)/dts $(DTC_FLAGS) \
+ -i $(srctree)/arch/$(SRCARCH)/dts $(DTC_FLAGS) $(DTC_FLAGS$(suffix $@)) \
-i $(srctree)/dts/src/$(SRCARCH) \
-i $(srctree)/dts/src/arm/ti/omap \
-d $(depfile).dtc $(dtc-tmp) ; \
--
2.39.2
next reply other threads:[~2023-11-30 7:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 7:03 Ahmad Fatoum [this message]
2023-11-30 7:03 ` [PATCH 2/2] kbuild: don't warn about reg formatting Ahmad Fatoum
2023-12-05 8:01 ` [PATCH 1/2] kbuild: don't mix overlay and normal DTC and CPP flags Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231130070320.3295372-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox