It fucking compiles \:D/

Signed-off-by: RouxAntoine <antoinroux@hotmail.fr>
This commit is contained in:
RouxAntoine 2024-01-05 18:47:00 +01:00
parent 615fd48a59
commit 80df61cd15
Signed by: antoine
GPG Key ID: 098FB66FC0475E70
3 changed files with 44 additions and 4 deletions

View File

@ -1,6 +1,22 @@
.PHONY: get-alpine-rootfs
.PHONY: use-alpine use-arch use-ubuntu
get-alpine-rootfs: out/alpine-minirootfs-3.19.0-x86_64.tar.gz
out/alpine-minirootfs-3.19.0-x86_64.tar.gz:
wget -O $@ https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-minirootfs-3.19.0-x86_64.tar.gz
use-arch: ../out/arch-rootfs.ext4
ln -s $< ../out/rootfs.ext4
use-alpine: ../out/alpine-rootf.ext4
ln -s $< ../out/rootfs.ext4
use-ubuntu: ../out/ubuntu-22.04.ext4
ln -s $< ../out/rootfs.ext4
../out/arch-rootfs.ext4:
bash ./arch-rootf.sh
../out/alpine-rootf.ext4:
bash ./alpine-rootf.sh
../out/ubuntu-22.04.ext4:
wget -O $@ https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.7/$$(uname -m)/ubuntu-22.04.ext4

View File

@ -0,0 +1,24 @@
#!/bin/bash
set -x
DISK_SIZE=10G
DISK_FILE=../out/alpine-rootfs.ext4
DISK_ROOT=../out/mount
# Allocate rootfs disk
fallocate -l "$DISK_SIZE" "$DISK_FILE"
mkfs.ext4 $DISK_FILE
# Mount rootfs to mount
mkdir -p $DISK_ROOT
sudo mount $DISK_FILE $DISK_ROOT
wget -O ../out/alpine-minirootfs-3.19.0-x86_64.tar.gz https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-minirootfs-3.19.0-x86_64.tar.gz
tar xvf ../out/alpine-minirootfs-3.12.0-x86.tar.gz --directory="$DISK_ROOT"
sudo umount $DISK_ROOT
rmdir $DISK_ROOT