diff --git a/pxe/download-linux.sh b/linux/bootloader/download.sh similarity index 100% rename from pxe/download-linux.sh rename to linux/bootloader/download.sh diff --git a/linux/.gitignore b/linux/initramfs/.gitignore similarity index 100% rename from linux/.gitignore rename to linux/initramfs/.gitignore diff --git a/linux/README.md b/linux/initramfs/README.md similarity index 100% rename from linux/README.md rename to linux/initramfs/README.md diff --git a/linux/bitpixie b/linux/initramfs/bitpixie similarity index 82% rename from linux/bitpixie rename to linux/initramfs/bitpixie index b05e834..3bd8fb6 100755 --- a/linux/bitpixie +++ b/linux/initramfs/bitpixie @@ -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 " diff --git a/linux/bitpixie-build.sh b/linux/initramfs/bitpixie-build.sh similarity index 100% rename from linux/bitpixie-build.sh rename to linux/initramfs/bitpixie-build.sh diff --git a/linux/packages b/linux/initramfs/packages similarity index 100% rename from linux/packages rename to linux/initramfs/packages diff --git a/linux/root/etc/hostname b/linux/initramfs/root/etc/hostname similarity index 100% rename from linux/root/etc/hostname rename to linux/initramfs/root/etc/hostname diff --git a/linux/root/etc/hosts b/linux/initramfs/root/etc/hosts similarity index 100% rename from linux/root/etc/hosts rename to linux/initramfs/root/etc/hosts diff --git a/linux/root/etc/modules b/linux/initramfs/root/etc/modules similarity index 100% rename from linux/root/etc/modules rename to linux/initramfs/root/etc/modules diff --git a/linux/root/etc/motd b/linux/initramfs/root/etc/motd similarity index 100% rename from linux/root/etc/motd rename to linux/initramfs/root/etc/motd diff --git a/linux/root/etc/network/interfaces b/linux/initramfs/root/etc/network/interfaces similarity index 100% rename from linux/root/etc/network/interfaces rename to linux/initramfs/root/etc/network/interfaces diff --git a/linux/root/init b/linux/initramfs/root/init similarity index 100% rename from linux/root/init rename to linux/initramfs/root/init diff --git a/linux/root/root/mount.sh b/linux/initramfs/root/root/mount.sh similarity index 100% rename from linux/root/root/mount.sh rename to linux/initramfs/root/root/mount.sh diff --git a/linux/setup.sh b/linux/initramfs/setup.sh similarity index 100% rename from linux/setup.sh rename to linux/initramfs/setup.sh diff --git a/pxe/download.sh b/pxe/download.sh deleted file mode 100755 index f433e9e..0000000 --- a/pxe/download.sh +++ /dev/null @@ -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