Kernel runs in the higher address space

This commit is contained in:
Taku Shimosawa
2011-11-07 00:48:22 +09:00
parent 83a17650b9
commit 2773606466
11 changed files with 224 additions and 6 deletions

27
kboot/Makefile Normal file
View File

@@ -0,0 +1,27 @@
DEST=$(O)/kboot
OBJS=$(DEST)/main.o $(DEST)/data.o
CFLAGS=-mno-sse -mno-mmx -mno-sse2 -mno-3dnow
$(if $(O),,$(error Specify the target directory))
$(DEST)/kboot.elf: $(DEST) $(DEST)/kernel.lds $(OBJS)
@$(LD) $(LDFLAGS) -o $@ -T $(DEST)/kernel.lds -nostdlib $(OBJS)
$(DEST)/%.o: %.c
@$(CC) $(CFLAGS) -c -o $@ -O3 $<
$(DEST)/data.o: data.S
@$(CC) -c -o $@ -O3 -DKIMAGE='"$(KIMAGE)"' $^
$(DEST)/kernel.lds: kernel.lds.S
$(if $(LOAD_PA),,$(error Specify the loading physical address))
@$(CC) -E -P -DLOAD_PA=$(LOAD_PA) -o $@ $<
$(DEST):
@mkdir -p $(DEST)
clean:
@$(RM) $(DEST)/*
.PHONY: clean