mirror of https://github.com/E-Almqvist/eOS
commit
9e6484f685
@ -1,2 +1,3 @@ |
|||||||
bin/ |
bin/ |
||||||
*.bin |
*.bin |
||||||
|
*.o |
||||||
|
@ -1,6 +1,16 @@ |
|||||||
#!/usr/bin/bash |
#!/usr/bin/bash |
||||||
|
|
||||||
|
done="[OK]" |
||||||
|
fail="[FAIL]" |
||||||
|
|
||||||
srcDir=src |
srcDir=src |
||||||
binDir=bin |
binDir=bin |
||||||
|
|
||||||
nasm -f bin $srcDir/bootloader.asm -i $srcDir -o $binDir/bootloader.bin |
echo -n "Compiling bootloader... " |
||||||
|
nasm -f bin $srcDir/bootloader.asm -i $srcDir -o $binDir/bootloader.bin && echo $done |
||||||
|
|
||||||
|
echo -n "Compiling kernel... " |
||||||
|
gcc -ffreestanding -c $srcDir/kernel.c -o $binDir/kernel.o && ld -o $binDir/kernel.bin -Ttext 0x1000 $binDir/kernel.o --oformat binary 2>/dev/null && echo $done |
||||||
|
|
||||||
|
echo -n "Creating kernel image... " |
||||||
|
cat $binDir/bootloader.bin $binDir/kernel.bin > $binDir/os-image && echo $done |
||||||
|
@ -0,0 +1,7 @@ |
|||||||
|
// VGA base address: 0xb8000
|
||||||
|
// Charpos = 0xb8000 + 2(row*80 + col)
|
||||||
|
|
||||||
|
void main() { |
||||||
|
char* video_mem = (char*)0xb8000; // VGA Video Memory location
|
||||||
|
*video_mem = 'X';
|
||||||
|
} |
Loading…
Reference in new issue