diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2020-01-13 13:08:38 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2020-01-13 13:08:38 +0100 |
commit | 63b45f687868af38d21930790f0d0e517b50b2e2 (patch) | |
tree | d5e5350feee6cb2645d41592cd481bd45ebef535 | |
parent | 1af7591e37d09ddcd734ea07d0e999cf61c8bc5e (diff) | |
download | rpi-MMU-example-63b45f687868af38d21930790f0d0e517b50b2e2.tar.gz rpi-MMU-example-63b45f687868af38d21930790f0d0e517b50b2e2.zip |
shorten linking in Makefile
-rw-r--r-- | Makefile | 26 | ||||
-rw-r--r-- | src/arm/PL1/kernel/kernel.ld (renamed from src/arm/PL1/kernel/kernel_stage1.ld) | 0 | ||||
-rw-r--r-- | src/arm/PL1/loader/loader.ld (renamed from src/arm/PL1/loader/loader_stage1_linker.ld) | 0 | ||||
-rw-r--r-- | src/arm/PL1/loader/loader_stage2.ld (renamed from src/arm/PL1/loader/loader_stage2_linker.ld) | 0 |
4 files changed, 12 insertions, 14 deletions
@@ -9,7 +9,7 @@ PL_0_TEST_OBJECTS=PL0_utils.o svc.o PL0_test.o strings.o io.o LOADER_STAGE2_OBJECTS=uart.o strings.o io.o loader_stage2.o -RAMFS_FILES=PL_0_test.img +RAMFS_FILES=PL0_test.img all : kernel.img @@ -28,26 +28,24 @@ VPATH=$(src) %_embeddable.o : %.img arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm $^ $@ -PL_0_test.elf : PL0_test.ld $(PL_0_TEST_OBJECTS) - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) $(PL_0_TEST_OBJECTS) +%.elf : %.ld + arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) $(filter %.o,$^) -kernel_stage1.o : kernel_stage1.S kernel_stage2.img - arm-none-eabi-as -mcpu=cortex-a7 $< -o $@ +PL0_test.elf : $(PL_0_TEST_OBJECTS) -kernel.elf : kernel_stage1.ld kernel_stage1.o - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) kernel_stage1.o +kernel.elf : kernel_stage1.o -kernel_stage2.elf : kernel_stage2.ld $(KERNEL_STAGE2_OBJECTS) - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) $(KERNEL_STAGE2_OBJECTS) +kernel_stage2.elf : $(KERNEL_STAGE2_OBJECTS) -loader_stage2.elf : loader_stage2_linker.ld $(LOADER_STAGE2_OBJECTS) - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) $(LOADER_STAGE2_OBJECTS) +loader_stage2.elf : $(LOADER_STAGE2_OBJECTS) -loader_stage1.o : loader_stage1.S loader_stage2.img +loader.elf : loader_stage1.o + +kernel_stage1.o : kernel_stage1.S kernel_stage2.img arm-none-eabi-as -mcpu=cortex-a7 $< -o $@ -loader.elf : loader_stage1_linker.ld loader_stage1.o - arm-none-eabi-gcc -T $< -o $@ $(ELFFLAGS) loader_stage1.o +loader_stage1.o : loader_stage1.S loader_stage2.img + arm-none-eabi-as -mcpu=cortex-a7 $< -o $@ qemu-elf : kernel.elf qemu-system-arm -m 256 -M raspi2 -serial stdio -kernel $^ diff --git a/src/arm/PL1/kernel/kernel_stage1.ld b/src/arm/PL1/kernel/kernel.ld index 3130634..3130634 100644 --- a/src/arm/PL1/kernel/kernel_stage1.ld +++ b/src/arm/PL1/kernel/kernel.ld diff --git a/src/arm/PL1/loader/loader_stage1_linker.ld b/src/arm/PL1/loader/loader.ld index 711fcbf..711fcbf 100644 --- a/src/arm/PL1/loader/loader_stage1_linker.ld +++ b/src/arm/PL1/loader/loader.ld diff --git a/src/arm/PL1/loader/loader_stage2_linker.ld b/src/arm/PL1/loader/loader_stage2.ld index 33e79e9..33e79e9 100644 --- a/src/arm/PL1/loader/loader_stage2_linker.ld +++ b/src/arm/PL1/loader/loader_stage2.ld |