Build a basic Linux kernel and ramdisk that can start in QEMU.

This commit is contained in:
Adam Wick
2020-12-30 10:50:16 -08:00
commit 1838e73db3
7 changed files with 1801 additions and 0 deletions

24
docker/Dockerfile.kernel Normal file
View File

@@ -0,0 +1,24 @@
FROM fedora:latest
ENV KERNEL_VERSION=5.10.3
RUN dnf install -y \
bc \
bison \
clang \
cpio \
curl \
diffutils \
elfutils-libelf-devel \
findutils \
flex \
hostname \
make \
ncurses-devel \
patch \
xz
RUN mkdir -p /build/ramfs
RUN curl https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${KERNEL_VERSION}.tar.xz | tar xJC /build
RUN mv /build/linux* /build/kernel
COPY buildramfs.sh /build/ramfs/buildramfs.sh
COPY lam.config /build/kernel/.config