kernel: Factor our perf build from main kernel build

The build of the perf utility has been quite bothersome,
with different arches and kernel versions failing.

Since we now have the ful kernel source in the package,
factor out the actual build into Dockerfile.perf

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
This commit is contained in:
Rolf Neugebauer
2019-03-06 00:37:31 +00:00
parent 94516fe2a8
commit d041e7d2bf
2 changed files with 37 additions and 14 deletions

View File

@@ -172,16 +172,6 @@ RUN DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdept
RUN printf "KERNEL_SOURCE=${KERNEL_SOURCE}\n" > /out/kernel-source-info
# perf
# Only build perf for the latest LTS and the latest stable kernel.
# Skip arm64 for now as perf for 4.19.x fails to build.
RUN if [ "${KERNEL_SERIES}" != 4.9.x ] && [ $(uname -m) != aarch64 ]; then \
mkdir -p /build/perf && \
make -C tools/perf LDFLAGS=-static O=/build/perf && \
strip /build/perf/perf && \
cp /build/perf/perf /out; \
fi
# Download Intel ucode and create a CPIO archive for it
ENV UCODE_URL=https://downloadmirror.intel.com/28039/eng/microcode-20180807.tgz
RUN set -e && \