-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Patrick Yavitz <pyavitz@armbian.com> Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
- Loading branch information
Patrick Yavitz
committed
Jun 4, 2024
1 parent
b7e6e09
commit 07f6e0b
Showing
2 changed files
with
33 additions
and
73 deletions.
There are no files selected for viewing
103 changes: 32 additions & 71 deletions
103
patch/kernel/archive/meson64-6.9/general-add-overlay-compilation-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,58 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Martin Ayotte <martinayotte@yahoo.ca> | ||
Date: Sat, 11 Feb 2017 18:32:53 +0100 | ||
Subject: add overlay-compilation-support to meson64-dev | ||
From 088e1cd9b9dd113f0a5e9e19a7f31c37532e002a Mon Sep 17 00:00:00 2001 | ||
From: Paolo Sabatino <paolo.sabatino@gmail.com> | ||
Date: Sun, 2 Jun 2024 21:53:01 +0200 | ||
Subject: [PATCH] compile .scr and install overlays in right path | ||
|
||
- 871bed1a24e21952f7aeb1981c26ad5fc573be9d: Martin Ayotte <martinayotte@yahoo.ca>: 'add overlay-compilation-support to meson64-dev' | ||
--- | ||
arch/arm/boot/.gitignore | 2 + | ||
scripts/Makefile.dtbinst | 14 ++++++- | ||
scripts/Makefile.lib | 20 ++++++++++ | ||
3 files changed, 35 insertions(+), 1 deletion(-) | ||
scripts/Makefile.dtbinst | 2 +- | ||
scripts/Makefile.lib | 8 +++++++- | ||
2 files changed, 8 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore | ||
index 8c759326baf4..e6ce8f6ad4b1 100644 | ||
--- a/arch/arm/boot/.gitignore | ||
+++ b/arch/arm/boot/.gitignore | ||
@@ -4,3 +4,5 @@ zImage | ||
xipImage | ||
bootpImage | ||
uImage | ||
+*.dtb* | ||
+*.scr | ||
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst | ||
index 4405d5b67578..04df2e7c8453 100644 | ||
index 67956f6496a5..1882d264306c 100644 | ||
--- a/scripts/Makefile.dtbinst | ||
+++ b/scripts/Makefile.dtbinst | ||
@@ -18,9 +18,12 @@ include $(srctree)/scripts/Kbuild.include | ||
include $(kbuild-file) | ||
@@ -33,7 +33,7 @@ endef | ||
|
||
dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-))) | ||
+dtbos := $(addprefix $(dst)/, $(dtbo-y)) | ||
+scrs := $(addprefix $(dst)/, $(scr-y)) | ||
+readmes := $(addprefix $(dst)/, $(dtbotxt-y)) | ||
subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m)) | ||
$(foreach d, $(sort $(dir $(dtbs))), $(eval $(call gen_install_rules,$(d)))) | ||
|
||
-__dtbs_install: $(dtbs) $(subdirs) | ||
+__dtbs_install: $(dtbs) $(dtbos) $(scrs) $(readmes) $(subdirs) | ||
@: | ||
-dtbs := $(notdir $(dtbs)) | ||
+dtbs := $(subst amlogic/,,$(dtbs)) | ||
|
||
quiet_cmd_dtb_install = INSTALL $@ | ||
@@ -32,6 +35,15 @@ $(dst)/%.dtb: $(obj)/%.dtb | ||
$(dst)/%.dtbo: $(obj)/%.dtbo | ||
$(call cmd,dtb_install) | ||
endif # CONFIG_ARCH_WANT_FLAT_DTB_INSTALL | ||
|
||
+$(dst)/%.dtbo: $(obj)/%.dtbo | ||
+ $(call cmd,dtb_install) | ||
+ | ||
+$(dst)/%.scr: $(obj)/%.scr | ||
+ $(call cmd,dtb_install) | ||
+ | ||
+$(dst)/README.meson-overlays: $(src)/README.meson-overlays | ||
+ $(call cmd,dtb_install) | ||
+ | ||
PHONY += $(subdirs) | ||
$(subdirs): | ||
$(Q)$(MAKE) $(dtbinst)=$@ dst=$(if $(CONFIG_ARCH_WANT_FLAT_DTB_INSTALL),$(dst),$(patsubst $(obj)/%,$(dst)/%,$@)) | ||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib | ||
index cd5b181060f1..75008c9921f6 100644 | ||
index 3179747cbd2c..59925208734a 100644 | ||
--- a/scripts/Makefile.lib | ||
+++ b/scripts/Makefile.lib | ||
@@ -343,6 +343,9 @@ DTC ?= $(objtree)/scripts/dtc/dtc | ||
DTC_FLAGS += -Wno-interrupt_provider \ | ||
-Wno-unique_unit_address | ||
@@ -398,7 +398,7 @@ $(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE | ||
|
||
+# Overlay support | ||
+DTC_FLAGS += -@ -Wno-unit_address_format -Wno-simple_bus_reg | ||
+ | ||
# Disable noisy checks by default | ||
ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),) | ||
DTC_FLAGS += -Wno-unit_address_vs_reg \ | ||
@@ -421,6 +424,23 @@ $(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE | ||
$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE | ||
$(call if_changed_dep,dtc) | ||
quiet_cmd_dtc = DTC $@ | ||
cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ | ||
- $(DTC) -o $@ -b 0 \ | ||
+ $(DTC) -@ -o $@ -b 0 \ | ||
$(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ | ||
-d $(depfile).dtc.tmp $(dtc-tmp) ; \ | ||
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) | ||
@@ -423,12 +423,18 @@ quiet_cmd_dtb = $(quiet_cmd_dtc) | ||
cmd_dtb = $(cmd_dtc) | ||
endif | ||
|
||
+quiet_cmd_dtco = DTCO $@ | ||
+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ | ||
+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ | ||
+ $(DTC) -O dtb -o $@ -b 0 \ | ||
+ -i $(dir $<) $(DTC_FLAGS) \ | ||
+ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ | ||
+ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) | ||
+ | ||
+$(obj)/%.dtbo: $(src)/%.dts FORCE | ||
+ $(call if_changed_dep,dtco) | ||
+ | ||
+quiet_cmd_scr = MKIMAGE $@ | ||
+cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@ | ||
+ | ||
$(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE | ||
$(call if_changed_dep,dtb) | ||
|
||
$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE | ||
$(call if_changed_dep,dtc) | ||
|
||
+$(obj)/%.scr: $(src)/%.scr-cmd FORCE | ||
+ $(call if_changed,scr) | ||
+ | ||
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) | ||
|
||
# Bzip2 | ||
-- | ||
Armbian | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters