Skip to content
Snippets Groups Projects
Commit 885d2f15 authored by Recolic Keghart's avatar Recolic Keghart
Browse files

kernel head working

parent 14a9ce27
No related branches found
No related tags found
No related merge requests found
kernel:
gcc -ffreestanding -c kernel.c -o kernel.o # -m32
ld -o kernel.img -Ttext 0x7e00 --oformat binary kernel.o # -m elf_i386
assemble: kernel head
ld -o kernel.img -Ttext 0x7e00 --oformat binary image_head.o kernel.o -m elf_i386
# Sector 1 = bootloader, Sector 2 - (512B TO 64K) = kernel
truncate --size=65024 kernel.img
head:
nasm -f elf image_head.asm -o image_head.o
kernel:
gcc -ffreestanding -fno-pie -c kernel.c -o kernel.o -m32
clean:
rm *.o *.img
[bits 32]
[extern main]
call main
ret
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment