mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-14 17:42:11 +00:00
This seems the best option, although none are great - build with `make AUFS=1` to build with AUFS support, currently with 4.8 kernel - default is to build without AUFS support, with 4.9 kernel This recognises that AUFS supprot is temporary #620 and only there until we can phase it out on desktop editions, and allow the other editions that never shipped with AUFS to ship something very close to mainline. However we do still apply the patches so that the non AUFS branch runs fine on all platforms, so it can be tested elsewhere. We may be able to move the kernel versions back in line when 4.9 aufs support is out. Plan is to shift CI to build both sets of images, and get the Desktop editions to pick up the aufs set automatically, once this is merged. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
32 lines
1.7 KiB
Makefile
32 lines
1.7 KiB
Makefile
DEBUG ?= 0
|
|
|
|
all: x86_64/vmlinuz64
|
|
|
|
ifdef AUFS
|
|
x86_64/vmlinuz64: Dockerfile.aufs kernel_config kernel_config.debug kernel_config.aufs
|
|
mkdir -p x86_64 etc
|
|
BUILD=$$( docker build -f Dockerfile.aufs --build-arg DEBUG=$(DEBUG) -q . ) && [ -n "$$BUILD" ] && echo "Built $$BUILD" && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /kernel-modules.tar | tar xf - && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /aufs-utils.tar | tar xf - && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /kernel-source-info > etc/kernel-source-info && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /linux/vmlinux > x86_64/vmlinux && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /linux/arch/x86_64/boot/bzImage > $@ && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /kernel-headers.tar > x86_64/kernel-headers.tar && \
|
|
cp -a patches-aufs etc/kernel-patches
|
|
else
|
|
x86_64/vmlinuz64: Dockerfile kernel_config kernel_config.debug
|
|
mkdir -p x86_64 etc
|
|
BUILD=$$( docker build --build-arg DEBUG=$(DEBUG) -q . ) && [ -n "$$BUILD" ] && echo "Built $$BUILD" && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /kernel-modules.tar | tar xf - && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /kernel-source-info > etc/kernel-source-info && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /linux/vmlinux > x86_64/vmlinux && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /linux/arch/x86_64/boot/bzImage > $@ && \
|
|
docker run --rm --net=none --log-driver=none $$BUILD cat /kernel-headers.tar > x86_64/kernel-headers.tar && \
|
|
cp -a patches etc/kernel-patches
|
|
endif
|
|
|
|
clean:
|
|
rm -rf x86_64 lib etc usr sbin
|
|
|
|
.DELETE_ON_ERROR:
|