Commit Graph

7 Commits

Author SHA1 Message Date
Masahiro Yamada b1992c3772 kbuild: use $(src) instead of $(srctree)/$(src) for source directory
Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for
checked-in source files. It is merely a convention without any functional
difference. In fact, $(obj) and $(src) are exactly the same, as defined
in scripts/Makefile.build:

    src := $(obj)

When the kernel is built in a separate output directory, $(src) does
not accurately reflect the source directory location. While Kbuild
resolves this discrepancy by specifying VPATH=$(srctree) to search for
source files, it does not cover all cases. For example, when adding a
header search path for local headers, -I$(srctree)/$(src) is typically
passed to the compiler.

This introduces inconsistency between upstream and downstream Makefiles
because $(src) is used instead of $(srctree)/$(src) for the latter.

To address this inconsistency, this commit changes the semantics of
$(src) so that it always points to the directory in the source tree.

Going forward, the variables used in Makefiles will have the following
meanings:

  $(obj)     - directory in the object tree
  $(src)     - directory in the source tree  (changed by this commit)
  $(objtree) - the top of the kernel object tree
  $(srctree) - the top of the kernel source tree

Consequently, $(srctree)/$(src) in upstream Makefiles need to be replaced
with $(src).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2024-05-10 04:34:52 +09:00
Masahiro Yamada 9d97556860 csky: Remove unused $(dtb-y) from boot/Makefile
arch/csky/boot/Makefile does not build DTB,
arch/csky/boot/dts/Makefile does.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Guo Ren <guoren@kernel.org>
2022-05-13 14:45:09 +08:00
Thomas Gleixner ec8f24b7fa treewide: Add SPDX license identifier - Makefile/Kconfig
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 10:50:46 +02:00
Masahiro Yamada 901b5732fb csky: remove deprecated arch/csky/boot/dts/include/dt-bindings
Having a symbolic link arch/*/boot/dts/include/dt-bindings was
deprecated by commit d5d332d3f7 ("devicetree: Move include
prefixes from arch to separate directory").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-05-18 11:29:01 +09:00
Guo Ren e8d0c9a726 csky: use common dtb build rules
Remove the Kbuild rules in arch/csky and use common dtb build rules.

This modification is based on:

commit 37c8a5fafa ("kbuild: consolidate Devicetree dtb build rules")

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2018-11-01 10:52:27 +08:00
Guo Ren c4c14c3bd1 csky: remove builtin-dtb Kbuild
Remove the builtin-dtb implementation in arch/csky.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2018-11-01 10:52:26 +08:00
Guo Ren c32e64e852 csky: Build infrastructure
This patch adds Makefile, Kconfig for build infrastructure.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2018-10-25 23:36:19 +08:00