From 7467512a73aff84bdee4d24c0e8f0c0f847c9346 Mon Sep 17 00:00:00 2001 From: Patrick Yavitz Date: Fri, 12 Dec 2025 11:57:24 -0500 Subject: [PATCH] SpacemiT: Fixup linux-6.18.y overlay support Signed-off-by: Patrick Yavitz --- ...ch => 006-general-spacemit-overlays.patch} | 27 +++++++++ .../007-device-tree-overlay-support.patch | 56 +++++++++++++++++++ .../007-general-spacemit-overlays.patch | 27 --------- 3 files changed, 83 insertions(+), 27 deletions(-) rename patch/kernel/archive/spacemit-6.18/{006-general-add-overlay-compilation-support.patch => 006-general-spacemit-overlays.patch} (75%) create mode 100644 patch/kernel/archive/spacemit-6.18/007-device-tree-overlay-support.patch delete mode 100644 patch/kernel/archive/spacemit-6.18/007-general-spacemit-overlays.patch diff --git a/patch/kernel/archive/spacemit-6.18/006-general-add-overlay-compilation-support.patch b/patch/kernel/archive/spacemit-6.18/006-general-spacemit-overlays.patch similarity index 75% rename from patch/kernel/archive/spacemit-6.18/006-general-add-overlay-compilation-support.patch rename to patch/kernel/archive/spacemit-6.18/006-general-spacemit-overlays.patch index 75b5b3dd70..cf9d56d0e1 100644 --- a/patch/kernel/archive/spacemit-6.18/006-general-add-overlay-compilation-support.patch +++ b/patch/kernel/archive/spacemit-6.18/006-general-spacemit-overlays.patch @@ -1,3 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zhang Ning <832666+zhangn1985@users.noreply.github.com> +Date: Sat, 30 Aug 2025 10:33:14 +0800 +Subject: general: spacemit overlays + +Signed-off-by: retro98boy +--- + scripts/Makefile.build | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/scripts/Makefile.build b/scripts/Makefile.build +index 111111111111..222222222222 100644 +--- a/scripts/Makefile.build ++++ b/scripts/Makefile.build +@@ -107,6 +107,9 @@ always-y += $(hostprogs-always-y) $(hostprogs-always-m) + userprogs += $(userprogs-always-y) $(userprogs-always-m) + always-y += $(userprogs-always-y) $(userprogs-always-m) + ++# Overlay targets ++extra-y += $(dtbo-y) $(scr-y) $(dtbotxt-y) ++ + # Add subdir path + + ifneq ($(obj),.) +-- +Armbian + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Paolo Sabatino Date: Wed, 2 Oct 2024 19:30:34 +0300 diff --git a/patch/kernel/archive/spacemit-6.18/007-device-tree-overlay-support.patch b/patch/kernel/archive/spacemit-6.18/007-device-tree-overlay-support.patch new file mode 100644 index 0000000000..db151602e5 --- /dev/null +++ b/patch/kernel/archive/spacemit-6.18/007-device-tree-overlay-support.patch @@ -0,0 +1,56 @@ +From cd37bf87dbb1632b1c40c88032b68a43722b6ea0 Mon Sep 17 00:00:00 2001 +From: Patrick Yavitz +Date: Sat, 18 Oct 2025 14:55:38 -0400 +Subject: [PATCH] device tree overlay support + +Signed-off-by: Patrick Yavitz +--- + scripts/Makefile.dtbs | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/scripts/Makefile.dtbs b/scripts/Makefile.dtbs +index 2d321b813600..3d28c8ce09e2 100644 +--- a/scripts/Makefile.dtbs ++++ b/scripts/Makefile.dtbs +@@ -96,6 +96,7 @@ ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),) + DTC_FLAGS += -Wno-unit_address_vs_reg \ + -Wno-avoid_unnecessary_addr_size \ + -Wno-alias_paths \ ++ -Wno-gpios_property \ + -Wno-graph_child_address \ + -Wno-interrupt_map \ + -Wno-simple_bus_reg +@@ -103,6 +104,11 @@ else + DTC_FLAGS += -Wunique_unit_address_if_enabled + endif + ++ifeq ($(CONFIG_OF_OVERLAY),y) ++# enable creation of __symbols__ node ++DTC_FLAGS += -@ ++endif ++ + ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),) + DTC_FLAGS += -Wnode_name_chars_strict \ + -Wproperty_name_chars_strict \ +@@ -120,6 +126,18 @@ dtc_cpp_flags = -Wp,-MMD,$(depfile).pre.tmp -nostdinc -I $(DTC_INCLUDE) -undef - + + dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) + ++quiet_cmd_dtco = DTCO $@ ++cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \ ++ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ ++ $(DTC) -@ -H epapr -O dtb -o $@ -b 0 \ ++ -i $(dir $<) $(DTC_FLAGS) \ ++ -Wno-interrupts_property \ ++ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ ++ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ++ ++$(obj)/%.dtbo: $(obj)/%.dts FORCE ++ $(call if_changed_dep,dtco) ++ + quiet_cmd_dtc = DTC $(quiet_dtb_check_tag) $@ + cmd_dtc = \ + $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ +-- +2.43.0 + diff --git a/patch/kernel/archive/spacemit-6.18/007-general-spacemit-overlays.patch b/patch/kernel/archive/spacemit-6.18/007-general-spacemit-overlays.patch deleted file mode 100644 index 3446de5ad9..0000000000 --- a/patch/kernel/archive/spacemit-6.18/007-general-spacemit-overlays.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zhang Ning <832666+zhangn1985@users.noreply.github.com> -Date: Sat, 30 Aug 2025 10:33:14 +0800 -Subject: general: spacemit overlays - -Signed-off-by: retro98boy ---- - scripts/Makefile.build | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/scripts/Makefile.build b/scripts/Makefile.build -index 111111111111..222222222222 100644 ---- a/scripts/Makefile.build -+++ b/scripts/Makefile.build -@@ -107,6 +107,9 @@ always-y += $(hostprogs-always-y) $(hostprogs-always-m) - userprogs += $(userprogs-always-y) $(userprogs-always-m) - always-y += $(userprogs-always-y) $(userprogs-always-m) - -+# Overlay targets -+extra-y += $(dtbo-y) $(scr-y) $(dtbotxt-y) -+ - # Add subdir path - - ifneq ($(obj),.) --- -Armbian -