Add samsung specific changes

This commit is contained in:
2025-08-11 14:29:00 +02:00
parent c66122e619
commit 4d134a1294
2688 changed files with 1127995 additions and 11475 deletions

View File

@@ -244,12 +244,18 @@ ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F))
# ANDROID: Allow DTC_INCLUDE to be set by the BUILD_CONFIG. This allows one to
# compile an out-of-tree device tree.
DTC_INCLUDE += $(srctree)/scripts/dtc/include-prefixes
DTC_INCLUDE += $(srctree)/scripts/dtc/include-prefixes $(KBUILD_DTC_INCLUDE)
dtc_cpp_flags = -Wp,-MMD,$(depfile).pre.tmp -nostdinc \
$(addprefix -I,$(DTC_INCLUDE)) \
-undef -D__DTS__
ifeq ($(CONFIG_SEC_FACTORY),y)
dtc_cpp_flags += -DCONFIG_SEC_FACTORY
ifeq ($(CONFIG_SEC_FACTORY_INTERPOSER),y)
dtc_cpp_flags += -DCONFIG_SEC_FACTORY_INTERPOSER
endif
endif
ifdef CONFIG_OBJTOOL
objtool := $(objtree)/tools/objtool/objtool
@@ -387,6 +393,20 @@ quiet_cmd_wrap_S_dtb = WRAP $@
$(obj)/%.dtb.S: $(obj)/%.dtb FORCE
$(call if_changed,wrap_S_dtb)
show_dtc_error = \
( \
cat $1 >&2; \
for err in "$$(cat $1 | grep 'Error:')"; do \
echo "See more detail error as below:" >&2; \
cat $$(echo $$err | cut -d':' -f2) \
| awk '{printf("ERROR: %6d %s\n"), NR, $$0}' \
| head -n $$(echo $$err | grep -Eo ':[0-9]+' | cut -d':' -f2) \
| tail -n 2 >&2; \
done; \
rm $1; \
false; \
)
$(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE
$(call if_changed,wrap_S_dtb)
@@ -394,7 +414,8 @@ quiet_cmd_dtc = DTC $@
cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
$(DTC) -o $@ -b 0 \
$(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
-d $(depfile).dtc.tmp $(dtc-tmp) 2>$@.dtout || $(call show_dtc_error, $@.dtout) ;\
$(DTC) -q -O dts -I dtb -o $@.reverse.dts $@ ; \
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
quiet_cmd_fdtoverlay = DTOVL $@
@@ -420,6 +441,9 @@ endif
$(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
$(call if_changed_dep,dtb)
$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
$(call if_changed_dep,dtc)
$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
$(call if_changed_dep,dtc)