feat: add linux-server kernel
This commit is contained in:
parent
0ccad9af12
commit
9173b4ad3e
2 changed files with 6034 additions and 0 deletions
58
packages/linux-server/Containerfile
Normal file
58
packages/linux-server/Containerfile
Normal file
|
@ -0,0 +1,58 @@
|
|||
FROM scratch AS base
|
||||
ENV VERSION=6.10.7
|
||||
ENV SRC_HASH=900d567ff01824708ce24c3b37faaef03e6f6145411dd447a6ff2edc8c5db3a9
|
||||
ENV SRC_FILE=linux-${VERSION}.tar.xz
|
||||
ENV SRC_SITE=http://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/${SRC_FILE}
|
||||
|
||||
FROM base AS fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch AS build
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/make . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/linux-headers . /
|
||||
COPY --from=stagex/elfutils . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/perl . /
|
||||
COPY --from=stagex/m4 . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/bison . /
|
||||
COPY --from=stagex/libzstd . /
|
||||
COPY --from=stagex/zlib . /
|
||||
COPY --from=stagex/flex . /
|
||||
COPY --from=stagex/pkgconf . /
|
||||
COPY --from=stagex/coreutils . /
|
||||
COPY --from=stagex/findutils . /
|
||||
COPY --from=stagex/diffutils . /
|
||||
COPY --from=stagex/tar . /
|
||||
COPY --from=stagex/gzip . /
|
||||
COPY --from=stagex/xz . /
|
||||
COPY --from=stagex/sed . /
|
||||
COPY --from=stagex/grep . /
|
||||
COPY --from=stagex/gawk . /
|
||||
COPY --from=stagex/bc . /
|
||||
COPY --from=stagex/bash . /
|
||||
COPY --from=stagex/bash /bin/bash /bin/sh
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR /linux-${VERSION}
|
||||
ADD linux.config .config
|
||||
ENV SOURCE_DATE_EPOCH=1
|
||||
ENV KBUILD_BUILD_HOST=stagex
|
||||
ENV KBUILD_BUILD_USER=user
|
||||
ENV KBUILD_BUILD_TIMESTAMP="Thu Jan 1 12:00:00 AM GMT 1970"
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
make -j "$(nproc)" bzImage
|
||||
EOF
|
||||
|
||||
FROM build AS install
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
mkdir /rootfs
|
||||
cp .config /rootfs/linux.config
|
||||
cp arch/x86_64/boot/bzImage /rootfs
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem AS package
|
||||
COPY --from=install /rootfs/. /
|
5976
packages/linux-server/linux.config
Normal file
5976
packages/linux-server/linux.config
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue