mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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> |
||
|---|---|---|
| .. | ||
| unittest-data | ||
| .kunitconfig | ||
| address.c | ||
| base.c | ||
| cpu.c | ||
| device.c | ||
| dynamic.c | ||
| empty_root.dts | ||
| fdt_address.c | ||
| fdt.c | ||
| irq.c | ||
| Kconfig | ||
| kexec.c | ||
| kobj.c | ||
| kunit_overlay_test.dtso | ||
| Makefile | ||
| module.c | ||
| of_kunit_helpers.c | ||
| of_numa.c | ||
| of_private.h | ||
| of_reserved_mem.c | ||
| of_test.c | ||
| overlay_test.c | ||
| overlay.c | ||
| pdt.c | ||
| platform.c | ||
| property.c | ||
| resolver.c | ||
| unittest.c | ||