mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
kernel: Build the perf utility as part of the kernel build
The perf utility is somewhat kernel specific so might as well compile it when we compile the kernel. The resulting binary is statically linked (and stripped for size) and is added the resulting kernel packages. Although we add alpine packages such as libunwind and other, it seems that the config detection code for perf/tools does not detect them. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
06c857fb16
commit
baf32846d8
@ -93,6 +93,13 @@ 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 (Don't compile for 4.4.x, it's broken and tedious to fix)
|
||||||
|
RUN if [ "${KERNEL_SERIES}" != "4.4.x" ]; then \
|
||||||
|
mkdir -p /build/perf && \
|
||||||
|
make -C tools/perf LDFLAGS=-static O=/build/perf && \
|
||||||
|
strip /build/perf/perf && \
|
||||||
|
cp /build/perf/perf /out; \
|
||||||
|
fi
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
ENTRYPOINT []
|
ENTRYPOINT []
|
||||||
|
Loading…
Reference in New Issue
Block a user