summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-05-15 15:26:54 -0400
committerTom Rini <[email protected]>2023-05-15 15:26:54 -0400
commit5d0b3dde115b0d26d414199678983d01b738ad1b (patch)
tree2d08c0a256f50eb3c22bfbb84b2fc9cc3eb0e980 /scripts
parenteaa9efafffaf87e3414db5d21face5e2dad105e4 (diff)
parent6ab7c3d6bab1584e43f0c0a7e92134811b78bc61 (diff)
Merge branch '2023-05-15-build-system-updates' into next
- Bring in a few kbuild changes from upstream Linux to fix running the checker (make C=1/C=2), and clean up some of the logic related to how choose what device trees to build.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.dts2
-rw-r--r--scripts/Makefile.lib7
-rwxr-xr-xscripts/dtc-version.sh2
3 files changed, 7 insertions, 4 deletions
diff --git a/scripts/Makefile.dts b/scripts/Makefile.dts
index 2561025da82..5e2429c6170 100644
--- a/scripts/Makefile.dts
+++ b/scripts/Makefile.dts
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: GPL-2.0+
-dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_$(SPL_)OF_LIST)))
+dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE) $(CONFIG_OF_LIST) $(CONFIG_SPL_OF_LIST)))
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 7b27224b5d4..7362a392ada 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -331,7 +331,7 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
; \
sed "s:$(pre-tmp):$(<):" $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
-$(obj)/%.dtb: $(src)/%.dts FORCE
+$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
$(call if_changed_dep,dtc)
pre-tmp = $(subst $(comma),_,$(dot-target).pre.tmp)
@@ -351,7 +351,10 @@ cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
-$(obj)/%.dtbo: $(src)/%.dts FORCE
+$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
+ $(call if_changed_dep,dtco)
+
+$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
$(call if_changed_dep,dtco)
# Fonts
diff --git a/scripts/dtc-version.sh b/scripts/dtc-version.sh
index bfb514e179f..53ff868bcdc 100755
--- a/scripts/dtc-version.sh
+++ b/scripts/dtc-version.sh
@@ -20,7 +20,7 @@ if ! which $dtc >/dev/null ; then
exit 1
fi
-MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1)
+MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1 | tr -d v)
MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2)
PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1)