SpacemiT: Fixup linux-6.18.y overlay support

Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
This commit is contained in:
Patrick Yavitz 2025-12-12 11:57:24 -05:00 committed by c0rnelius
parent 6ed0845292
commit 7467512a73
3 changed files with 83 additions and 27 deletions

View File

@ -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 <retro98boy@qq.com>
---
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 <paolo.sabatino@gmail.com>
Date: Wed, 2 Oct 2024 19:30:34 +0300

View File

@ -0,0 +1,56 @@
From cd37bf87dbb1632b1c40c88032b68a43722b6ea0 Mon Sep 17 00:00:00 2001
From: Patrick Yavitz <pyavitz@gmail.com>
Date: Sat, 18 Oct 2025 14:55:38 -0400
Subject: [PATCH] device tree overlay support
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
---
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

View File

@ -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 <retro98boy@qq.com>
---
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