armbian_build/patch/kernel/archive/sunxi-6.10/patches.armbian/scripts-add-overlay-compilation-support.patch
The-going 5838fac412 sunxi-6.10: Delete unused patches and add newly extracted patches.
The patches in the series were applied to the Linux
kernel git repository as the "git am" command.
And then re-extracted to the target patches.armbian
folder using the tools/mk_format_patch script.
In this case, the series.armbian file is created anew
and all patches in the series strictly correspond
to this list.

I.e. unused ones will be deleted. The name of the patch
file will match the string "Subject:".

Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>
2024-09-10 21:59:57 +02:00

93 lines
2.5 KiB
Diff

From 2eddc3dce4086b6ba355ce60314fdd09b72ac51c Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Tue, 1 Feb 2022 21:04:08 +0300
Subject: scripts: add overlay compilation support
---
.gitignore | 1 +
scripts/Makefile.dtbinst | 10 +++++++++-
scripts/Makefile.lib | 12 +++++++++++-
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index c59dc60ba62e..e11167ab9d44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,6 +42,7 @@
*.rpm
*.rsi
*.s
+*.scr
*.so
*.so.dbg
*.su
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
index 9d920419a62c..0b674435f63a 100644
--- a/scripts/Makefile.dtbinst
+++ b/scripts/Makefile.dtbinst
@@ -22,7 +22,15 @@ quiet_cmd_dtb_install = INSTALL $@
$(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))
ifdef CONFIG_ARCH_WANT_FLAT_DTB_INSTALL
@@ -37,7 +45,7 @@ dtbs := $(notdir $(dtbs))
endif # CONFIG_ARCH_WANT_FLAT_DTB_INSTALL
-__dtbs_install: $(addprefix $(dst)/, $(dtbs))
+__dtbs_install: $(addprefix $(dst)/, $(dtbs)) $(script-files) $(readme-files)
@:
.PHONY: $(PHONY)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 7f8ec77bf35c..e0bd02e30f12 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -93,6 +93,9 @@ base-dtb-y := $(filter %.dtb, $(call real-search, $(multi-dtb-y), .dtb, -dtbs))
always-y += $(dtb-y)
+# Overlay Fixup script targets
+extra-y += $(scr-y) $(dtbotxt-y)
+
# Add subdir path
ifneq ($(obj),.)
@@ -374,7 +377,8 @@ DTC_FLAGS += -Wnode_name_chars_strict \
-Wunique_unit_address
endif
-DTC_FLAGS += $(DTC_FLAGS_$(target-stem))
+DTC_FLAGS += $(DTC_FLAGS_$(target-stem)) \
+ -@
# Set -@ if the target is a base DTB that overlay is applied onto
DTC_FLAGS += $(if $(filter $(patsubst $(obj)/%,%,$@), $(base-dtb-y)), -@)
@@ -437,6 +441,12 @@ $(obj)/%.dtb: $(obj)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
$(call if_changed_dep,dtc)
+quiet_cmd_scr = MKIMAGE $@
+ cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@
+
+$(obj)/%.scr: $(src)/%.scr-cmd FORCE
+ $(call if_changed,scr)
+
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
# Bzip2
--
2.35.3