On 12/7/20 1:56 PM, Mitchell Horne wrote:
As you suggest, it is possible to overwrite the default root device in
the kernel config, by adding a line such as:
   options ROOTDEVNAME=\"ufs:/dev/vtbd0p3\"

Thank you for the syntax!

You can also override it using the QEMU commandline, which is simpler
since you won't need to recompile anything. Adding the following
argument should suffice:
   -append="vfs.root.mountfrom=ufs:/dev/vtbd0p3"
Note that you can set arbitrary kernel environment variables this way ^^

My string:

qemu-system-riscv64 -machine virt -m 2048M -smp 2 -nographic -kernel /vms/riscv/kernel -bios /usr/local/share/opensbi/lp64/generic/firmware/fw_jump.elf -append="vfs.root.mountfrom=ufs:/dev/vtbd0p3" -drive file=$1,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev tap,ifname=tap0,script=no,id=net0

Reports:  -append=vfs.root.mountfrom=ufs:/dev/vtbd0p3: invalid option

I have tried it both there after ...elf and at the end of the string. Is this perhaps the wrong position?

Finally, we do have support for loader.efi on RISC-V, although I have
not yet documented how to use it on the wiki page. If you would like
to try this method, please follow up with me and I can provide
instructions.

I am happy to if it is ready for public consumption.

Otherwise, you can expect to see weekly RISC-V snapshots appear in the
next week or two, and I will ensure that the wiki page is up to date
with how to run them.

Thank you and keep up the good work!

Michael
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to