diff --git a/patch/kernel/archive/spacemit-6.6/006-overlay-support.patch b/patch/kernel/archive/spacemit-6.6/006-overlay-support.patch new file mode 100644 index 000000000..631b9bad4 --- /dev/null +++ b/patch/kernel/archive/spacemit-6.6/006-overlay-support.patch @@ -0,0 +1,56 @@ +From 8c8c784cdfa44a0c1738ddd1f790421787848131 Mon Sep 17 00:00:00 2001 +From: Patrick Yavitz +Date: Sat, 15 Feb 2025 12:44:54 -0500 +Subject: [PATCH] overlay support + +Signed-off-by: Patrick Yavitz +--- + scripts/Makefile.lib | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib +index 44f20b1b853a..22166f3bb4fe 100644 +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -348,6 +348,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-simple_bus_reg + else +@@ -362,6 +363,11 @@ DTC_FLAGS += -Wnode_name_chars_strict \ + -Wunique_unit_address + endif + ++ifeq ($(CONFIG_OF_OVERLAY),y) ++# enable creation of __symbols__ node ++DTC_FLAGS += -@ ++endif ++ + DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) + + # Set -@ if the target is a base DTB that overlay is applied onto +@@ -425,6 +431,18 @@ $(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE + $(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE + $(call if_changed_dep,dtc) + ++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) ++ + dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) + + # Bzip2 +-- +2.39.5 +