[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2f5f7f5-8e0f-00a1-8534-d509d89efed6@gmail.com>
Date: Mon, 24 Oct 2022 17:01:41 -0500
From: Frank Rowand <frowand.list@...il.com>
To: Andrew Davis <afd@...com>, Shawn Guo <shawnguo@...nel.org>,
Li Yang <leoyang.li@....com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Nishanth Menon <nm@...com>,
Vignesh Raghavendra <vigneshr@...com>,
Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: devicetree@...r.kernel.org, linux-kbuild@...r.kernel.org,
linux-renesas-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/7] kbuild: Allow DTB overlays to built into .dtso.S
files
On 10/24/22 12:34, Andrew Davis wrote:
> DTB files can be built into the kernel by converting them to assembly
> files then assembling them into object files. We extend this here
> for DTB overlays with the .dtso extensions.
>
> We change the start and end delimiting tag prefix to make it clear that
> this data came from overlay files.
>
> [Based on patch by Frank Rowand <frank.rowand@...y.com>]
> Signed-off-by: Andrew Davis <afd@...com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
> Tested-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
Reviewed-by: Frank Rowand <frowand.list@...il.com>
Tested-by: Frank Rowand <frowand.list@...il.com>
-Frank
> scripts/Makefile.lib | 20 +++++++++++++++++++-
> 1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 0376a6f18bfb1..250b9fd73f6d2 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -358,7 +358,7 @@ DTC_FLAGS += $(DTC_FLAGS_$(basetarget))
> DTC_FLAGS += $(if $(filter $(patsubst $(obj)/%,%,$@), $(base-dtb-y)), -@)
>
> # Generate an assembly file to wrap the output of the device tree compiler
> -quiet_cmd_dt_S_dtb= DTB $@
> +quiet_cmd_dt_S_dtb= DTBS $@
> cmd_dt_S_dtb= \
> { \
> echo '\#include <asm-generic/vmlinux.lds.h>'; \
> @@ -375,6 +375,24 @@ cmd_dt_S_dtb= \
> $(obj)/%.dtb.S: $(obj)/%.dtb FORCE
> $(call if_changed,dt_S_dtb)
>
> +# Generate an assembly file to wrap the output of the device tree compiler
> +quiet_cmd_dt_S_dtbo= DTBOS $@
> +cmd_dt_S_dtbo= \
> +{ \
> + echo '\#include <asm-generic/vmlinux.lds.h>'; \
> + echo '.section .dtb.init.rodata,"a"'; \
> + echo '.balign STRUCT_ALIGNMENT'; \
> + echo '.global __dtbo_$(subst -,_,$(*F))_begin'; \
> + echo '__dtbo_$(subst -,_,$(*F))_begin:'; \
> + echo '.incbin "$<" '; \
> + echo '__dtbo_$(subst -,_,$(*F))_end:'; \
> + echo '.global __dtbo_$(subst -,_,$(*F))_end'; \
> + echo '.balign STRUCT_ALIGNMENT'; \
> +} > $@
> +
> +$(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE
> + $(call if_changed,dt_S_dtbo)
> +
> quiet_cmd_dtc = DTC $@
> cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
> $(DTC) -o $@ -b 0 \
Powered by blists - more mailing lists