Skip to content

Commit

Permalink
add patch to 0018-linux-intree-overlays patch to fix incorrect mapping
Browse files Browse the repository at this point in the history
of DT overlays for the rpi platform targets.
(cf. home-assistant/operating-system#3335)
  • Loading branch information
jens-maus committed Apr 29, 2024
1 parent 3ac7275 commit 8c323d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 7 additions & 5 deletions buildroot-patches/0018-linux-intree-overlays.patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,30 @@
config BR2_LINUX_KERNEL_INSTALL_TARGET
--- buildroot/linux/linux.mk.orig
+++ buildroot/linux/linux.mk
@@ -459,6 +459,12 @@
@@ -459,6 +459,14 @@
)
endef
endif # BR2_LINUX_KERNEL_APPENDED_DTB
+ifeq ($(BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS),y)
+define LINUX_INSTALL_OVERLAYS
+ install -D -t $(1)/overlays/ \
+ $(wildcard $(LINUX_ARCH_PATH)/boot/dts/overlays/*.dtbo)
+ $(foreach ovldtb,$(wildcard $(LINUX_ARCH_PATH)/boot/dts/overlays/*.dtbo), \
+ $(INSTALL) -D -m 0644 $(ovldtb) $(1)/overlays/$(notdir $(ovldtb))
+ )
+ $(INSTALL) -D -m 0644 $(LINUX_ARCH_PATH)/boot/dts/overlays/overlay_map.dtb $(1)/overlays/
+endef
+endif # BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS
endif # BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
endif # BR2_LINUX_KERNEL_DTS_SUPPORT

@@ -529,6 +535,7 @@
@@ -529,6 +537,7 @@
define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET
$(call LINUX_INSTALL_IMAGE,$(TARGET_DIR)/boot)
$(call LINUX_INSTALL_DTB,$(TARGET_DIR)/boot)
+ $(call LINUX_INSTALL_OVERLAYS,$(TARGET_DIR)/boot)
endef
endif

@@ -543,6 +550,7 @@
@@ -543,6 +552,7 @@
define LINUX_INSTALL_IMAGES_CMDS
$(call LINUX_INSTALL_IMAGE,$(BINARIES_DIR))
$(call LINUX_INSTALL_DTB,$(BINARIES_DIR))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,10 @@ endef
endif # BR2_LINUX_KERNEL_APPENDED_DTB
ifeq ($(BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS),y)
define LINUX_INSTALL_OVERLAYS
install -D -t $(1)/overlays/ \
$(wildcard $(LINUX_ARCH_PATH)/boot/dts/overlays/*.dtbo)
$(foreach ovldtb,$(wildcard $(LINUX_ARCH_PATH)/boot/dts/overlays/*.dtbo), \
$(INSTALL) -D -m 0644 $(ovldtb) $(1)/overlays/$(notdir $(ovldtb))
)
$(INSTALL) -D -m 0644 $(LINUX_ARCH_PATH)/boot/dts/overlays/overlay_map.dtb $(1)/overlays/
endef
endif # BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS
endif # BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
Expand Down

0 comments on commit 8c323d6

Please sign in to comment.