* [PATCH] cmd_dtc: Enable generation of device tree symbols @ 2021-01-25 10:57 Uwe Kleine-König 2021-01-25 11:15 ` Cyril Brulebois ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Uwe Kleine-König @ 2021-01-25 10:57 UTC (permalink / raw) To: Masahiro Yamada, Michal Marek Cc: linux-kbuild, linux-kernel, linux-arm-kernel, cyril, Arnd Bergmann, Maxime Ripard Adding the -@ switch to dtc results in the binary devicetrees containing a list of symbolic references and their paths. This is necessary to apply device tree overlays e.g. on Raspberry Pi as described on https://www.raspberrypi.org/documentation/configuration/device-tree.md. Obviously the downside of this change is an increas of the size of the generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): $ du -s arch/arm/boot/dts* 101380 arch/arm/boot/dts-pre 114308 arch/arm/boot/dts-post so this is in average an increase of 12.8% in size. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> --- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 213677a5ed33..0683a5808f7f 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -319,7 +319,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) -@ -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \ $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -- 2.29.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-25 10:57 [PATCH] cmd_dtc: Enable generation of device tree symbols Uwe Kleine-König @ 2021-01-25 11:15 ` Cyril Brulebois 2021-01-26 18:01 ` Frank Rowand 2021-01-25 21:53 ` Masahiro Yamada 2021-01-26 18:01 ` Frank Rowand 2 siblings, 1 reply; 12+ messages in thread From: Cyril Brulebois @ 2021-01-25 11:15 UTC (permalink / raw) To: Uwe Kleine-König Cc: Masahiro Yamada, Michal Marek, linux-kbuild, linux-kernel, linux-arm-kernel, Arnd Bergmann, Maxime Ripard [-- Attachment #1: Type: text/plain, Size: 1186 bytes --] Hi, Uwe Kleine-König <uwe@kleine-koenig.org> (2021-01-25): > Adding the -@ switch to dtc results in the binary devicetrees containing > a list of symbolic references and their paths. This is necessary to > apply device tree overlays e.g. on Raspberry Pi as described on > https://www.raspberrypi.org/documentation/configuration/device-tree.md. > > Obviously the downside of this change is an increas of the size of the (as spotted by Uwe right after sending →) increase > generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): > > $ du -s arch/arm/boot/dts* > 101380 arch/arm/boot/dts-pre > 114308 arch/arm/boot/dts-post > > so this is in average an increase of 12.8% in size. > > Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Tested-by: Cyril Brulebois <cyril@debamax.com> with: - a Raspberry Pi CM3 - a carrier board designed after the official IO Board V3 - an RTC accessible over I²C, made functional via a DTB overlay, that can only be enabled once bcm2710-rpi-cm3.dtb has been generated with this patch applied. Cheers, -- Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-25 11:15 ` Cyril Brulebois @ 2021-01-26 18:01 ` Frank Rowand 0 siblings, 0 replies; 12+ messages in thread From: Frank Rowand @ 2021-01-26 18:01 UTC (permalink / raw) To: Cyril Brulebois, Uwe Kleine-König, Frank Rowand Cc: Michal Marek, Arnd Bergmann, linux-kbuild, Masahiro Yamada, linux-kernel, Maxime Ripard, linux-arm-kernel +frank On 1/25/21 5:15 AM, Cyril Brulebois wrote: > Hi, > > Uwe Kleine-König <uwe@kleine-koenig.org> (2021-01-25): >> Adding the -@ switch to dtc results in the binary devicetrees containing >> a list of symbolic references and their paths. This is necessary to >> apply device tree overlays e.g. on Raspberry Pi as described on >> https://www.raspberrypi.org/documentation/configuration/device-tree.md. >> >> Obviously the downside of this change is an increas of the size of the > > (as spotted by Uwe right after sending →) increase > >> generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): >> >> $ du -s arch/arm/boot/dts* >> 101380 arch/arm/boot/dts-pre >> 114308 arch/arm/boot/dts-post >> >> so this is in average an increase of 12.8% in size. >> >> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> > > Tested-by: Cyril Brulebois <cyril@debamax.com> > > with: > - a Raspberry Pi CM3 > - a carrier board designed after the official IO Board V3 > - an RTC accessible over I²C, made functional via a DTB overlay, that > can only be enabled once bcm2710-rpi-cm3.dtb has been generated with > this patch applied. > > > Cheers, > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-25 10:57 [PATCH] cmd_dtc: Enable generation of device tree symbols Uwe Kleine-König 2021-01-25 11:15 ` Cyril Brulebois @ 2021-01-25 21:53 ` Masahiro Yamada 2021-01-26 7:20 ` Uwe Kleine-König 2021-01-26 18:02 ` Frank Rowand 2021-01-26 18:01 ` Frank Rowand 2 siblings, 2 replies; 12+ messages in thread From: Masahiro Yamada @ 2021-01-25 21:53 UTC (permalink / raw) To: Uwe Kleine-König Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List, linux-arm-kernel, cyril, Arnd Bergmann, Maxime Ripard, DTML On Mon, Jan 25, 2021 at 8:07 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote: > > Adding the -@ switch to dtc results in the binary devicetrees containing > a list of symbolic references and their paths. This is necessary to > apply device tree overlays e.g. on Raspberry Pi as described on > https://www.raspberrypi.org/documentation/configuration/device-tree.md. > > Obviously the downside of this change is an increas of the size of the > generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): > > $ du -s arch/arm/boot/dts* > 101380 arch/arm/boot/dts-pre > 114308 arch/arm/boot/dts-post > > so this is in average an increase of 12.8% in size. > > Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> (CCing DT ML.) https://www.spinics.net/lists/linux-kbuild/msg27904.html See Rob's comment: "We've already rejected doing that. Turning on '-@' can grow the dtb size by a significant amount which could be problematic for some boards." > --- > scripts/Makefile.lib | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index 213677a5ed33..0683a5808f7f 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -319,7 +319,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) -@ -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \ > $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ > -d $(depfile).dtc.tmp $(dtc-tmp) ; \ > cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) > -- > 2.29.2 > -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-25 21:53 ` Masahiro Yamada @ 2021-01-26 7:20 ` Uwe Kleine-König 2021-01-26 8:43 ` Geert Uytterhoeven ` (2 more replies) 2021-01-26 18:02 ` Frank Rowand 1 sibling, 3 replies; 12+ messages in thread From: Uwe Kleine-König @ 2021-01-26 7:20 UTC (permalink / raw) To: Masahiro Yamada Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List, linux-arm-kernel, cyril, Arnd Bergmann, Maxime Ripard, DTML, Geert Uytterhoeven, Rob Herring [-- Attachment #1.1: Type: text/plain, Size: 2180 bytes --] Hello Masahiro, On 1/25/21 10:53 PM, Masahiro Yamada wrote: > On Mon, Jan 25, 2021 at 8:07 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote: >> >> Adding the -@ switch to dtc results in the binary devicetrees containing >> a list of symbolic references and their paths. This is necessary to >> apply device tree overlays e.g. on Raspberry Pi as described on >> https://www.raspberrypi.org/documentation/configuration/device-tree.md. >> >> Obviously the downside of this change is an increas of the size of the >> generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): >> >> $ du -s arch/arm/boot/dts* >> 101380 arch/arm/boot/dts-pre >> 114308 arch/arm/boot/dts-post >> >> so this is in average an increase of 12.8% in size. >> >> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> > > > (CCing DT ML.) makes sense, thanks. > https://www.spinics.net/lists/linux-kbuild/msg27904.html > > See Rob's comment: > > "We've already rejected doing that. Turning on '-@' can grow the dtb > size by a significant amount which could be problematic for some > boards." The patch was created after some conversation on irc which continued after I sent the patch. I added the participating parties to Cc:. The (relevant) followups were: Geert suggested to always generate the symbols and provide a way to strip the symbols for installation if and when they are not needed. Rob said: "I'm less concerned with the size increases, but rather that labels go from purely source syntax to an ABI. I'd rather see some decision as to which labels are enabled or not." And then I learned with hints from Rob and Geert that symbols are not really necessary for overlays, you just cannot use named labels. But using target-path = "/soc/i2c@23473245"; or target = <&{/soc/i2c@23473245}>; instead of target = <&i2c1>; works fine. (And if you need to add a phandle the &{/path/to/node} construct should work, too (but I didn't test).) Using labels is a tad nicer, but the problem I wanted to address with my patch now has a known different solution. Best regards Uwe [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-26 7:20 ` Uwe Kleine-König @ 2021-01-26 8:43 ` Geert Uytterhoeven 2021-01-26 18:03 ` Frank Rowand 2021-01-26 13:42 ` Rob Herring 2021-01-26 18:03 ` Frank Rowand 2 siblings, 1 reply; 12+ messages in thread From: Geert Uytterhoeven @ 2021-01-26 8:43 UTC (permalink / raw) To: Uwe Kleine-König Cc: Masahiro Yamada, Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List, linux-arm-kernel, cyril, Arnd Bergmann, Maxime Ripard, DTML, Rob Herring Hi Uwe, On Tue, Jan 26, 2021 at 8:21 AM Uwe Kleine-König <uwe@kleine-koenig.org> wrote: > And then I learned with hints from Rob and Geert that symbols are not > really necessary for overlays, you just cannot use named labels. But > using > > target-path = "/soc/i2c@23473245"; > > or > > target = <&{/soc/i2c@23473245}>; > > instead of > > target = <&i2c1>; > > works fine. (And if you need to add a phandle the &{/path/to/node} > construct should work, too (but I didn't test).) Using labels is a tad > nicer, but the problem I wanted to address with my patch now has a known > different solution. Please don't use "target" and "target-path". Since the introduction of sugar syntax support in v4.15[1], you can just use "&label", like in a normal DTS file. Paths do need the special "&{/path/to/node}" syntax instead of "/path/to/node", though. As usual, you can find lots of examples of DT overlays in my repo[2]. [1] commit 4201d057ea91c3d6 ("scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110") [2] https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/renesas-overlays Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-26 8:43 ` Geert Uytterhoeven @ 2021-01-26 18:03 ` Frank Rowand 0 siblings, 0 replies; 12+ messages in thread From: Frank Rowand @ 2021-01-26 18:03 UTC (permalink / raw) To: Geert Uytterhoeven, Uwe Kleine-König, Frank Rowand Cc: DTML, Michal Marek, Arnd Bergmann, Linux Kbuild mailing list, Masahiro Yamada, Linux Kernel Mailing List, Maxime Ripard, cyril, linux-arm-kernel +frank On 1/26/21 2:43 AM, Geert Uytterhoeven wrote: > Hi Uwe, > > On Tue, Jan 26, 2021 at 8:21 AM Uwe Kleine-König <uwe@kleine-koenig.org> wrote: >> And then I learned with hints from Rob and Geert that symbols are not >> really necessary for overlays, you just cannot use named labels. But >> using >> >> target-path = "/soc/i2c@23473245"; >> >> or >> >> target = <&{/soc/i2c@23473245}>; >> >> instead of >> >> target = <&i2c1>; >> >> works fine. (And if you need to add a phandle the &{/path/to/node} >> construct should work, too (but I didn't test).) Using labels is a tad >> nicer, but the problem I wanted to address with my patch now has a known >> different solution. > > Please don't use "target" and "target-path". Since the introduction of > sugar syntax support in v4.15[1], you can just use "&label", like in a normal > DTS file. Paths do need the special "&{/path/to/node}" syntax instead > of "/path/to/node", though. > > As usual, you can find lots of examples of DT overlays in my repo[2]. > > [1] commit 4201d057ea91c3d6 ("scripts/dtc: Update to upstream version > v1.4.5-3-gb1a60033c110") > [2] https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/renesas-overlays > > Gr{oetje,eeting}s, > > Geert > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-26 7:20 ` Uwe Kleine-König 2021-01-26 8:43 ` Geert Uytterhoeven @ 2021-01-26 13:42 ` Rob Herring 2021-01-26 18:03 ` Frank Rowand 2 siblings, 0 replies; 12+ messages in thread From: Rob Herring @ 2021-01-26 13:42 UTC (permalink / raw) To: Uwe Kleine-König Cc: Masahiro Yamada, Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List, linux-arm-kernel, cyril, Arnd Bergmann, Maxime Ripard, DTML, Geert Uytterhoeven, Frank Rowand On Tue, Jan 26, 2021 at 1:27 AM Uwe Kleine-König <uwe@kleine-koenig.org> wrote: > > Hello Masahiro, > > On 1/25/21 10:53 PM, Masahiro Yamada wrote: > > On Mon, Jan 25, 2021 at 8:07 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote: > >> > >> Adding the -@ switch to dtc results in the binary devicetrees containing > >> a list of symbolic references and their paths. This is necessary to > >> apply device tree overlays e.g. on Raspberry Pi as described on > >> https://www.raspberrypi.org/documentation/configuration/device-tree.md. > >> > >> Obviously the downside of this change is an increas of the size of the > >> generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): > >> > >> $ du -s arch/arm/boot/dts* > >> 101380 arch/arm/boot/dts-pre > >> 114308 arch/arm/boot/dts-post > >> > >> so this is in average an increase of 12.8% in size. > >> > >> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> > > > > > > (CCing DT ML.) > > makes sense, thanks. > > > https://www.spinics.net/lists/linux-kbuild/msg27904.html > > > > See Rob's comment: > > > > "We've already rejected doing that. Turning on '-@' can grow the dtb > > size by a significant amount which could be problematic for some > > boards." > > The patch was created after some conversation on irc which continued > after I sent the patch. I added the participating parties to Cc:. > > The (relevant) followups were: > > Geert suggested to always generate the symbols and provide a way to > strip the symbols for installation if and when they are not needed. > > Rob said: "I'm less concerned with the size increases, but rather that > labels go from purely source syntax to an ABI. I'd rather see some > decision as to which labels are enabled or not." I've also said move the arm32 dts files to family subdirectories and enable '-@' per directory. I've posted a script to do the whole thing, but I think the preference is one-by-one. This is needed anyways if we're going to start adding overlays which Viresh is working on. Rob ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-26 7:20 ` Uwe Kleine-König 2021-01-26 8:43 ` Geert Uytterhoeven 2021-01-26 13:42 ` Rob Herring @ 2021-01-26 18:03 ` Frank Rowand 2021-01-26 18:26 ` Frank Rowand 2 siblings, 1 reply; 12+ messages in thread From: Frank Rowand @ 2021-01-26 18:03 UTC (permalink / raw) To: Uwe Kleine-König, Masahiro Yamada, Frank Rowand Cc: DTML, Michal Marek, Arnd Bergmann, Linux Kbuild mailing list, Linux Kernel Mailing List, Maxime Ripard, cyril, Geert Uytterhoeven, linux-arm-kernel +frank On 1/26/21 1:20 AM, Uwe Kleine-König wrote: > Hello Masahiro, > > On 1/25/21 10:53 PM, Masahiro Yamada wrote: >> On Mon, Jan 25, 2021 at 8:07 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote: >>> >>> Adding the -@ switch to dtc results in the binary devicetrees containing >>> a list of symbolic references and their paths. This is necessary to >>> apply device tree overlays e.g. on Raspberry Pi as described on >>> https://www.raspberrypi.org/documentation/configuration/device-tree.md. >>> >>> Obviously the downside of this change is an increas of the size of the >>> generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): >>> >>> $ du -s arch/arm/boot/dts* >>> 101380 arch/arm/boot/dts-pre >>> 114308 arch/arm/boot/dts-post >>> >>> so this is in average an increase of 12.8% in size. >>> >>> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> >> >> >> (CCing DT ML.) > > makes sense, thanks. > >> https://www.spinics.net/lists/linux-kbuild/msg27904.html >> >> See Rob's comment: >> >> "We've already rejected doing that. Turning on '-@' can grow the dtb >> size by a significant amount which could be problematic for some >> boards." > > The patch was created after some conversation on irc which continued > after I sent the patch. I added the participating parties to Cc:. > > The (relevant) followups were: > > Geert suggested to always generate the symbols and provide a way to > strip the symbols for installation if and when they are not needed. > > Rob said: "I'm less concerned with the size increases, but rather that > labels go from purely source syntax to an ABI. I'd rather see some > decision as to which labels are enabled or not." > > And then I learned with hints from Rob and Geert that symbols are not > really necessary for overlays, you just cannot use named labels. But > using > > target-path = "/soc/i2c@23473245"; > > or > > target = <&{/soc/i2c@23473245}>; > > instead of > > target = <&i2c1>; > > works fine. (And if you need to add a phandle the &{/path/to/node} > construct should work, too (but I didn't test).) Using labels is a tad nicer, but the problem I wanted to address with my patch now has a known different solution. > > Best regards > Uwe > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-26 18:03 ` Frank Rowand @ 2021-01-26 18:26 ` Frank Rowand 0 siblings, 0 replies; 12+ messages in thread From: Frank Rowand @ 2021-01-26 18:26 UTC (permalink / raw) To: Uwe Kleine-König, Masahiro Yamada, Frank Rowand Cc: DTML, Michal Marek, Arnd Bergmann, Linux Kbuild mailing list, Linux Kernel Mailing List, Maxime Ripard, cyril, Geert Uytterhoeven, linux-arm-kernel Hi Uwe, On 1/26/21 12:03 PM, Frank Rowand wrote: > +frank > > On 1/26/21 1:20 AM, Uwe Kleine-König wrote: >> Hello Masahiro, >> >> On 1/25/21 10:53 PM, Masahiro Yamada wrote: >>> On Mon, Jan 25, 2021 at 8:07 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote: >>>> >>>> Adding the -@ switch to dtc results in the binary devicetrees containing >>>> a list of symbolic references and their paths. This is necessary to >>>> apply device tree overlays e.g. on Raspberry Pi as described on >>>> https://www.raspberrypi.org/documentation/configuration/device-tree.md. >>>> >>>> Obviously the downside of this change is an increas of the size of the >>>> generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): >>>> >>>> $ du -s arch/arm/boot/dts* >>>> 101380 arch/arm/boot/dts-pre >>>> 114308 arch/arm/boot/dts-post >>>> >>>> so this is in average an increase of 12.8% in size. >>>> >>>> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> >>> >>> >>> (CCing DT ML.) >> >> makes sense, thanks. >> >>> https://www.spinics.net/lists/linux-kbuild/msg27904.html >>> >>> See Rob's comment: >>> >>> "We've already rejected doing that. Turning on '-@' can grow the dtb >>> size by a significant amount which could be problematic for some >>> boards." >> >> The patch was created after some conversation on irc which continued >> after I sent the patch. I added the participating parties to Cc:. Unfortunately I have not been on irc recently (now rectified). Do you perchance have a copy of the irc conversation that you can send me? (No need to edit out unrelated messages, a simple cut and paste from the start of the conversation to the end is fine.) -Frank >> >> The (relevant) followups were: >> >> Geert suggested to always generate the symbols and provide a way to >> strip the symbols for installation if and when they are not needed. >> >> Rob said: "I'm less concerned with the size increases, but rather that >> labels go from purely source syntax to an ABI. I'd rather see some >> decision as to which labels are enabled or not." >> >> And then I learned with hints from Rob and Geert that symbols are not >> really necessary for overlays, you just cannot use named labels. But >> using >> >> target-path = "/soc/i2c@23473245"; >> >> or >> >> target = <&{/soc/i2c@23473245}>; >> >> instead of >> >> target = <&i2c1>; >> >> works fine. (And if you need to add a phandle the &{/path/to/node} >> construct should work, too (but I didn't test).) Using labels is a tad nicer, but the problem I wanted to address with my patch now has a known different solution. >> >> Best regards >> Uwe >> >> >> _______________________________________________ >> linux-arm-kernel mailing list >> linux-arm-kernel@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >> > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-25 21:53 ` Masahiro Yamada 2021-01-26 7:20 ` Uwe Kleine-König @ 2021-01-26 18:02 ` Frank Rowand 1 sibling, 0 replies; 12+ messages in thread From: Frank Rowand @ 2021-01-26 18:02 UTC (permalink / raw) To: Masahiro Yamada, Uwe Kleine-König, Frank Rowand Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List, linux-arm-kernel, cyril, Arnd Bergmann, Maxime Ripard, DTML +frank On 1/25/21 3:53 PM, Masahiro Yamada wrote: > On Mon, Jan 25, 2021 at 8:07 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote: >> >> Adding the -@ switch to dtc results in the binary devicetrees containing >> a list of symbolic references and their paths. This is necessary to >> apply device tree overlays e.g. on Raspberry Pi as described on >> https://www.raspberrypi.org/documentation/configuration/device-tree.md. >> >> Obviously the downside of this change is an increas of the size of the >> generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): >> >> $ du -s arch/arm/boot/dts* >> 101380 arch/arm/boot/dts-pre >> 114308 arch/arm/boot/dts-post >> >> so this is in average an increase of 12.8% in size. >> >> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> > > > (CCing DT ML.) > > > https://www.spinics.net/lists/linux-kbuild/msg27904.html > > See Rob's comment: > > "We've already rejected doing that. Turning on '-@' can grow the dtb > size by a significant amount which could be problematic for some > boards." > > > > > > > > >> --- >> scripts/Makefile.lib | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib >> index 213677a5ed33..0683a5808f7f 100644 >> --- a/scripts/Makefile.lib >> +++ b/scripts/Makefile.lib >> @@ -319,7 +319,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) -@ -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \ >> $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ >> -d $(depfile).dtc.tmp $(dtc-tmp) ; \ >> cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) >> -- >> 2.29.2 >> > > > -- > Best Regards > > Masahiro Yamada > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] cmd_dtc: Enable generation of device tree symbols 2021-01-25 10:57 [PATCH] cmd_dtc: Enable generation of device tree symbols Uwe Kleine-König 2021-01-25 11:15 ` Cyril Brulebois 2021-01-25 21:53 ` Masahiro Yamada @ 2021-01-26 18:01 ` Frank Rowand 2 siblings, 0 replies; 12+ messages in thread From: Frank Rowand @ 2021-01-26 18:01 UTC (permalink / raw) To: Uwe Kleine-König, Masahiro Yamada, Michal Marek, Frank Rowand Cc: Arnd Bergmann, linux-kbuild, linux-kernel, Maxime Ripard, cyril, linux-arm-kernel +frank On 1/25/21 4:57 AM, Uwe Kleine-König wrote: > Adding the -@ switch to dtc results in the binary devicetrees containing > a list of symbolic references and their paths. This is necessary to > apply device tree overlays e.g. on Raspberry Pi as described on > https://www.raspberrypi.org/documentation/configuration/device-tree.md. > > Obviously the downside of this change is an increas of the size of the > generated dtbs, for an arm out-of-tree build (multi_v7_defconfig): > > $ du -s arch/arm/boot/dts* > 101380 arch/arm/boot/dts-pre > 114308 arch/arm/boot/dts-post > > so this is in average an increase of 12.8% in size. > > Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> > --- > scripts/Makefile.lib | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index 213677a5ed33..0683a5808f7f 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -319,7 +319,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) -@ -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \ > $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ > -d $(depfile).dtc.tmp $(dtc-tmp) ; \ > cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) > ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-01-27 7:09 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-01-25 10:57 [PATCH] cmd_dtc: Enable generation of device tree symbols Uwe Kleine-König 2021-01-25 11:15 ` Cyril Brulebois 2021-01-26 18:01 ` Frank Rowand 2021-01-25 21:53 ` Masahiro Yamada 2021-01-26 7:20 ` Uwe Kleine-König 2021-01-26 8:43 ` Geert Uytterhoeven 2021-01-26 18:03 ` Frank Rowand 2021-01-26 13:42 ` Rob Herring 2021-01-26 18:03 ` Frank Rowand 2021-01-26 18:26 ` Frank Rowand 2021-01-26 18:02 ` Frank Rowand 2021-01-26 18:01 ` Frank Rowand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).