mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-09 17:03:35 -09:00
package/linux-tools: fix parallel compilation
linux-tools opportunistically set linux as only a patch dependency. This
unfortunately introduces a race condition in the shared linux scripts
when using PER_PACKAGE_DIRECTORIES and using top level parallelism. The
race manifests as the error "/bin/sh: 1: scripts/basic/fixdep:
Permission denied". This happens when the linux package and the
linux-tools package are being compiled in parallel.
The linux-tools currently using fixdep are perf and rtla. When the
timing is correct, perf, rtla, or the kernel Makefile will try to use
fixdep while one of the others is compiling fixed, resulting in fixdep
being briefly not available.
To fix this, set linux as a build dependency instead of a patch
dependency.
Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit b074f6b72b)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
4c80e9cd3e
commit
f1214d75b1
@@ -19,8 +19,12 @@
|
||||
|
||||
include $(sort $(wildcard package/linux-tools/*.mk.in))
|
||||
|
||||
# We only need the kernel to be extracted, not actually built
|
||||
LINUX_TOOLS_PATCH_DEPENDENCIES = linux
|
||||
# Prevent the kernel from being compiled in parallel with linux-tools. The
|
||||
# kernel and some linux-tools (such as perf) use fixdep to manage kconfig
|
||||
# dependencies. There is a race condition where the kernel and linux-tools try
|
||||
# to build fixdep while the other tries to use fixdep, resulting in the use of
|
||||
# fixdep failing.
|
||||
LINUX_TOOLS_DEPENDENCIES = linux
|
||||
|
||||
# Install Linux kernel tools in the staging directory since some tools
|
||||
# may install shared libraries and headers (e.g. cpupower).
|
||||
|
||||
Reference in New Issue
Block a user