@@ -19,54 +19,51 @@ jobs:
1919 run : |
2020 sudo apt-get update
2121 sudo apt-get install -y \
22- nasm \
23- make \
24- cmake \
25- binutils-i686-linux-gnu \
26- gcc-i686-linux-gnu \
27- libgcc-s1-i386-cross \
28- wget \
29- grub-pc-bin \
30- xorriso \
31- mtools
32-
33- - name : Cache AI Model
34- id : cache-model
35- uses : actions/cache@v4
36- with :
37- path : assets/smollm2.gguf
38- key : ${{ runner.os }}-model-smollm2
22+ nasm make cmake wget xorriso grub-pc-bin mtools \
23+ binutils-i686-linux-gnu gcc-i686-linux-gnu
3924
4025 - name : Download AI Model Asset
41- if : steps.cache-model.outputs.cache-hit != 'true'
4226 run : |
4327 mkdir -p assets
28+ # Using a small model for faster CI builds
4429 wget -O assets/smollm2.gguf https://huggingface.co/bartowski/SmolLM2-135M-Instruct-GGUF/resolve/main/SmolLM2-135M-Instruct-Q4_K_M.gguf
4530
4631 - name : Build BasicallyLinux Kernel
4732 run : |
4833 mkdir -p build
4934 cd build
35+ # -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY prevents CMake from
36+ # failing because it can't run a test program (since it's a kernel)
5037 cmake .. \
5138 -DCMAKE_C_COMPILER=i686-linux-gnu-gcc \
5239 -DCMAKE_ASM_NASM_COMPILER=nasm \
5340 -DCMAKE_ASM_NASM_FLAGS="-f elf32" \
54- -DCMAKE_C_FLAGS="-m32" \
41+ -DCMAKE_C_FLAGS="-m32 -ffreestanding -fno-stack-protector " \
5542 -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
56- make
43+ make VERBOSE=1
44+
45+ - name : Verify Multiboot Header (CRITICAL)
46+ run : |
47+ # This tool checks if GRUB can actually find the header in the bin file
48+ if grub-file --is-x86-multiboot build/kernel.bin; then
49+ echo "✅ Multiboot header found and valid!"
50+ else
51+ echo "❌ ERROR: No Multiboot header found in kernel.bin"
52+ echo "Check that .multiboot section is at the start of your linker script."
53+ exit 1
54+ fi
5755
58- - name : Create ISO Structure
56+ - name : Prepare ISO Directory
5957 run : |
6058 mkdir -p isodir/boot/grub
6159 cp build/kernel.bin isodir/boot/kernel.bin
62- # Optional: Put the AI model inside the ISO as a multiboot module
6360 cp assets/smollm2.gguf isodir/boot/smollm2.gguf
6461
65- # Generate GRUB configuration
62+ # Create a bulletproof grub.cfg
6663 cat << 'EOF' > isodir/boot/grub/grub.cfg
67- set timeout=0
64+ set timeout=5
6865 set default=0
69- menuentry "BasicallyLinux" {
66+ menuentry "BasicallyLinux Alpha " {
7067 multiboot /boot/kernel.bin
7168 module /boot/smollm2.gguf "ai_model"
7269 boot
@@ -75,10 +72,10 @@ jobs:
7572
7673 - name : Generate Bootable ISO
7774 run : |
75+ # grub-mkrescue creates the actual bootable image
7876 grub-mkrescue -o basicallylinux.iso isodir
7977
8078 - name : Archive ISO Artifact
81- if : success()
8279 uses : actions/upload-artifact@v4
8380 with :
8481 name : basicallylinux-bootable-iso
0 commit comments