From af529606e911583adba217702f02181bb6a291cc Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 25 Jul 2007 03:30:16 +0000 Subject: [PATCH] load address changed to 1MB git-svn-id: svn://anubis/hos/trunk@7 5b3e749e-e535-0410-8002-a9bb6afbdfca --- Makefile | 4 +++- kernel/Makefile | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 590a11c..5b13490 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ MKISOFS = genisoimage ISO = $(HOS).iso QEMU = qemu-system-x86_64 -.PHONY: kernel clean qemu +.PHONY: kernel clean qemu iso # default target: build the kernel and ISO image all: kernel iso @@ -14,6 +14,8 @@ kernel: make -C kernel # build the ISO image +iso: $(ISO) + $(ISO): kernel cp kernel/$(HOS) iso/boot $(MKISOFS) -R -b boot/grub/stage2_eltorito -no-emul-boot \ diff --git a/kernel/Makefile b/kernel/Makefile index 745f3b3..703e179 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -1,12 +1,14 @@ KERNEL = hos -TARGET = elf32-i386 +LOAD_ADDRESS = 0x100000 +LDTARGET = elf32-i386 +LDFLAGS = -Ttext $(LOAD_ADDRESS) --oformat $(LDTARGET) .PHONY: clean all: nasm -f elf -o boot.o boot.asm - ld --oformat $(TARGET) -o $(KERNEL) boot.o + ld $(LDFLAGS) -o $(KERNEL) boot.o clean: -rm -f *~ $(KERNEL) *.o