2016-08-05 20:07:42 +02:00
|
|
|
bootrom_img = bootrom.img
|
|
|
|
|
|
|
|
GCC=riscv64-unknown-elf-gcc
|
|
|
|
OBJCOPY=riscv64-unknown-elf-objcopy
|
|
|
|
|
|
|
|
all: $(bootrom_img)
|
|
|
|
|
2017-03-24 23:55:57 +01:00
|
|
|
%.img: %.bin
|
|
|
|
dd if=$< of=$@ bs=128 count=1
|
|
|
|
|
|
|
|
%.bin: %.elf
|
|
|
|
$(OBJCOPY) -O binary $< $@
|
2016-08-05 20:07:42 +02:00
|
|
|
|
|
|
|
%.elf: %.S linker.ld
|
2017-03-24 23:55:57 +01:00
|
|
|
$(GCC) -Tlinker.ld $< -nostdlib -static -Wl,--no-gc-sections -o $@
|