@@ -22,38 +22,50 @@ jobs:
2222 nasm make cmake wget xorriso grub-pc-bin mtools \
2323 binutils-i686-linux-gnu gcc-i686-linux-gnu
2424
25+ - name : Download AI Model Asset
26+ run : |
27+ mkdir -p assets
28+ # Using a small model for faster CI builds
29+ wget -O assets/smollm2.gguf https://huggingface.co/bartowski/SmolLM2-135M-Instruct-GGUF/resolve/main/SmolLM2-135M-Instruct-Q4_K_M.gguf
30+
2531 - name : Build BasicallyLinux Kernel
2632 run : |
2733 mkdir -p build
2834 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)
2937 cmake .. \
3038 -DCMAKE_C_COMPILER=i686-linux-gnu-gcc \
3139 -DCMAKE_ASM_NASM_COMPILER=nasm \
3240 -DCMAKE_ASM_NASM_FLAGS="-f elf32" \
33- -DCMAKE_C_FLAGS="-m32" \
41+ -DCMAKE_C_FLAGS="-m32 -ffreestanding -fno-stack-protector " \
3442 -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
3543 make VERBOSE=1
3644
3745 - name : Verify Multiboot Header (CRITICAL)
3846 run : |
47+ # This tool checks if GRUB can actually find the header in the bin file
3948 if grub-file --is-x86-multiboot build/kernel.bin; then
4049 echo "✅ Multiboot header found and valid!"
4150 else
4251 echo "❌ ERROR: No Multiboot header found in kernel.bin"
52+ echo "Check that .multiboot section is at the start of your linker script."
4353 exit 1
4454 fi
4555
4656 - name : Prepare ISO Directory
4757 run : |
4858 mkdir -p isodir/boot/grub
4959 cp build/kernel.bin isodir/boot/kernel.bin
60+ cp assets/smollm2.gguf isodir/boot/smollm2.gguf
5061
5162 # Create a bulletproof grub.cfg
5263 cat << 'EOF' > isodir/boot/grub/grub.cfg
5364 set timeout=5
5465 set default=0
5566 menuentry "BasicallyLinux Alpha" {
5667 multiboot /boot/kernel.bin
68+ module /boot/smollm2.gguf "ai_model"
5769 boot
5870 }
5971 EOF
0 commit comments