Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [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
* [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

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 11:46 [Buildroot] [PATCH 1/1] package/rpi-firmware: add overlays/README 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
  -- strict thread matches above, loose matches on Subject: below --
2022-10-31 15:02 Tim Gover
2022-11-22 22:33 ` Thomas Petazzoni via buildroot
2022-11-23 10:51   ` Tim Gover

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox