Files
ipxe/src/arch/riscv/Makefile.sbi
Michael Brown d1c1e578af [riscv] Add a .pf32 build target for padded parallel flash images
QEMU's -pflash option requires an image that has been padded to the
exact expected size (32MB for all of the supported RISC-V virtual
machines).

Add a .pf32 build target which is simply the equivalent .sbi target
padded to 32MB in size, to simplify testing.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2025-05-13 18:25:24 +01:00

25 lines
550 B
Makefile

# -*- makefile -*- : Force emacs to use Makefile mode
# Build a position-independent executable, with relocations required
# only for data values. Runtime relocations are applied by the
# prefix code.
#
CFLAGS += -mcmodel=medany -fpie
LDFLAGS += -pie --no-dynamic-linker -z combreloc
# Linker script
#
LDSCRIPT = arch/riscv/scripts/sbi.lds
# Media types
#
MEDIA += sbi
MEDIA += lkrn
# Padded flash device images (e.g. for QEMU's -pflash option)
#
NON_AUTO_MEDIA += pf32
%.pf32 : %.sbi $(MAKEDEPS)
$(Q)$(CP) $< $@
$(Q)$(TRUNCATE) -s 32M $@