build: also create a .hex suitable for +loadmem

This commit is contained in:
Wesley W. Terpstra 2016-07-07 17:16:54 -07:00
parent f084b3f026
commit b2d540a3a7

View File

@ -22,11 +22,12 @@ pk_srcdir := $(srcdir)/riscv-pk
pk_wrkdir := $(wrkdir)/riscv-pk pk_wrkdir := $(wrkdir)/riscv-pk
bbl := $(pk_wrkdir)/bbl bbl := $(pk_wrkdir)/bbl
bin := $(wrkdir)/bbl.bin bin := $(wrkdir)/bbl.bin
hex := $(wrkdir)/bbl.hex
target := riscv64-unknown-linux-gnu target := riscv64-unknown-linux-gnu
.PHONY: all .PHONY: all
all: $(bin) all: $(hex)
$(buildroot_tar): $(buildroot_srcdir) $(buildroot_tar): $(buildroot_srcdir)
$(MAKE) -C $< O=$(buildroot_wrkdir) riscv64_defconfig $(MAKE) -C $< O=$(buildroot_wrkdir) riscv64_defconfig
@ -72,6 +73,9 @@ $(bbl): $(pk_srcdir) $(vmlinux_stripped)
$(bin): $(bbl) $(bin): $(bbl)
$(target)-objcopy -S -O binary --change-addresses -0x80000000 $< $@ $(target)-objcopy -S -O binary --change-addresses -0x80000000 $< $@
$(hex): $(bin)
xxd -c1 -p $< > $@
.PHONY: sysroot vmlinux bbl .PHONY: sysroot vmlinux bbl
sysroot: $(sysroot) sysroot: $(sysroot)
vmlinux: $(vmlinux) vmlinux: $(vmlinux)