Merge pull request #901 from rneugeba/perf

Add Linux perf utility
This commit is contained in:
Justin Cormack 2016-12-16 13:31:47 -08:00 committed by GitHub
commit b1a95e7f6f
12 changed files with 53 additions and 16 deletions

View File

@ -7,16 +7,24 @@ RUN \
automake \ automake \
bash \ bash \
bc \ bc \
binutils-dev \
bison \
cmake \ cmake \
curl \ curl \
flex \
gmp-dev \ gmp-dev \
gtk+2.0-dev \
gtk+-dev \
groff \ groff \
installkernel \ installkernel \
kmod \ kmod \
libelf-dev \
linux-headers \ linux-headers \
ncurses-dev \ ncurses-dev \
perl \ perl-dev \
python-dev \
sed \ sed \
slang-dev \
squashfs-tools \ squashfs-tools \
syslinux \ syslinux \
unzip \ unzip \

1
alpine/base/perf/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/bin

View File

@ -0,0 +1,17 @@
# Tag: 3da0b0ea0da2724232603094e67c75b41adab551
FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090
ARG KERNEL_VERSION=4.8.14
# get kernel source and extract it under /linux
ENV KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.xz
RUN curl -fsSL -o linux-${KERNEL_VERSION}.tar.xz ${KERNEL_SOURCE}
RUN cat linux-${KERNEL_VERSION}.tar.xz | tar --absolute-names -xJ && mv /linux-${KERNEL_VERSION} /linux
RUN mkdir -p /build/perf && \
make -C /linux/tools/perf O=/build/perf LDFLAGS=-static
WORKDIR /build/perf
CMD ["tar", "cf", "-", "perf"]

View File

@ -0,0 +1,9 @@
DEPS=Dockerfile
bin/perf: $(DEPS)
mkdir -p bin
BUILD=$$( docker build -q . ) && \
docker run --rm --net=none $$BUILD | tar xf - -C bin
clean:
rm -rf bin

View File

@ -0,0 +1 @@
Builds a statically linked version of the Linux kernel `perf` utility. You may want to/need to adjust the kernel version in the `Dockerfile` to match your kernel.

View File

@ -1,5 +1,5 @@
# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 # Tag: 3da0b0ea0da2724232603094e67c75b41adab551
FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090
ARG KERNEL_VERSION=4.9 ARG KERNEL_VERSION=4.9

View File

@ -1,5 +1,5 @@
# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 # Tag: 3da0b0ea0da2724232603094e67c75b41adab551
FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090
ARG KERNEL_VERSION=4.8.15 ARG KERNEL_VERSION=4.8.15

View File

@ -1,5 +1,5 @@
# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 # Tag: 3da0b0ea0da2724232603094e67c75b41adab551
FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090
COPY . /9pmount-vsock COPY . /9pmount-vsock

View File

@ -1,5 +1,5 @@
# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 # Tag: 3da0b0ea0da2724232603094e67c75b41adab551
FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090
COPY . /nc-vsock COPY . /nc-vsock

View File

@ -1,5 +1,5 @@
# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 # Tag: 3da0b0ea0da2724232603094e67c75b41adab551
FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090
COPY . /tap-vsockd COPY . /tap-vsockd

View File

@ -1,5 +1,5 @@
# Tag: 36aecb5cf4738737634140eec9abebe1f6559a39 # Tag: 3da0b0ea0da2724232603094e67c75b41adab551
FROM mobylinux/alpine-build-c@sha256:d66b9625abc831f28f8c584991a9cb6975e85d3bb3d3768474b592f1cf32a3a6 FROM mobylinux/alpine-build-c@sha256:0236d6599f6c8f7aa42829285e04202fbe99984df2818af0f5a453a59de8b090
COPY . /transfused COPY . /transfused

View File

@ -9,12 +9,13 @@ generally with tags based on the image contents.
- `mobylinux/alpine-bios` for building BIOS image - `mobylinux/alpine-bios` for building BIOS image
- `mobylinux/alpine-efi` for building efi images - `mobylinux/alpine-efi` for building efi images
- `mobylinux/alpine-qemu` for Qemu eg for the tests - `mobylinux/alpine-qemu` for Qemu eg for the tests
- `mobylinux/debian-build-kernel` for the kernel builds while we cannot use Alpine
The `Dockerfile`s for these are under `alpine/base`. To update, modify the `Dockerfile` if you wish The `Dockerfile`s for these are under `alpine/base`. To update, modify the `Dockerfile` if you wish
to change the packages used, and `repositories` if needed, and run `make`. This will push the image to change the packages used, and `repositories` if needed, and run `make`. This will push the image
to Docker Hub if it has changed, and update `packages` with a list of the current versions. If the to Docker Hub if it has changed.
image has changed, update the other Dockerfiles with this base image to use this new tag.
To update `packages` to use the new version, update their respective `Dockerfile`. Make sure you also update the `# TAG: ` comment at the start of the file. Both the `TAG` and the `sha256` are printed out when pushing the update base to the hub.
For example, `alpine/base/alpine-base` is the image used to build the Moby image itself, which is For example, `alpine/base/alpine-base` is the image used to build the Moby image itself, which is
used in `alpine/Dockerfile`. The uploaded tags can be seen at [Docker Hub](https://hub.docker.com/r/mobylinux/alpine-base/tags/). used in `alpine/Dockerfile`. The uploaded tags can be seen at [Docker Hub](https://hub.docker.com/r/mobylinux/alpine-base/tags/).