linux/drivers/of
Masahiro Yamada 654102df2a kbuild: add generic support for built-in boot DTBs
Some architectures embed boot DTBs in vmlinux. A potential issue for
these architectures is a race condition during parallel builds because
Kbuild descends into arch/*/boot/dts/ twice.

One build thread is initiated by the 'dtbs' target, which is a
prerequisite of the 'all' target in the top-level Makefile:

  ifdef CONFIG_OF_EARLY_FLATTREE
  all: dtbs
  endif

For architectures that support the built-in boot dtb, arch/*/boot/dts/
is visited also during the ordinary directory traversal in order to
build obj-y objects that wrap DTBs.

Since these build threads are unaware of each other, they can run
simultaneously during parallel builds.

This commit introduces a generic build rule to scripts/Makefile.vmlinux
to support embedded boot DTBs in a race-free way. Architectures that
want to use this rule need to select CONFIG_GENERIC_BUILTIN_DTB.

After the migration, Makefiles under arch/*/boot/dts/ will be visited
only once to build only *.dtb files.

This change also aims to unify the CONFIG options used for built-in DTBs
support. Currently, different architectures use different CONFIG options
for the same purposes.

With this commit, the CONFIG options will be unified as follows:

 - CONFIG_GENERIC_BUILTIN_DTB

   This enables the generic rule for built-in boot DTBs. This will be
   renamed to CONFIG_BUILTIN_DTB after all architectures migrate to the
   generic rule.

 - CONFIG_BUILTIN_DTB_NAME

   This specifies the path to the embedded DTB.
   (relative to arch/*/boot/dts/)

 - CONFIG_BUILTIN_DTB_ALL

   If this is enabled, all DTB files compiled under arch/*/boot/dts/ are
   embedded into vmlinux. Only used by MIPS.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-11-04 17:53:09 +09:00
..
unittest-data of: Fix double free in of_parse_phandle_with_args_map 2024-01-09 12:54:02 -06:00
.kunitconfig of: Add a KUnit test for overlays and test managed APIs 2024-07-29 15:33:12 -07:00
address.c of: address: Unify resource bounds overflow checking 2024-09-13 14:00:52 -05:00
base.c of: Use scope based kfree() cleanups 2024-04-15 08:40:40 -05:00
cpu.c of: Move CPU node related functions to their own file 2023-04-13 17:46:34 -05:00
device.c OF: Simplify of_iommu_configure() 2024-07-04 14:36:04 +01:00
dynamic.c of: dynamic: Introduce of_changeset_add_prop_bool() 2024-07-08 17:40:30 -06:00
empty_root.dts of: Create of_root if no dtb provided by firmware 2024-03-08 12:50:39 -06:00
fdt_address.c
fdt.c kbuild: split device tree build rules into scripts/Makefile.dtbs 2024-09-09 23:42:13 +09:00
irq.c of/irq: Use helper to define resources 2024-09-13 14:52:28 -05:00
Kconfig kbuild: add generic support for built-in boot DTBs 2024-11-04 17:53:09 +09:00
kexec.c arm64, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
kobj.c of: make of_node_ktype constant 2023-02-06 11:03:00 -06:00
kunit_overlay_test.dtso of: Add a KUnit test for overlays and test managed APIs 2024-07-29 15:33:12 -07:00
Makefile of: Add a KUnit test for overlays and test managed APIs 2024-07-29 15:33:12 -07:00
module.c Devicetree for v6.10: 2024-05-17 17:27:49 -07:00
of_kunit_helpers.c of: Skip kunit tests when arm64+ACPI doesn't populate root node 2024-10-10 12:43:01 -05:00
of_numa.c of, numa: return -EINVAL when no numa-node-id is found 2024-09-03 21:15:32 -07:00
of_private.h of: Skip kunit tests when arm64+ACPI doesn't populate root node 2024-10-10 12:43:01 -05:00
of_reserved_mem.c of: reserved_mem: Remove the use of phandle from the reserved_mem APIs 2024-05-03 07:49:13 -05:00
of_test.c of: Skip kunit tests when arm64+ACPI doesn't populate root node 2024-10-10 12:43:01 -05:00
overlay_test.c of: Skip kunit tests when arm64+ACPI doesn't populate root node 2024-10-10 12:43:01 -05:00
overlay.c of: overlay: Simplify with scoped for each OF child loop 2024-08-26 10:50:46 -05:00
pdt.c
platform.c The core clk framework is left largely untouched this time around except for 2024-09-23 15:01:48 -07:00
property.c drivers/of: Improve documentation for match_string 2024-09-13 14:01:34 -05:00
resolver.c of: resolver: Simplify with scoped for each OF child loop 2024-08-26 10:50:46 -05:00
unittest.c Kbuild updates for v6.12 2024-09-24 13:02:06 -07:00