All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README
@ 2022-10-31 15:02 Tim Gover
  2022-11-22 22:33 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 8+ messages in thread
From: Tim Gover @ 2022-10-31 15:02 UTC (permalink / raw)
  To: buildroot; +Cc: Martin Bark, Tim Gover, Mahyar Koshkouei

If a custom os_prefix directory is specified then the Raspberry Pi
firmware probes for the README file in overlays directory. If
this is not found then firmware will use the top-level overlays
directory which can be confusing if os_prefix is used in conjunction
with other filters to implement alternate boot behaviour.

In Raspberry Pi OS the README file is always included to ensure
that the relevant documenation is in sync with the overlays. Rather
that including the entire file let's just include an emtpy file so
that overlays directory is consistent with the Raspberry Pi OS
APT package.

From
https://www.raspberrypi.com/documentation/computers/config_txt.html#overlay_prefix

Unless ${os_prefix}${overlay_prefix}README exists, overlays are shared
with the main OS (i.e. os_prefix is ignored).

Signed-off-by: Tim Gover <tim.gover@raspberrypi.com>
---
 package/rpi-firmware/rpi-firmware.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
index 6f5902fd52..53d6d8ca06 100644
--- a/package/rpi-firmware/rpi-firmware.mk
+++ b/package/rpi-firmware/rpi-firmware.mk
@@ -57,6 +57,7 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
 		$(INSTALL) -D -m 0644 $(ovldtb) $(BINARIES_DIR)/rpi-firmware/overlays/$(notdir $(ovldtb))
 	)
 	$(INSTALL) -D -m 0644 $(@D)/boot/overlays/overlay_map.dtb $(BINARIES_DIR)/rpi-firmware/overlays/
+	touch $(BINARIES_DIR)/rpi-firmware/overlays/README
 endef
 else
 # Still create the directory, so a genimage.cfg can include it independently of
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README
  2022-10-31 15:02 [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README Tim Gover
@ 2022-11-22 22:33 ` Thomas Petazzoni via buildroot
  2022-11-23 10:51   ` Tim Gover
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-22 22:33 UTC (permalink / raw)
  To: Tim Gover; +Cc: Martin Bark, Mahyar Koshkouei, buildroot

Hello Tim,

On Mon, 31 Oct 2022 15:02:35 +0000
Tim Gover <tim.gover@raspberrypi.com> wrote:

> If a custom os_prefix directory is specified then the Raspberry Pi
> firmware probes for the README file in overlays directory. If
> this is not found then firmware will use the top-level overlays
> directory which can be confusing if os_prefix is used in conjunction
> with other filters to implement alternate boot behaviour.
> 
> In Raspberry Pi OS the README file is always included to ensure
> that the relevant documenation is in sync with the overlays. Rather
> that including the entire file let's just include an emtpy file so
> that overlays directory is consistent with the Raspberry Pi OS
> APT package.
> 
> From
> https://www.raspberrypi.com/documentation/computers/config_txt.html#overlay_prefix
> 
> Unless ${os_prefix}${overlay_prefix}README exists, overlays are shared
> with the main OS (i.e. os_prefix is ignored).
> 
> Signed-off-by: Tim Gover <tim.gover@raspberrypi.com>
> ---
>  package/rpi-firmware/rpi-firmware.mk | 1 +
>  1 file changed, 1 insertion(+)

I am not entirely sure how useful ${os_prefix} is in the context of a
Buildroot generated system, but I guess having this empty README file
doesn't hurt much, so I've applied to next. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README
  2022-11-22 22:33 ` Thomas Petazzoni via buildroot
@ 2022-11-23 10:51   ` Tim Gover
  0 siblings, 0 replies; 8+ messages in thread
From: Tim Gover @ 2022-11-23 10:51 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Martin Bark, Mahyar Koshkouei, buildroot

On Tue, 22 Nov 2022 at 22:33, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Tim,
>
> On Mon, 31 Oct 2022 15:02:35 +0000
> Tim Gover <tim.gover@raspberrypi.com> wrote:
>
> > If a custom os_prefix directory is specified then the Raspberry Pi
> > firmware probes for the README file in overlays directory. If
> > this is not found then firmware will use the top-level overlays
> > directory which can be confusing if os_prefix is used in conjunction
> > with other filters to implement alternate boot behaviour.
> >
> > In Raspberry Pi OS the README file is always included to ensure
> > that the relevant documenation is in sync with the overlays. Rather
> > that including the entire file let's just include an emtpy file so
> > that overlays directory is consistent with the Raspberry Pi OS
> > APT package.
> >
> > From
> > https://www.raspberrypi.com/documentation/computers/config_txt.html#overlay_prefix
> >
> > Unless ${os_prefix}${overlay_prefix}README exists, overlays are shared
> > with the main OS (i.e. os_prefix is ignored).
> >
> > Signed-off-by: Tim Gover <tim.gover@raspberrypi.com>
> > ---
> >  package/rpi-firmware/rpi-firmware.mk | 1 +
> >  1 file changed, 1 insertion(+)
>
> I am not entirely sure how useful ${os_prefix} is in the context of a
> Buildroot generated system, but I guess having this empty README file
> doesn't hurt much, so I've applied to next. Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Thanks Thomas!

I appreciate that it's a bit of a corner case :) There's some work
going into making things like A/B booting a bit simpler (either
multiple boot partitions + swupdate/others or simple
directory/os_prefix based) but it's early days. Hopefully, if there is
common functionality that's useful for the wider audience that could
be upstreamed.

Tim





Tim
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README
  2022-10-31 13:14     ` Yann E. MORIN
@ 2022-10-31 15:02       ` Tim Gover
  0 siblings, 0 replies; 8+ messages in thread
From: Tim Gover @ 2022-10-31 15:02 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot, Martin Bark, Mahyar Koshkouei

On Mon, 31 Oct 2022 at 13:14, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Tim, All,
>
> On 2022-10-31 12:52 +0000, Tim Gover spake thusly:
> > On Mon, 31 Oct 2022 at 12:39, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > > On 2022-10-31 11:46 +0000, Tim Gover spake thusly:
> > > > If a custom os_prefix directory is specified then the Raspberry Pi
> > > > firmware probes for the README file in overlays directory.
> > > > Since the README file is small let's include it, otherwise,
> > > 197KiB is _not_ small. In fact, the README is bigger than every dtbo,
> > > and accounts for ~25% of the size of all dtbo combined.
> > Good point. Would you be happy with simply creating an empty or small
> > README file (a note indicating the purpose of the file) ?
>
> Just touching the README should be enough I would say.
>
> > > > the firmware won't recognize the overlays directory if the user
> > > > later moves it to an os_prefix specific sub-directory.
> > > What is the goal here, in the context of Buildroot, where we only
> > > install one set of overlays?
> > > If a user moved the overlays, they already have a script that does that,
> > > so they should also ensure that script properly prepares config.txt to
> > > specify the proper os_prefix, and so it is just a matter of adding a
> > > 'touch' on the README in the same script.
> > It's fairly common for non-expert users to modify the output of a
> > buildroot image
> > without re-building the image themselves. Adding a README file reduces
> > the risk of them being tripped up by this difference in behaviour.
>
> So, if I read you correctly: non-expert users know they can move the
> overlays to a sub-dir; they also know they have to set the os_prefix
> accordingly in config.txt; but they don't know they have to create a
> README in there? ;-)

We've found that many industrial customers prototype their software
on Raspberry Pi OS before using Buildroot or Yocto to create a
dedicated OS image. Using os_prefix + a GPIO conditional is
a common pattern and it would be nice if this worked as easily
on buildroot as elsewhere. I've resubmitted the patch with a zero
byte README. If anyone wants to create a really small image then
they would remove unused .dtbo files or just have a fixed DTB.
Therefore, I think the overhead of having a single empty README
file should be acceptable.


>
> Sorry, I am still unconvinced.
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README
  2022-10-31 12:52   ` Tim Gover
@ 2022-10-31 13:14     ` Yann E. MORIN
  2022-10-31 15:02       ` Tim Gover
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2022-10-31 13:14 UTC (permalink / raw)
  To: Tim Gover; +Cc: buildroot, Martin Bark, Mahyar Koshkouei

Tim, All,

On 2022-10-31 12:52 +0000, Tim Gover spake thusly:
> On Mon, 31 Oct 2022 at 12:39, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > On 2022-10-31 11:46 +0000, Tim Gover spake thusly:
> > > If a custom os_prefix directory is specified then the Raspberry Pi
> > > firmware probes for the README file in overlays directory.
> > > Since the README file is small let's include it, otherwise,
> > 197KiB is _not_ small. In fact, the README is bigger than every dtbo,
> > and accounts for ~25% of the size of all dtbo combined.
> Good point. Would you be happy with simply creating an empty or small
> README file (a note indicating the purpose of the file) ?

Just touching the README should be enough I would say.

> > > the firmware won't recognize the overlays directory if the user
> > > later moves it to an os_prefix specific sub-directory.
> > What is the goal here, in the context of Buildroot, where we only
> > install one set of overlays?
> > If a user moved the overlays, they already have a script that does that,
> > so they should also ensure that script properly prepares config.txt to
> > specify the proper os_prefix, and so it is just a matter of adding a
> > 'touch' on the README in the same script.
> It's fairly common for non-expert users to modify the output of a
> buildroot image
> without re-building the image themselves. Adding a README file reduces
> the risk of them being tripped up by this difference in behaviour.

So, if I read you correctly: non-expert users know they can move the
overlays to a sub-dir; they also know they have to set the os_prefix
accordingly in config.txt; but they don't know they have to create a
README in there? ;-)

Sorry, I am still unconvinced.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README
  2022-10-31 12:39 ` Yann E. MORIN
@ 2022-10-31 12:52   ` Tim Gover
  2022-10-31 13:14     ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Tim Gover @ 2022-10-31 12:52 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Martin Bark, Mahyar Koshkouei, buildroot

On Mon, 31 Oct 2022 at 12:39, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Tim, All,
>
> On 2022-10-31 11:46 +0000, Tim Gover spake thusly:
> > If a custom os_prefix directory is specified then the Raspberry Pi
> > firmware probes for the README file in overlays directory.
> >
> > Since the README file is small let's include it, otherwise,
>
> 197KiB is _not_ small. In fact, the README is bigger than every dtbo,
> and accounts for ~25% of the size of all dtbo combined.

Good point. Would you be happy with simply creating an empty or small
README file (a note indicating the purpose of the file) ?

> > the firmware won't recognize the overlays directory if the user
> > later moves it to an os_prefix specific sub-directory.
>
> What is the goal here, in the context of Buildroot, where we only
> install one set of overlays?
>
> If a user moved the overlays, they already have a script that does that,
> so they should also ensure that script properly prepares config.txt to
> specify the proper os_prefix, and so it is just a matter of adding a
> 'touch' on the README in the same script.

It's fairly common for non-expert users to modify the output of a
buildroot image
without re-building the image themselves. Adding a README file reduces
the risk of them being tripped up by this difference in behaviour.

>
> Regards,
> Yann E. MORIN.
>
> > From
> > https://www.raspberrypi.com/documentation/computers/config_txt.html#overlay_prefix
> >
> > Unless ${os_prefix}${overlay_prefix}README exists, overlays are shared
> > with the main OS (i.e. os_prefix is ignored).
> >
> > Signed-off-by: Tim Gover <tim.gover@raspberrypi.com>
> > ---
> >  package/rpi-firmware/rpi-firmware.mk | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
> > index d4d1d07b3f..908d7def6a 100644
> > --- a/package/rpi-firmware/rpi-firmware.mk
> > +++ b/package/rpi-firmware/rpi-firmware.mk
> > @@ -48,6 +48,7 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
> >       $(foreach ovldtb,$(wildcard $(@D)/boot/overlays/*.dtbo), \
> >               $(INSTALL) -D -m 0644 $(ovldtb) $(BINARIES_DIR)/rpi-firmware/overlays/$(notdir $(ovldtb))
> >       )
> > +     $(INSTALL) -D -m 0644 $(@D)/boot/overlays/README $(BINARIES_DIR)/rpi-firmware/overlays/
> >       $(INSTALL) -D -m 0644 $(@D)/boot/overlays/overlay_map.dtb $(BINARIES_DIR)/rpi-firmware/overlays/
> >  endef
> >  else
> > --
> > 2.25.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README
  2022-10-31 11:46 Tim Gover
@ 2022-10-31 12:39 ` Yann E. MORIN
  2022-10-31 12:52   ` Tim Gover
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2022-10-31 12:39 UTC (permalink / raw)
  To: Tim Gover; +Cc: Martin Bark, Mahyar Koshkouei, buildroot

Tim, All,

On 2022-10-31 11:46 +0000, Tim Gover spake thusly:
> If a custom os_prefix directory is specified then the Raspberry Pi
> firmware probes for the README file in overlays directory.
> 
> Since the README file is small let's include it, otherwise,

197KiB is _not_ small. In fact, the README is bigger than every dtbo,
and accounts for ~25% of the size of all dtbo combined.

> the firmware won't recognize the overlays directory if the user
> later moves it to an os_prefix specific sub-directory.

What is the goal here, in the context of Buildroot, where we only
install one set of overlays?

If a user moved the overlays, they already have a script that does that,
so they should also ensure that script properly prepares config.txt to
specify the proper os_prefix, and so it is just a matter of adding a
'touch' on the README in the same script.

Regards,
Yann E. MORIN.

> From
> https://www.raspberrypi.com/documentation/computers/config_txt.html#overlay_prefix
> 
> Unless ${os_prefix}${overlay_prefix}README exists, overlays are shared
> with the main OS (i.e. os_prefix is ignored).
> 
> Signed-off-by: Tim Gover <tim.gover@raspberrypi.com>
> ---
>  package/rpi-firmware/rpi-firmware.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
> index d4d1d07b3f..908d7def6a 100644
> --- a/package/rpi-firmware/rpi-firmware.mk
> +++ b/package/rpi-firmware/rpi-firmware.mk
> @@ -48,6 +48,7 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
>  	$(foreach ovldtb,$(wildcard $(@D)/boot/overlays/*.dtbo), \
>  		$(INSTALL) -D -m 0644 $(ovldtb) $(BINARIES_DIR)/rpi-firmware/overlays/$(notdir $(ovldtb))
>  	)
> +	$(INSTALL) -D -m 0644 $(@D)/boot/overlays/README $(BINARIES_DIR)/rpi-firmware/overlays/
>  	$(INSTALL) -D -m 0644 $(@D)/boot/overlays/overlay_map.dtb $(BINARIES_DIR)/rpi-firmware/overlays/
>  endef
>  else
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README
@ 2022-10-31 11:46 Tim Gover
  2022-10-31 12:39 ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Tim Gover @ 2022-10-31 11:46 UTC (permalink / raw)
  To: buildroot; +Cc: Martin Bark, Tim Gover, Mahyar Koshkouei

If a custom os_prefix directory is specified then the Raspberry Pi
firmware probes for the README file in overlays directory.

Since the README file is small let's include it, otherwise,
the firmware won't recognize the overlays directory if the user
later moves it to an os_prefix specific sub-directory.

From
https://www.raspberrypi.com/documentation/computers/config_txt.html#overlay_prefix

Unless ${os_prefix}${overlay_prefix}README exists, overlays are shared
with the main OS (i.e. os_prefix is ignored).

Signed-off-by: Tim Gover <tim.gover@raspberrypi.com>
---
 package/rpi-firmware/rpi-firmware.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
index d4d1d07b3f..908d7def6a 100644
--- a/package/rpi-firmware/rpi-firmware.mk
+++ b/package/rpi-firmware/rpi-firmware.mk
@@ -48,6 +48,7 @@ define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
 	$(foreach ovldtb,$(wildcard $(@D)/boot/overlays/*.dtbo), \
 		$(INSTALL) -D -m 0644 $(ovldtb) $(BINARIES_DIR)/rpi-firmware/overlays/$(notdir $(ovldtb))
 	)
+	$(INSTALL) -D -m 0644 $(@D)/boot/overlays/README $(BINARIES_DIR)/rpi-firmware/overlays/
 	$(INSTALL) -D -m 0644 $(@D)/boot/overlays/overlay_map.dtb $(BINARIES_DIR)/rpi-firmware/overlays/
 endef
 else
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-11-23 10:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 15:02 [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README Tim Gover
2022-11-22 22:33 ` Thomas Petazzoni via buildroot
2022-11-23 10:51   ` Tim Gover
  -- strict thread matches above, loose matches on Subject: below --
2022-10-31 11:46 Tim Gover
2022-10-31 12:39 ` Yann E. MORIN
2022-10-31 12:52   ` Tim Gover
2022-10-31 13:14     ` Yann E. MORIN
2022-10-31 15:02       ` Tim Gover

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.