Skip to content

Commit

Permalink
sunxi-6.11: Fix the installation of overlay files in the subdir
Browse files Browse the repository at this point in the history
Merge two patch files and delete the debugging code.
  • Loading branch information
The-going authored and igorpecovnik committed Nov 14, 2024
1 parent 42505d6 commit 81cd995
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 62 deletions.
41 changes: 0 additions & 41 deletions patch/kernel/archive/sunxi-6.11/fix-dtb.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
From 957db0e834df1fbb8b32a0fa5620c5375c56f390 Mon Sep 17 00:00:00 2001
From 0184e44b9caf2fa96cc058f0bb34fd5ca4ca4498 Mon Sep 17 00:00:00 2001
From: The-going <[email protected]>
Date: Tue, 1 Feb 2022 21:04:08 +0300
Subject: scripts: add overlay compilation support

---
.gitignore | 1 +
scripts/Makefile.dtbinst | 10 +++++++++-
scripts/Makefile.dtbinst | 9 ++++++++-
scripts/Makefile.lib | 12 +++++++++++-
3 files changed, 21 insertions(+), 2 deletions(-)
3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 7902adf4f7f1..167871780657 100644
index 58fdbb35e2f1..0d683e66d33b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,6 +42,7 @@
Expand All @@ -22,34 +22,32 @@ index 7902adf4f7f1..167871780657 100644
*.so.dbg
*.su
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
index 9d920419a62c..0b674435f63a 100644
index 9d920419a62c..b66af344040d 100644
--- a/scripts/Makefile.dtbinst
+++ b/scripts/Makefile.dtbinst
@@ -22,7 +22,15 @@ quiet_cmd_dtb_install = INSTALL $@
$(dst)/%: $(obj)/%
@@ -23,6 +23,11 @@ $(dst)/%: $(obj)/%
$(call cmd,dtb_install)

+$(dst)/%.scr: $(obj)/%.scr
+ $(call cmd,dtb_install)
+
+$(dst)/README.%-overlays: $(obj)/README.%-overlays
+ $(call cmd,dtb_install)
+
dtbs := $(patsubst $(obj)/%,%,$(call read-file, $(obj)/dtbs-list))
+script-files := $(addprefix $(dst)/, $(scr-y))
+readme-files := $(addprefix $(dst)/, $(dtbotxt-y))
+vendor := $(sort $(dir $(filter %.dtb, $(dtbs))))
+subdir := $(sort $(dir $(filter %.dtbo, $(dtbs))))
+
+dtbs += $(patsubst $(obj)/%,%,$(if $(subdir), $(shell cd $(srctree)/$(obj) && find $(subdir) -name '*.scr')))
+dtbs += $(patsubst $(obj)/%,%,$(if $(subdir), $(shell cd $(srctree)/$(obj) && find $(subdir) -name 'README.*-overlays')))

ifdef CONFIG_ARCH_WANT_FLAT_DTB_INSTALL

@@ -37,7 +45,7 @@ dtbs := $(notdir $(dtbs))
@@ -33,7 +38,9 @@ endef

endif # CONFIG_ARCH_WANT_FLAT_DTB_INSTALL
$(foreach d, $(sort $(dir $(dtbs))), $(eval $(call gen_install_rules,$(d))))

-dtbs := $(notdir $(dtbs))
+# Armbian uses subdirectories <overlay> but not <allwinner/overlay>.
+# delete the vendor's directory
+dtbs := $(patsubst $(vendor)%,%,$(dtbs))

-__dtbs_install: $(addprefix $(dst)/, $(dtbs))
+__dtbs_install: $(addprefix $(dst)/, $(dtbs)) $(script-files) $(readme-files)
@:
endif # CONFIG_ARCH_WANT_FLAT_DTB_INSTALL

.PHONY: $(PHONY)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 207325eaf1d1..870cfa0ea443 100644
--- a/scripts/Makefile.lib
Expand Down

0 comments on commit 81cd995

Please sign in to comment.