Merge pull request #18 from E-Almqvist/dev

Kernel execution!
pull/25/head
Elias Almqvist 3 years ago committed by GitHub
commit 86664a7a75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      compile.sh
  2. 6
      src/bootloader.asm
  3. 3
      start.sh

@ -12,5 +12,5 @@ nasm -f bin $srcDir/bootloader.asm -i $srcDir -o $binDir/bootloader.bin && echo
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... "
echo -n "Creating OS image... "
cat $binDir/bootloader.bin $binDir/kernel.bin > $binDir/os-image && echo $done

@ -25,9 +25,13 @@
%include "pm.asm"
BEGIN_PM:
mov ebx, stat_pm_init
; Inform of mode switch
mov ebx, stat_boot_success
call vga_print
; Execute kernel code
call KERNEL_OFFSET
jmp $
[bits 16]

@ -1,9 +1,10 @@
#!/usr/bin/bash
bootloader=bin/bootloader.bin
osimage=bin/os-image
start_bootloader() {
qemu-system-x86_64 $bootloader
qemu-system-x86_64 $osimage
}
compile() {

Loading…
Cancel
Save