lkml.org 
[lkml]   [2021]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH V11 3/5] kbuild: Allow .dtso format for overlay source files
    On Wed, Mar 10, 2021 at 2:35 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
    >
    > 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 we still support generating .dtbo files from .dts files. This
    > is required for the source files present in drivers/of/unittest-data/,
    > because they can't be renamed to .dtso as they are used for some runtime
    > testing as well.
    >
    > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
    > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
    > ---
    > scripts/Makefile.lib | 9 ++++++++-
    > 1 file changed, 8 insertions(+), 1 deletion(-)
    >
    > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
    > index bc045a54a34e..59e86f67f9e0 100644
    > --- a/scripts/Makefile.lib
    > +++ b/scripts/Makefile.lib
    > @@ -339,7 +339,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb FORCE
    >
    > quiet_cmd_dtc = DTC $@
    > cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
    > - $(DTC) -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \
    > + $(DTC) -I dts -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \

    Even without "-I dts",

    inform = guess_input_format(arg, "dts");

    seems to fall back to "dts" anyway,
    but I guess you wanted to make this explicit, correct?

    I will drop the ugly -O.
    https://patchwork.kernel.org/project/linux-kbuild/patch/20210310110824.782209-1-masahiroy@kernel.org/

    I will queue it to linux-kbuild/fixes.



    > $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
    > -d $(depfile).dtc.tmp $(dtc-tmp) ; \
    > cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
    > @@ -347,9 +347,13 @@ 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)
    >
    > +# Required for of unit-test files as they can't be renamed to .dtso

    If you go with *.dtso, I think you will rename
    all *.dts under the drivers/ directory.

    What is blocking you from making this consistent?






    > $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
    > $(call if_changed_dep,dtc)
    >
    > +$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
    > + $(call if_changed_dep,dtc)
    > +
    > overlay-y := $(addprefix $(obj)/, $(overlay-y))
    >
    > quiet_cmd_fdtoverlay = DTOVL $@
    > @@ -375,6 +379,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
    >


    --
    Best Regards
    Masahiro Yamada

    \
     
     \ /
      Last update: 2021-03-10 12:27    [W:3.819 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site