Skip to contentSkip to conversation

package/rpi-firmware: add overlays/README

PATCH In review Tim Gover 2 participants 3 messages Oct 31, 2022 – Nov 23, 2022

lore
Share & tools
lore

Tim Gover

author
#0 lore raw

PATCH 1/1 package/rpi-firmware: add overlays/README

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

---
 package/rpi-firmware/rpi-firmware.mk | 1 +
 1 file changed, 1 insertion(+)
package/rpi-firmware/rpi-firmware.mk +1 -0
index 6f5902fd52..53d6d8ca06 100644
@@ -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
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Tim,

Quoted 15 lines · On Mon, 31 Oct 2022 15:02:35 +0000 Tim Gover <[email protected]> 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

Quoted 7 lines

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

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

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author
#2 lore raw
Quoted 33 lines · Thomas Petazzoni

Hello Tim,

Quoted 15 lines · On Mon, 31 Oct 2022 15:02:35 +0000 Tim Gover <[email protected]> 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

Quoted 7 lines

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

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

Quoted 5 lines

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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot