Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2020 18:40:45 -0400
From:      Mitchell Horne <mhorne@freebsd.org>
To:        Michael Dexter <editor@callfortesting.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: RISC-V root device question
Message-ID:  <CADeAsy2iSp%2BAe70Ziar6OLuBoUMPzsZoC%2BBQx4W3mdBTZMCnHw@mail.gmail.com>
In-Reply-To: <b9d65c65-7783-ea3d-867f-096c43635876@callfortesting.org>
References:  <4fcf5f35-481b-a321-cb52-7264fc10d1d4@callfortesting.org> <CADeAsy0jyHx10pQ5NRYzuk2gjMGOf4Of5jGOL-0BmoN5PVJd5A@mail.gmail.com> <b9d65c65-7783-ea3d-867f-096c43635876@callfortesting.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 7, 2020 at 6:28 PM Michael Dexter <editor@callfortesting.org> wrote:
>
> 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
>

My bad, the extra '=' is a typo. It should be:
  -append "vfs.root.mountfrom=ufs:/dev/vtbd0p3"

> 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.
>

Great, I will write that up soon.

> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADeAsy2iSp%2BAe70Ziar6OLuBoUMPzsZoC%2BBQx4W3mdBTZMCnHw>