1
0
Fork 0
mirror of https://gitlab.com/bztsrc/bootboot.git synced 2023-02-13 20:54:32 -05:00
bztsrc--bootboot/aarch64-rpi/Makefile
2020-06-24 16:33:08 +02:00

27 lines
1.3 KiB
Makefile

all: boot.S bootboot.c fs.h
@echo " src aarch64-rpi (Raspberry Pi 3+)"
@aarch64-elf-gcc -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles -fno-stack-protector -c boot.S -o boot.o
@aarch64-elf-gcc -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles -fno-stack-protector -I ./ -c tinflate.c -o tinflate.o
@aarch64-elf-gcc -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles -fno-stack-protector -I ./ -c bootboot.c -o bootboot.o
@aarch64-elf-ld -r -b binary -o font.o font.psf
@aarch64-elf-ld -nostdlib -nostartfiles boot.o bootboot.o tinflate.o font.o -T link.ld -o bootboot.elf
@aarch64-elf-objcopy -O binary bootboot.elf ../dist/bootboot.img
@rm *.o bootboot.elf
mkboot: mkboot.c
gcc mkboot.c -o mkboot
raspbootcom: raspbootcom.c
gcc raspbootcom.c -o raspbootcom
getfw:
wget -q https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/LICENCE.broadcom
wget -q https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/bootcode.bin
wget -q https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/fixup.dat
wget -q https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/start.elf
cleanfw:
@rm LICENCE.broadcom bootcode.bin fixup.dat start.elf
clean:
@rm mkboot raspbootcom *.o >/dev/null 2>/dev/null || true