On 2023-05-25 01:52:29+0800, Zhangjin Wu wrote: > riscv qemu has a builtin bios (opensbi), but it may not match the latest > kernel and some old versions may hang during boot, let's allow user pass > a newer version to qemu via the -bios option. Nitpick: This seems very specific and hopefully only necessary temporarily. Instead it could be changed to some generic mechanim like "QEMU_ARGS_EXTRA"? > we can use it like this: > > $ make run BIOS=/path/to/new-bios ... > > Signed-off-by: Zhangjin Wu <falcon@xxxxxxxxxxx> > --- > tools/testing/selftests/nolibc/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile > index 9adc8944dd80..9213763ab3b6 100644 > --- a/tools/testing/selftests/nolibc/Makefile > +++ b/tools/testing/selftests/nolibc/Makefile > @@ -70,7 +70,8 @@ QEMU_ARGS_mips = -M malta -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" > QEMU_ARGS_riscv = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" > QEMU_ARGS_s390 = -M s390-ccw-virtio -m 1G -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" > QEMU_ARGS_loongarch = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" > -QEMU_ARGS = $(QEMU_ARGS_$(ARCH)) > +QEMU_ARGS_BIOS = $(if $(BIOS),-bios $(BIOS)) > +QEMU_ARGS = $(QEMU_ARGS_$(ARCH)) $(QEMU_ARGS_BIOS) > > # OUTPUT is only set when run from the main makefile, otherwise > # it defaults to this nolibc directory. > -- > 2.25.1 >