diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-02-27 15:24:45 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-03-09 11:31:39 -0500 |
commit | 4b83f0d98a17aef896a9d772275bd09a4dfab07c (patch) | |
tree | d365fdf320c50f30d8b8222e93dadcdadca5df02 /scripts | |
parent | 0574f786d3c85ab1a9fe9ee8ade65e3ae83e18a4 (diff) | |
download | u-boot-4b83f0d98a17aef896a9d772275bd09a4dfab07c.tar.gz u-boot-4b83f0d98a17aef896a9d772275bd09a4dfab07c.tar.xz u-boot-4b83f0d98a17aef896a9d772275bd09a4dfab07c.zip |
kbuild: turn of dtc unit address warnings by default
DTC 1.4.2 or later checks DT unit-address without reg property and
vice-versa, and generates lots of warnings. Fixing DT files will
take for a while. Until then, let's turn off the check unless
building with W=*.
Introduce a new helper dtc-option to check if the option is supported
in order to suppress warnings on older versions.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Kbuild.include | 5 | ||||
-rw-r--r-- | scripts/Makefile.extrawarn | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 30e6e316ac..1b62aedb00 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -172,6 +172,11 @@ ld-version = $(shell $(LD) --version | $(srctree)/scripts/ld-version.sh) # Usage: $(call ld-ifversion, -ge, 22252, y) ld-ifversion = $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4)) +# dtc-option +# Usage: DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg) +dtc-option = $(call try-run,\ + echo '/dts-v1/; / {};' | $(DTC) $(1),$(1),$(2)) + ###### ### diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 6547e57357..7b2cffce52 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -57,4 +57,10 @@ ifeq ("$(strip $(warning))","") endif KBUILD_CFLAGS += $(warning) + +else + +# Disable noisy checks by default +DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg) + endif |