Feat: Finnaly in 32-bits
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
echo ">>> Compiling bootloader"
|
||||
nasm boot.asm -o boot.o -f elf32
|
||||
#!/bin/sh
|
||||
export PATH=/usr/local/cross/bin:$PATH
|
||||
|
||||
echo ">>> Compiling kernel"
|
||||
gcc kernel.c -o kernel.o -c -m32 -ffreestanding -nostdlib -no-pie
|
||||
# 1. Assemble raw binary
|
||||
echo ">>> Assembling boot.asm to boot.bin..."
|
||||
nasm -f bin boot.asm -o boot.bin
|
||||
|
||||
echo ">>> Linking kernel"
|
||||
gcc -m32 -nostdlib -no-pie -T linker.ld -o SoraOS boot.o kernel.o
|
||||
# 2. Run QEMU as a raw disk drive
|
||||
echo ">>> Running QEMU with boot.bin..."
|
||||
qemu-system-x86_64 -drive format=raw,file=boot.bin
|
||||
|
||||
echo "Done!"
|
||||
|
||||
Reference in New Issue
Block a user