Skip to content

Commit

Permalink
feat: added archlinux 5.18
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
  • Loading branch information
therealbobo committed Jul 26, 2023
1 parent baa39d1 commit fcfcbd9
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
30 changes: 30 additions & 0 deletions images/static-images/x86_64/archlinux/5.18/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM archlinux:base

WORKDIR /home/ubuntu

RUN echo 'Server=https://archive.archlinux.org/repos/2022/08/04/$repo/os/$arch' > /etc/pacman.d/mirrorlist && \
pacman -Syyu --noconfirm && \
pacman -S --noconfirm \
bpf \
clang \
cmake \
gcc \
git \
libcap \
linux-headers \
llvm \
make \
openssh \
python \
rsync \
wget && \
yes | pacman -Scc && \
ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime && \
echo 'LANG=en_US.UTF-8' > /etc/locale.gen && \
locale-gen && \
echo 'LANG=en_US.UTF-8' > /etc/locale.conf && \
echo 'archlinux' > /etc/hostname && \
systemctl enable sshd && \
sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config && \
echo 'UseDNS no' >> /etc/ssh/sshd_config && \
echo "root:root" | chpasswd
29 changes: 29 additions & 0 deletions images/static-images/x86_64/archlinux/5.18/Dockerfile.kernel
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG VERSION
ARG URL
ARG ARCH

FROM initrd-builder:0.0.1 AS builder

ARG VERSION=linux-5.18.16.arch1-1
ARG URL='https://archive.archlinux.org/packages/l'
ARG ARCH=x86_64

WORKDIR /home/ubuntu

RUN touch .placeholder && \
curl -Lo kernel.pkg.tar.zst ${URL}/linux/linux-${VERSION}-${ARCH}.pkg.tar.zst && \
curl -Lo headers.pkg.tar.zst ${URL}/linux-headers/linux-headers-${VERSION}-${ARCH}.pkg.tar.zst && \
mkdir extracted && \
cd extracted && \
ls ../*.tar.zst | \
xargs -I@ tar -xaf @ && \
find . -name '*.zst' -exec zstd -d --rm -f {} \; && \
mv ./usr/lib . && \
extract-vmlinux $(find . -name 'vmlinux') > vmlinux && \
/opt/initrd-builder/create.sh

FROM scratch

COPY --from=builder /home/ubuntu/extracted/vmlinux /boot/
COPY --from=builder /home/ubuntu/out/initrd /boot/
COPY --from=builder /home/ubuntu/.placeholder /lib/modules/

0 comments on commit fcfcbd9

Please sign in to comment.