All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/rpi-firmware: Support Device Tree Overlay
@ 2021-10-03 17:54 Takumi Takahashi
  2021-10-06 17:09 ` Peter Seiderer
  0 siblings, 1 reply; 3+ messages in thread
From: Takumi Takahashi @ 2021-10-03 17:54 UTC (permalink / raw)
  To: buildroot; +Cc: Mahyar Koshkouei, Takumi Takahashi, Martin Bark

Building the Raspberry Pi GitHub official kernel repository
will generate a Device Tree Overlay Blob files under
`$(LINUX_DIR)/arch/$(KERNEL_ARCH)/boot/dts/overlays`.

This commit changes to install the Device Tree Overlay Blob file
generated during kernel build under the following conditions:

- `$(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS)`
  - `n`
- `$(BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT)`
  - `y`

Signed-off-by: Takumi Takahashi <takumiiinn@gmail.com>
---
 package/rpi-firmware/rpi-firmware.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
index 181650fa08..39962b3d70 100644
--- a/package/rpi-firmware/rpi-firmware.mk
+++ b/package/rpi-firmware/rpi-firmware.mk
@@ -30,6 +30,16 @@ else
 define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS
 	$(INSTALL) -d $(BINARIES_DIR)/rpi-firmware/overlays
 endef
+ifeq ($(BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT),y)
+# If you are using the official raspberry pi kernel, dtbo will be created under
+# the overlays directory, so use that.
+define RPI_FIRMWARE_INSTALL_KERNEL_DTB_OVERLAYS
+	for dtbo in $(LINUX_DIR)/arch/$(KERNEL_ARCH)/boot/dts/overlays/*.dtbo; do \
+		$(INSTALL) -D -m 0644 $${dtbo} $(BINARIES_DIR)/rpi-firmware/overlays/$${dtbo##*/} || exit 1; \
+	done
+endef
+LINUX_POST_INSTALL_IMAGES_HOOKS += RPI_FIRMWARE_INSTALL_KERNEL_DTB_OVERLAYS
+endif
 endif
 
 ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y)
-- 
2.33.0

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

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

end of thread, other threads:[~2021-10-06 20:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-03 17:54 [Buildroot] [PATCH 1/1] package/rpi-firmware: Support Device Tree Overlay Takumi Takahashi
2021-10-06 17:09 ` Peter Seiderer
2021-10-06 20:57   ` Arnout Vandecappelle

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.