From 2d91eebbf1fc9335269207602b360ec485aaf7bb Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 17 Dec 2019 17:39:03 +0100 Subject: don't embed stage2 of bootloader as binary blob - use smart section naming --- Makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'Makefile') 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 $^ -- cgit v1.2.3