aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 4 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index d1d66fa..35cc48c 100644
--- a/Makefile
+++ b/Makefile
@@ -30,17 +30,14 @@ PL_0_test.elf : PL0_test.o uart.o
kernel.elf : boot.o kernel.o uart.o PL_0_test_embeddable.o demo_functionality.o paging.o libkernel_renamed.o interrupt_vector.o interrupts.o
arm-none-eabi-gcc -T linker.ld -o $@ $(ELFFLAGS) $^
-loader_stage2.elf : loader_stage2.o uart.o
- arm-none-eabi-gcc -T loader_stage2.ld -o $@ $(ELFFLAGS) $^
+loader.elf : boot.o loader_stage1.o loader_stage2.o uart.o
+ arm-none-eabi-gcc -T loader_linker.ld -o $@ $(ELFFLAGS) $^
-loader_stage2.img : loader_stage2.elf
+loader.img : loader.elf
arm-none-eabi-objcopy $^ -O binary $@
+# check if the resulting image is not too big
test -n "$$(find $@ -size -16384c)" || exit -1
-loader.elf : boot.o loader_stage1.o loader_stage2_embeddable.o
- arm-none-eabi-gcc -T loader_stage1.ld -o $@ $(ELFFLAGS) $^
-
-
qemu-elf : kernel.elf
qemu-system-arm -m 256 -M raspi2 -serial stdio -kernel $^