build: Add build pipeline groundwork
Signed-off-by: Chloe M. <chloe@yiffware.org>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Copyright (c) 2026, Chloe M., et al
|
||||
# Provided under the BSD-3 clause
|
||||
#
|
||||
|
||||
.PHONY: all
|
||||
all: deps iso
|
||||
|
||||
.PHONY: deps
|
||||
deps:
|
||||
./host/deps.sh
|
||||
|
||||
.PHONY: iso
|
||||
iso:
|
||||
./host/iso.sh
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2026, Chloe M., et al
|
||||
# Provided under the BSD-3 clause
|
||||
#
|
||||
|
||||
if [ ! -d stand/limine ]; then
|
||||
curl -L https://github.com/Limine-Bootloader/Limine/releases/latest/download/limine-binary.tar.gz | gunzip | tar -xf -
|
||||
mkdir -p stand/
|
||||
mv limine-binary stand/limine/
|
||||
make -C stand/limine/
|
||||
fi
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2026, Chloe M., et al
|
||||
# Provided under the BSD-3 clause
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
ISO=$PT_PROJECT_ROOT/artifacts/ptos.iso
|
||||
CONFIG=$PT_PROJECT_ROOT/service/base/boot/limine.conf
|
||||
KERNEL=$PT_PROJECT_ROOT/artifacts/ptsv.sys
|
||||
|
||||
mkdir -p iso_root/boot/
|
||||
|
||||
# Copy the kernel to the ISO root
|
||||
cp $KERNEL iso_root/boot
|
||||
|
||||
# Copy boot files
|
||||
cp $CONFIG stand/limine/limine-bios.sys \
|
||||
stand/limine/limine-bios-cd.bin \
|
||||
stand/limine/limine-uefi-cd.bin \
|
||||
iso_root/
|
||||
|
||||
# Generate the ISO
|
||||
xorriso -as mkisofs -b limine-bios-cd.bin -no-emul-boot -boot-load-size 4 \
|
||||
-boot-info-table --efi-boot limine-uefi-cd.bin -efi-boot-part \
|
||||
--efi-boot-image --protective-msdos-label iso_root/ -o $ISO 2>/dev/null
|
||||
|
||||
stand/limine/limine bios-install $ISO 2>/dev/null
|
||||
rm -rf iso_root
|
||||
Reference in New Issue
Block a user