mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-03-03 18:28:01 +01:00
This adds the following commits from upstream: a26ef6400bd8 Restore phandle references from __fixups__ node 05c524db44ff Restore phandle references from __local_fixups__ node db65a3a3f4f0 Restore labels from __symbols__ node 64330c682cac Improve type guessing when compiling to dts format cbb48690c697 Set DTSF_PLUGIN if needed when compiling from dtb ef3b1baf6370 Emit /plugin/ when compiling to .dts with DTSF_PLUGIN set 7c78c8542d73 Added empty node name check 14dd76b96732 fdtdump: Change FDT_PROP prob handling to ease future addition 9a1c801a1a3c Fix discarded const qualifiers 194ac9422ac9 libfdt: fdt_get_name: Add can_assume(VALID_DTB) check 39cae0bd0031 libfdt: Improve size savings in FDT_RO_PROBE slightly b12692473298 libfdt: libfdt_internal.h correct final comment in ASSUME block 7f3184a6c550 libfdt: Remove old MacOS strnlen workaround 9197f1ccd95c checks: Do not check overlays for alias paths e1284ee5dc20 livetree: Add only new data to fixup nodes instead of complete regeneration cba90ce82064 checks: Remove check for graph child addresses 763c6ab4189c livetree: Simplify append_to_property() 739403f22242 libfdt: Drop including string.h from libfdt_internal.h 1c6c51e51b29 Consider drive letters when checking for absolute paths on Windows. 617f3d9b60f7 ci: Add Cirrus CI configuration for FreeBSD testing 04f948e83fef ci: Add GitLab CI configuration for Linux builds e89680263137 ci: Tweaks to GitHub Actions setup 2ad738722b79 build: Add FreeBSD and non-GNU linker compatibility 4132ac08ba95 libfdt: Document most remaining functions 33e66ec845b8 tests: Add compatibility with uutils a0dd7b608102 fdtput: Use strtol() in preference to sscanf() 5b71660724d7 tests: Work around limitation in FreeBSD's printf(1) The graph_child_address check has been removed from upstream. Drop it from the makefiles. Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
89 lines
3.1 KiB
Makefile
89 lines
3.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
DT_DOC_CHECKER ?= dt-doc-validate
|
|
DT_EXTRACT_EX ?= dt-extract-example
|
|
DT_MK_SCHEMA ?= dt-mk-schema
|
|
|
|
DT_SCHEMA_LINT = $(shell which yamllint || \
|
|
echo "warning: python package 'yamllint' not installed, skipping" >&2)
|
|
|
|
DT_SCHEMA_MIN_VERSION = 2023.9
|
|
|
|
PHONY += check_dtschema_version
|
|
check_dtschema_version:
|
|
@which $(DT_DOC_CHECKER) >/dev/null || \
|
|
{ echo "Error: '$(DT_DOC_CHECKER)' not found!" >&2; \
|
|
echo "Ensure dtschema python package is installed and in your PATH." >&2; \
|
|
echo "Current PATH is:" >&2; \
|
|
echo "$$PATH" >&2; false; }
|
|
@{ echo $(DT_SCHEMA_MIN_VERSION); \
|
|
$(DT_DOC_CHECKER) --version 2>/dev/null || echo 0; } | sort -Vc >/dev/null || \
|
|
{ echo "ERROR: dtschema minimum version is v$(DT_SCHEMA_MIN_VERSION)" >&2; false; }
|
|
|
|
quiet_cmd_extract_ex = DTEX $@
|
|
cmd_extract_ex = $(DT_EXTRACT_EX) $< > $@
|
|
|
|
$(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
|
|
$(call if_changed,extract_ex)
|
|
|
|
find_all_cmd = find $(src) \( -name '*.yaml' ! \
|
|
-name 'processed-schema*' \)
|
|
|
|
find_cmd = $(find_all_cmd) | \
|
|
sed 's|^$(srctree)/||' | \
|
|
grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \
|
|
sed 's|^|$(srctree)/|'
|
|
CHK_DT_EXAMPLES := $(patsubst $(srctree)/%.yaml,%.example.dtb, \
|
|
$(shell $(find_cmd) | xargs grep -l '^examples:'))
|
|
|
|
quiet_cmd_yamllint = LINT $(src)
|
|
cmd_yamllint = ($(find_cmd) | \
|
|
xargs -n200 -P$$(nproc) \
|
|
$(DT_SCHEMA_LINT) -f parsable -c $(src)/.yamllint >&2) \
|
|
&& touch $@ || true
|
|
|
|
quiet_cmd_chk_bindings = CHKDT $(src)
|
|
cmd_chk_bindings = ($(find_cmd) | \
|
|
xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(src)) \
|
|
&& touch $@ || true
|
|
|
|
quiet_cmd_mk_schema = SCHEMA $@
|
|
cmd_mk_schema = f=$$(mktemp) ; \
|
|
$(find_all_cmd) > $$f ; \
|
|
$(DT_MK_SCHEMA) -j $(DT_MK_SCHEMA_FLAGS) @$$f > $@ ; \
|
|
rm -f $$f
|
|
|
|
DT_DOCS = $(patsubst $(srctree)/%,%,$(shell $(find_all_cmd)))
|
|
|
|
override DTC_FLAGS := \
|
|
-Wno-avoid_unnecessary_addr_size \
|
|
-Wno-unique_unit_address \
|
|
-Wunique_unit_address_if_enabled
|
|
|
|
$(obj)/processed-schema.json: $(DT_DOCS) check_dtschema_version FORCE
|
|
$(call if_changed,mk_schema)
|
|
|
|
targets += .dt-binding.checked .yamllint.checked
|
|
$(obj)/.yamllint.checked: $(DT_DOCS) $(src)/.yamllint FORCE
|
|
$(if $(DT_SCHEMA_LINT),$(call if_changed,yamllint),)
|
|
|
|
$(obj)/.dt-binding.checked: $(DT_DOCS) FORCE
|
|
$(call if_changed,chk_bindings)
|
|
|
|
always-y += processed-schema.json
|
|
targets += $(patsubst $(obj)/%,%, $(CHK_DT_EXAMPLES))
|
|
targets += $(patsubst $(obj)/%.dtb,%.dts, $(CHK_DT_EXAMPLES))
|
|
|
|
# Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of
|
|
# build artifacts here before they are processed by scripts/Makefile.clean
|
|
clean-files = $(shell find $(obj) \( -name '*.example.dts' -o \
|
|
-name '*.example.dtb' \) -delete 2>/dev/null)
|
|
|
|
dt_compatible_check: $(obj)/processed-schema.json
|
|
$(Q)$(srctree)/scripts/dtc/dt-extract-compatibles $(srctree) | xargs dt-check-compatible -v -s $<
|
|
|
|
PHONY += dt_binding_check_one
|
|
dt_binding_check_one: $(obj)/.dt-binding.checked $(obj)/.yamllint.checked
|
|
|
|
PHONY += dt_binding_check
|
|
dt_binding_check: dt_binding_check_one $(CHK_DT_EXAMPLES)
|