mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-24 19:28:09 +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
|
||||
|
||||
ARG KERNEL_VERSION=4.4.19
|
||||
ARG ARCH=x86_64
|
||||
ARG DEBUG=0
|
||||
|
||||
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 \
|
||||
lzop \
|
||||
wget \
|
||||
vim \
|
||||
gcc-arm-linux-gnueabihf
|
||||
vim
|
||||
|
||||
RUN wget ${KERNEL_SOURCE}
|
||||
|
||||
@ -58,13 +56,11 @@ RUN git clone -b "$AUFS_BRANCH" "$AUFS_REPO" /aufs && \
|
||||
patch -p1 < "$patch"; \
|
||||
done
|
||||
|
||||
COPY kernel_config.x86_64 /linux/arch/x86/configs/x86_64_defconfig
|
||||
COPY kernel_config.arm /linux/arch/arm/configs/versatile_defconfig
|
||||
COPY kernel_config /linux/arch/x86/configs/x86_64_defconfig
|
||||
COPY kernel_config.debug /linux/debug_config
|
||||
|
||||
RUN if [ $DEBUG -ne "0" ]; then \
|
||||
cat /linux/debug_config >> /linux/arch/x86/configs/x86_64_defconfig; \
|
||||
cat /linux/debug_config >> /linux/arch/arm/configs/versatile_defconfig; \
|
||||
fi
|
||||
|
||||
# Apply local patches
|
||||
@ -80,18 +76,16 @@ RUN cd /linux && \
|
||||
|
||||
RUN jobs=$(nproc); \
|
||||
cd /linux && \
|
||||
make ARCH=$ARCH defconfig && \
|
||||
make ARCH=$ARCH oldconfig && \
|
||||
make ARCH=$ARCH -j ${jobs} && \
|
||||
make ARCH=$ARCH INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
|
||||
make defconfig && \
|
||||
make oldconfig && \
|
||||
make -j ${jobs} && \
|
||||
make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
|
||||
( 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
|
||||
# Fortunately they are built statically linked
|
||||
|
||||
# XXX not cross compiled yet!
|
||||
|
||||
# aufs-util 20151116
|
||||
ENV AUFS_TOOLS_REPO https://github.com/Distrotech/aufs-util.git
|
||||
ENV AUFS_TOOLS_COMMIT b5e7e204036da5e815ddec15a847a03c232771b4
|
||||
|
@ -1,32 +1,28 @@
|
||||
ARCH ?= x86_64
|
||||
ARCH = x86_64
|
||||
DEBUG ?= 0
|
||||
|
||||
all: $(ARCH)/vmlinuz64
|
||||
|
||||
$(ARCH)/mobykernel-build: Dockerfile kernel_config.$(ARCH)
|
||||
$(ARCH)/mobykernel-build: Dockerfile kernel_config
|
||||
mkdir -p $(ARCH) && \
|
||||
docker build --build-arg ARCH=$(ARCH) --build-arg DEBUG=$(DEBUG) \
|
||||
-t mobykernel-$(ARCH):build .
|
||||
docker build --build-arg DEBUG=$(DEBUG) -t mobykernel:build .
|
||||
touch $@
|
||||
|
||||
$(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
|
||||
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
|
||||
docker run --rm mobykernel-$(ARCH):build cat /linux/vmlinux > $@ || ! rm $@
|
||||
docker run --rm mobykernel:build cat /linux/vmlinux > $@ || ! rm $@
|
||||
|
||||
$(ARCH)/vmlinuz64: $(ARCH)/bzImage
|
||||
cp $< $@
|
||||
|
||||
arm: arm/zImage
|
||||
|
||||
clean-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:
|
||||
$(MAKE) clean-arch ARCH=arm
|
||||
$(MAKE) clean-arch ARCH=x86_64
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user