aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-10-03 14:04:31 +0200
committerWojtek Kosior <kwojtus@protonmail.com>2019-10-03 14:04:31 +0200
commit24ab4678b96dec56129f7e36b9304b6767777e0a (patch)
tree1ab41614fc0b6e20322ef44ec3f7a29bc3bc4877 /Makefile
parent47c327eac36e78793173496f18b56f0f2159d648 (diff)
downloadrpi-MMU-example-24ab4678b96dec56129f7e36b9304b6767777e0a.tar.gz
rpi-MMU-example-24ab4678b96dec56129f7e36b9304b6767777e0a.zip
specify load address only in linker script; change it to 0x10000 (for now); avoid padding
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 3 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 2e2f062..8ad7c03 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
all : kernel7.img
kernel.o : kernel.c
- arm-none-eabi-gcc -mcpu=cortex-a7 -ffreestanding -std=gnu99 -c -O2 -Wall -Wextra $^ -o $@
+ arm-none-eabi-gcc -mcpu=cortex-a7 -ffreestanding -std=gnu99 -c -Wall -Wextra $^ -o $@
boot.o : boot.S
arm-none-eabi-as -mcpu=cortex-a7 boot.S -o boot.o
@@ -9,13 +9,9 @@ boot.o : boot.S
kernel.elf : boot.o kernel.o
arm-none-eabi-gcc -T linker.ld -o $@ -ffreestanding -O2 -nostdlib boot.o kernel.o -lgcc
-# objcopy pads 0x0000 to 0x8000 with zeros, we get rid of them in the next recipe
-kernel_padded.img : kernel.elf
+kernel7.img : kernel.elf
arm-none-eabi-objcopy $^ -O binary $@
-kernel7.img : kernel_padded.img
- dd bs=4096 skip=8 if=$^ of=$@
-
qemu-elf : kernel.elf
qemu-system-arm -m 256 -M raspi2 -serial stdio -kernel $^
@@ -23,6 +19,6 @@ qemu-bin : kernel7.img
qemu-system-arm -m 256 -M raspi2 -serial stdio -kernel $^
clean :
- -rm kernel7.img kernel_padded.img kernel.elf boot.o kernel.o
+ -rm kernel7.img kernel.elf boot.o kernel.o
.PHONY: all qemu-elf qemu-bin clean