From 3113313b86a429b389bc26a2982418d9a0713014 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 2 Jun 2017 17:01:22 +0200 Subject: .. --- src/Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index d72f5aa..37ad6fe 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,10 +13,10 @@ all: image.bin kernel.sym # + M * 512 (M is currently 7) = 3144 for kernel.bin # + 1 * 512 = 512 for magic.bin # (M + N + 1 is the number of sectors to be read in stage 2, as stage 1 -# loads only the first sector, so adapt NOF_LOAD_SECTORS to 21) +# loads only the first sector, so adapt NOF_LOAD_SECTORS to 22) image.bin: boot.bin kernel.bin magic.bin cat boot.bin kernel.bin > image.tmp - truncate -s 10752 image.tmp + truncate -s 11264 image.tmp cat image.tmp magic.bin > image.bin boot.bin: boot.asm boot_gdt.asm stage1_functions.asm stage2_functions.asm stage2_switch_mode.asm stage2_a20.asm @@ -28,10 +28,11 @@ kernel.bin: kernel.elf kernel.sym: kernel.elf $(OBJCOPY) --only-keep-debug kernel.elf kernel.sym -kernel.elf: kernel.o console.o vga.o serial.o port.o port_asm.o interrupts.o interrupts_asm.o keyboard.o string.o stdlib.o stdio.o setjmp.o +kernel.elf: kernel.o kernel_asm.o console.o vga.o serial.o port.o port_asm.o interrupts.o interrupts_asm.o keyboard.o string.o stdlib.o stdio.o setjmp.o $(LD) -o kernel.elf -N -n -Ttext 0x8400 --oformat elf32-i386 \ - kernel.o console.o vga.o serial.o port.o port_asm.o \ - interrupts.o interrupts_asm.o keyboard.o \ + kernel.o kernel_asm.o console.o vga.o serial.o \ + port.o port_asm.o interrupts.o interrupts_asm.o \ + keyboard.o \ string.o stdlib.o stdio.o setjmp.o magic.bin: magic.asm @@ -40,6 +41,9 @@ magic.bin: magic.asm kernel.o: kernel.c $(CC) $(CFLAGS) -c -o kernel.o kernel.c +kernel_asm.o: kernel.asm + $(NASM) kernel.asm $(NASMFLAGS) -o kernel_asm.o + port.o: port.c port.h $(CC) $(CFLAGS) -c -o port.o port.c -- cgit v1.2.3-54-g00ecf