diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-04-30 21:34:51 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-04-30 21:34:51 +0200 |
commit | b66488781fe10292962a6c85881c329dcbafd0ba (patch) | |
tree | ce4d6adbec9cbe0182d916ea25b7e9a325d155c1 /src/Makefile | |
parent | 8fb0c27ac52a76dd27a5879bebb643f56abe348a (diff) | |
download | abaos-b66488781fe10292962a6c85881c329dcbafd0ba.tar.gz abaos-b66488781fe10292962a6c85881c329dcbafd0ba.tar.bz2 |
accomodated for bigger bootloader stage2
fixed printing of rotating bar
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile index 9132a1b..041a029 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,20 +1,23 @@ CC := gcc +CFLAGS := -std=c99 -m32 -ffreestanding LD := ld all: image.bin image.bin: boot.bin kernel.bin cat boot.bin kernel.bin > image.bin - truncate -s 1536 image.bin + # truncate to correct number of sectors, we have + # 512 (boot) + N * 1024 (N currenty is 2) + truncate -s 2560 image.bin boot.bin: boot.asm gdt.asm stage1_functions.asm stage2_functions.asm switch_mode.asm nasm boot.asm -f bin -o boot.bin kernel.bin: kernel.o - $(LD) -o kernel.bin -Ttext 0x8000 kernel.o -m elf_i386 --oformat binary + $(LD) -o kernel.bin -Ttext 0x8000 kernel.o --oformat binary kernel.o: kernel.c - $(CC) -m32 -ffreestanding -c -o kernel.o kernel.c + $(CC) $(CFLAGS) -O0 -c -o kernel.o kernel.c clean: -rm -f boot.bin kernel.bin image.bin *.o @@ -26,4 +29,4 @@ run-bochs: bochs -q -f bochs.config 'boot:floppy' 'floppya: 1_44=image.bin, status=inserted' functions.o: functions.c - gcc -m32 -ffreestanding -c -o functions.o functions.c + $(CC) $(CFLAGS) -c -o functions.o functions.c |