When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.
In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.
This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.
Signed-off-by: Tom Rini <trini@konsulko.com>
Using the update-dtc-source.sh script from Linux v4.14-rc1 import the
portions of dtc that we require. We bring in update-dtc-source.sh and
scripts/dtc/Makefile from Linux v4.14-rc1. Rework DTC_FLAGS handling to
not require a test.
Signed-off-by: Tom Rini <trini@konsulko.com>
Recent commits of DTC introduced new warnings checking PCI and simple
buses, unit address formatting, and stricter node and property name
checking. Disable the new DTC warnings by default. As before,
warnings are enabled with W=*. The strict node and property name
checks are a bit subjective, so they are only enabled for W=2.
(This policy reflects the commit 8654cb8d0371 of Linux.)
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
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>
A general best practice for SPDX is that Makefiles should have an
identifier, add these as everything else is currently covered.
Signed-off-by: Tom Rini <trini@konsulko.com>
These lines originate in Linux; it looks like Linux folks chose to
hide bunch of warnings reported by clang rather than fixing C code.
In U-boot, warnings are being fixed thanks to Jeroen's great efforts.
Let's stop suppressing clang warnings.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
This commit was imported from Linux Kernel:
commit a86fe353 written by me.
W=... provides extra gcc checks.
Having such code in scripts/Makefile.build results in the same flags
being added to KBUILD_CFLAGS multiple times becuase
scripts/Makefile.build is invoked every time Kbuild descends into
the subdirectories.
Since the top Makefile is already too cluttered, this commit moves
all of extra gcc check stuff to a new file scripts/Makefile.extrawarn,
which is included from the top Makefile.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>