summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2023-11-26 18:54:27 -0600
committerDanny Holman <dholman@gymli.org>2023-11-26 18:55:41 -0600
commit930a24807db8250a20e81509e4ec9c69a5e5a3c9 (patch)
tree199e7c33d397324a22c20c222caa5d6113e3ece8
parentc41ec0787749a983552121f52ef54f21502f25d4 (diff)
arch: i386: make: add source files
Add new source files to the x86 architecture build configuration. Signed-off-by: Danny Holman <dholman@gymli.org>
-rw-r--r--Makefile17
-rw-r--r--arch/i386/make.config3
2 files changed, 15 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 6b88f2d..4559dbf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
INCLUDE?=-Iinclude
-CFLAGS?=-O2 -ffreestanding -std=gnu11
+CFLAGS?=-O0 -ffreestanding -std=gnu11
LDFLAGS?=-nostdlib
LIBS?=-lgcc
ARCH?=i386
@@ -28,6 +28,7 @@ KERNEL_OBJS=$(KERNEL_ARCH_OBJS) \
kernel/init.o \
kernel/string.o \
kernel/io.o \
+ kernel/mem.o \
OBJS=$(ARCHDIR)/boot/crti.o \
$(ARCHDIR)/crtbegin.o \
@@ -36,12 +37,8 @@ OBJS=$(ARCHDIR)/boot/crti.o \
$(ARCHDIR)/boot/crtn.o \
LINK_LIST=$(LDFLAGS) \
- $(ARCHDIR)/boot/crti.o \
- $(ARCHDIR)/crtbegin.o \
$(KERNEL_OBJS) \
$(LIBS) \
- $(ARCHDIR)/crtend.o \
- $(ARCHDIR)/boot/crtn.o \
.PHONY: all clean install install-headers install-kernel
.SUFFIXES: .o .c .s
@@ -78,6 +75,16 @@ install-kernel: $(KERNEL)
mkdir -p $(DESTDIR)$(BOOTDIR)
cp $(KERNEL) $(DESTDIR)$(BOOTDIR)
+install-disk: $(KERNEL)
+ rm a.img
+ bximage -q -func=create -fd=1.44M a.img
+ mkdosfs a.img
+ syslinux -i a.img
+ mcopy -i a.img libcom32.c32 ::libcom32.c32
+ mcopy -i a.img mboot.c32 ::mboot.c32
+ mcopy -i a.img syslinux.cfg ::syslinux.cfg
+ mcopy -i a.img vmbox ::vmbox
+
run: $(KERNEL)
qemu-system-i386 -kernel $(KERNEL)
diff --git a/arch/i386/make.config b/arch/i386/make.config
index ec9c631..4729739 100644
--- a/arch/i386/make.config
+++ b/arch/i386/make.config
@@ -8,6 +8,9 @@ KERNEL_ARCH_OBJS=$(ARCHDIR)/boot/boot.o \
$(ARCHDIR)/boot/idt.o \
$(ARCHDIR)/boot/gdt.o \
$(ARCHDIR)/kernel/tty.o \
+ $(ARCHDIR)/kernel/alloc.o \
+ $(ARCHDIR)/kernel/multiboot.o \
$(ARCHDIR)/kernel/serial.o \
$(ARCHDIR)/kernel/pic.o \
$(ARCHDIR)/kernel/syscall.o \
+ $(ARCHDIR)/kernel/paging.o \