Move initramfs generation into subfolder

This commit is contained in:
Marc André Tanner
2025-02-24 08:19:55 +01:00
parent 7b5545c64e
commit 3f841cbbcd
15 changed files with 7 additions and 14 deletions
+7 -6
View File
@@ -2,7 +2,8 @@
set -e
name="bitpixie"
images="images"
scriptpath="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
images="$scriptpath/images"
# Images are stored in the images/ folder, named like $name.2024123101.* where
# the last two digits are an increasing counter.
@@ -40,8 +41,8 @@ case "$1" in
image=$(next_image)
fi
echo "Building image $image"
docker run --privileged --platform linux/amd64 --rm -v "$PWD":/mnt -w /root \
alpine:3.20.3 "/mnt/$name-build.sh" "/mnt/$images/$image"
docker run --privileged --platform linux/amd64 --rm -v "${scriptpath}":/mnt -w /root \
alpine:3.20.3 "/mnt/$name-build.sh" "/mnt/images/$image"
;;
qemu)
image=$(latest_image)
@@ -55,9 +56,9 @@ case "$1" in
;;
deploy)
image=$(latest_image)
echo "Deploying image $image to ../pxe/tftp"
cp "$images/$image.kernel" "../pxe/tftp/linux"
cp "$images/$image.initramfs" "../pxe/tftp/alpine-initrd.xz"
echo "Deploying image $image to $scriptpath/../../pxe/tftp"
cp "$images/$image.kernel" "$scriptpath/../../pxe/tftp/linux"
cp "$images/$image.initramfs" "$scriptpath/../../pxe/tftp/alpine-initrd.xz"
;;
"")
echo "Usage: $0 <subcommand>"
-8
View File
@@ -1,8 +0,0 @@
#!/bin/sh
if [ -f tftp/grubx64.efi ] && [ -f tftp/shimx64.efi ]; then
echo "Skipping Linux related artifacts download"
else
docker run --platform linux/amd64 --rm -v "$PWD":/mnt -w /root \
alpine:3.20.3 "/mnt/download-linux.sh"
fi