mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] kbuild: don't mix overlay and normal DTC and CPP flags
Date: Tue, 5 Dec 2023 09:01:58 +0100	[thread overview]
Message-ID: <20231205080158.GO1057032@pengutronix.de> (raw)
In-Reply-To: <20231130070320.3295372-1-a.fatoum@pengutronix.de>

On Thu, Nov 30, 2023 at 08:03:19AM +0100, Ahmad Fatoum wrote:
> 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(-)

Applied, thanks

Sascha

> 
> 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
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2023-12-05  8:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30  7:03 Ahmad Fatoum
2023-11-30  7:03 ` [PATCH 2/2] kbuild: don't warn about reg formatting Ahmad Fatoum
2023-12-05  8:01 ` Sascha Hauer [this message]

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=20231205080158.GO1057032@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=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