mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-27 12:38:11 +00:00
Remove support for arm kernel build
See #449. Plan is to use upstream Alpine kernel for Arm, as does not need vsock, hvsock or aufs. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
4ac99b09fb
commit
69f290d28f
@ -1,7 +1,6 @@
|
|||||||
FROM ubuntu:16.04
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
ARG KERNEL_VERSION=4.4.19
|
ARG KERNEL_VERSION=4.4.19
|
||||||
ARG ARCH=x86_64
|
|
||||||
ARG DEBUG=0
|
ARG DEBUG=0
|
||||||
|
|
||||||
ENV KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.xz
|
ENV KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.xz
|
||||||
@ -27,8 +26,7 @@ RUN apt-get update && apt-get -y upgrade && apt-get -y install \
|
|||||||
p7zip-full \
|
p7zip-full \
|
||||||
lzop \
|
lzop \
|
||||||
wget \
|
wget \
|
||||||
vim \
|
vim
|
||||||
gcc-arm-linux-gnueabihf
|
|
||||||
|
|
||||||
RUN wget ${KERNEL_SOURCE}
|
RUN wget ${KERNEL_SOURCE}
|
||||||
|
|
||||||
@ -58,13 +56,11 @@ RUN git clone -b "$AUFS_BRANCH" "$AUFS_REPO" /aufs && \
|
|||||||
patch -p1 < "$patch"; \
|
patch -p1 < "$patch"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
COPY kernel_config.x86_64 /linux/arch/x86/configs/x86_64_defconfig
|
COPY kernel_config /linux/arch/x86/configs/x86_64_defconfig
|
||||||
COPY kernel_config.arm /linux/arch/arm/configs/versatile_defconfig
|
|
||||||
COPY kernel_config.debug /linux/debug_config
|
COPY kernel_config.debug /linux/debug_config
|
||||||
|
|
||||||
RUN if [ $DEBUG -ne "0" ]; then \
|
RUN if [ $DEBUG -ne "0" ]; then \
|
||||||
cat /linux/debug_config >> /linux/arch/x86/configs/x86_64_defconfig; \
|
cat /linux/debug_config >> /linux/arch/x86/configs/x86_64_defconfig; \
|
||||||
cat /linux/debug_config >> /linux/arch/arm/configs/versatile_defconfig; \
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Apply local patches
|
# Apply local patches
|
||||||
@ -80,18 +76,16 @@ RUN cd /linux && \
|
|||||||
|
|
||||||
RUN jobs=$(nproc); \
|
RUN jobs=$(nproc); \
|
||||||
cd /linux && \
|
cd /linux && \
|
||||||
make ARCH=$ARCH defconfig && \
|
make defconfig && \
|
||||||
make ARCH=$ARCH oldconfig && \
|
make oldconfig && \
|
||||||
make ARCH=$ARCH -j ${jobs} && \
|
make -j ${jobs} && \
|
||||||
make ARCH=$ARCH INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
|
make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
|
||||||
( cd /tmp/kernel-modules && tar cf /kernel-modules.tar . ) && \
|
( cd /tmp/kernel-modules && tar cf /kernel-modules.tar . ) && \
|
||||||
make ARCH=$ARCH INSTALL_HDR_PATH=/tmp/kernel-headers headers_install
|
make INSTALL_HDR_PATH=/tmp/kernel-headers headers_install
|
||||||
|
|
||||||
# Build aufs tools, do this here as they need kernel headers and to match aufs
|
# Build aufs tools, do this here as they need kernel headers and to match aufs
|
||||||
# Fortunately they are built statically linked
|
# Fortunately they are built statically linked
|
||||||
|
|
||||||
# XXX not cross compiled yet!
|
|
||||||
|
|
||||||
# aufs-util 20151116
|
# aufs-util 20151116
|
||||||
ENV AUFS_TOOLS_REPO https://github.com/Distrotech/aufs-util.git
|
ENV AUFS_TOOLS_REPO https://github.com/Distrotech/aufs-util.git
|
||||||
ENV AUFS_TOOLS_COMMIT b5e7e204036da5e815ddec15a847a03c232771b4
|
ENV AUFS_TOOLS_COMMIT b5e7e204036da5e815ddec15a847a03c232771b4
|
||||||
|
@ -1,32 +1,28 @@
|
|||||||
ARCH ?= x86_64
|
ARCH = x86_64
|
||||||
DEBUG ?= 0
|
DEBUG ?= 0
|
||||||
|
|
||||||
all: $(ARCH)/vmlinuz64
|
all: $(ARCH)/vmlinuz64
|
||||||
|
|
||||||
$(ARCH)/mobykernel-build: Dockerfile kernel_config.$(ARCH)
|
$(ARCH)/mobykernel-build: Dockerfile kernel_config
|
||||||
mkdir -p $(ARCH) && \
|
mkdir -p $(ARCH) && \
|
||||||
docker build --build-arg ARCH=$(ARCH) --build-arg DEBUG=$(DEBUG) \
|
docker build --build-arg DEBUG=$(DEBUG) -t mobykernel:build .
|
||||||
-t mobykernel-$(ARCH):build .
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(ARCH)/aufs-utils.tar $(ARCH)/kernel-source-info $(ARCH)/kernel-patches.tar $(ARCH)/kernel-modules.tar: $(ARCH)/mobykernel-build
|
$(ARCH)/aufs-utils.tar $(ARCH)/kernel-source-info $(ARCH)/kernel-patches.tar $(ARCH)/kernel-modules.tar: $(ARCH)/mobykernel-build
|
||||||
docker run --rm mobykernel-$(ARCH):build cat /$(notdir $@) > $@ || ! rm $@
|
docker run --rm mobykernel:build cat /$(notdir $@) > $@ || ! rm $@
|
||||||
|
|
||||||
$(ARCH)/bzImage $(ARCH)/zImage: $(ARCH)/aufs-utils.tar $(ARCH)/kernel-source-info $(ARCH)/kernel-patches.tar $(ARCH)/kernel-modules.tar $(ARCH)/mobykernel-build
|
$(ARCH)/bzImage $(ARCH)/zImage: $(ARCH)/aufs-utils.tar $(ARCH)/kernel-source-info $(ARCH)/kernel-patches.tar $(ARCH)/kernel-modules.tar $(ARCH)/mobykernel-build
|
||||||
docker run --rm mobykernel-$(ARCH):build cat /linux/arch/$(ARCH)/boot/$(notdir $@) > $@ || ! rm $@
|
docker run --rm mobykernel:build cat /linux/arch/$(ARCH)/boot/$(notdir $@) > $@ || ! rm $@
|
||||||
|
|
||||||
$(ARCH)/vmlinux: $(ARCH)/bzImage
|
$(ARCH)/vmlinux: $(ARCH)/bzImage
|
||||||
docker run --rm mobykernel-$(ARCH):build cat /linux/vmlinux > $@ || ! rm $@
|
docker run --rm mobykernel:build cat /linux/vmlinux > $@ || ! rm $@
|
||||||
|
|
||||||
$(ARCH)/vmlinuz64: $(ARCH)/bzImage
|
$(ARCH)/vmlinuz64: $(ARCH)/bzImage
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
arm: arm/zImage
|
|
||||||
|
|
||||||
clean-arch:
|
clean-arch:
|
||||||
rm -rf $(ARCH)
|
rm -rf $(ARCH)
|
||||||
docker images -q mobykernel-$(ARCH):build | xargs docker rmi -f || true
|
docker images -q mobykernel:build | xargs docker rmi -f || true
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) clean-arch ARCH=arm
|
|
||||||
$(MAKE) clean-arch ARCH=x86_64
|
$(MAKE) clean-arch ARCH=x86_64
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user