runtime/makefile: specify emulation, flip endianness

pull/1745/head
occheung 2021-08-06 11:12:27 +08:00
parent c42adfe6fd
commit 7f0bc9f7f0
1 changed files with 3 additions and 2 deletions

View File

@ -21,10 +21,11 @@ runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o
-lunwind-bare
ksupport_data.o: ../ksupport/ksupport.elf
$(LD) -r -b binary -o $@ $<
$(LD) -m elf32lriscv -b binary -o $@ $<
%.bin: %.elf
$(objcopy) -O binary
%.fbi: %.bin
$(mscimg) -f
$(mscimg) -f --little
objcopy -I binary -O binary --reverse-bytes=4 $@