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>
This commit is contained in:
committed by
Thomas Petazzoni
parent
ffc154197d
commit
b074f6b72b
@@ -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