mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
kernel: perf only for LTS and latest stable/disable for arm64
The logic for perf became too complex. Just build for latest LTS and latest stable. Disable for arm64 for now as it is broken for 4.19 due to a header mismatch: In file included from /linux/tools/arch/arm64/include/uapi/asm/unistd.h:20:0, from libbpf.c:36: /linux/tools/include/uapi/asm-generic/unistd.h:754:0: error: "__NR_fcntl" redefined [-Werror] In file included from /usr/include/sys/syscall.h:4:0, from /linux/tools/perf/perf-sys.h:7, from libbpf.c:35: /usr/include/bits/syscall.h:26:0: note: this is the location of the previous definition Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
This commit is contained in:
parent
1467a70b44
commit
e90c9a0687
@ -175,9 +175,11 @@ RUN DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdept
|
|||||||
RUN printf "KERNEL_SOURCE=${KERNEL_SOURCE}\n" > /out/kernel-source-info
|
RUN printf "KERNEL_SOURCE=${KERNEL_SOURCE}\n" > /out/kernel-source-info
|
||||||
|
|
||||||
# perf
|
# perf
|
||||||
# Skip for 4.4.x (the compile is broken and tedious to fix) and 4.9.x (the
|
# Only build perf for the latest LTS and the latest stable kernel.
|
||||||
# compile broke with 4.9.93)
|
# There were intermittent breakage for 4.4.x and 4.9.x on some arches
|
||||||
RUN if [ "${KERNEL_SERIES}" != "4.4.x" ] && [ "${KERNEL_SERIES}" != "4.9.x" ]; then \
|
# Skip arm64 for now as perf for 4.19 fails to build.
|
||||||
|
RUN if [ \( "${KERNEL_SERIES}" == "4.14.x" || "${KERNEL_SERIES}" == "4.19.x" \) \
|
||||||
|
&& $(uname -m) != aarch64 ]; then \
|
||||||
mkdir -p /build/perf && \
|
mkdir -p /build/perf && \
|
||||||
make -C tools/perf LDFLAGS=-static O=/build/perf && \
|
make -C tools/perf LDFLAGS=-static O=/build/perf && \
|
||||||
strip /build/perf/perf && \
|
strip /build/perf/perf && \
|
||||||
|
@ -157,8 +157,10 @@ fetch: sources/linux-$(1).tar.xz
|
|||||||
# with DCT as part of the dependency on build_$(2)$(3)$(4) and then build
|
# with DCT as part of the dependency on build_$(2)$(3)$(4) and then build
|
||||||
# with DOCKER_CONTENT_TRUST explicitly set to 0
|
# with DOCKER_CONTENT_TRUST explicitly set to 0
|
||||||
|
|
||||||
ifneq ($(2), $(filter $(2),4.4.x 4.9.x))
|
ifeq ($(2), $(filter $(2),4.14.x 4.19.x))
|
||||||
# perf does not build out of the box for 4.4.x and 4.9.x
|
# Only build perf for the latest LTS and the latest stable kernel.
|
||||||
|
ifneq ($(ARCH),aarch64)
|
||||||
|
# Skip arm64 for now as perf for 4.19 fails to build.
|
||||||
build_perf_$(2)$(3)$(4): build_$(2)$(3)$(4)
|
build_perf_$(2)$(3)$(4): build_$(2)$(3)$(4)
|
||||||
docker pull $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
docker pull $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
|
||||||
DOCKER_CONTENT_TRUST=0 docker build -f Dockerfile.perf \
|
DOCKER_CONTENT_TRUST=0 docker build -f Dockerfile.perf \
|
||||||
@ -192,6 +194,7 @@ forcebuild: forcebuild_perf_$(2)$(3)$(4)
|
|||||||
push: push_perf_$(2)$(3)$(4)
|
push: push_perf_$(2)$(3)$(4)
|
||||||
forcepush: forcepush_perf_$(2)$(3)$(4)
|
forcepush: forcepush_perf_$(2)$(3)$(4)
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# For BCC, only build on x86 and only on latest LTS and latest stable.
|
# For BCC, only build on x86 and only on latest LTS and latest stable.
|
||||||
# That's 4.14.x and 4.19.x at time of authorship.
|
# That's 4.14.x and 4.19.x at time of authorship.
|
||||||
|
Loading…
Reference in New Issue
Block a user