All of lore.kernel.org
 help / color / mirror / Atom feed
* Emulation for riscv
@ 2020-10-22 22:56 Moises Arreola
  2020-10-23  0:56 ` Alistair Francis
  0 siblings, 1 reply; 7+ messages in thread
From: Moises Arreola @ 2020-10-22 22:56 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]

Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v
processor, I'm using the Risc-V Getting Started Guide and on the final step
I'm getting an error while trying to launch the virtual machine using the
cmd:

sudo qemu-system-riscv64 -nographic -machine virt \
-kernel linux/arch/riscv/boot/Image -append "root=/dev/vda ro
console=ttyS0" \
-drive file=busybox,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0

But what I get in return is a message telling me that the file I gave
wasn't the right one, the actual output is:

qemu-system-riscv64: -drive file=busybox,format=raw,id=hd0: A regular file
was expected by the 'file' driver, but something else was given

And I checked the file busybox with de cmd "file" and got the following :
busybox: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, for
GNU/Linux 4.15.0, stripped

So I was wondering if the error message was related to qemu.
Thanks in advance for answering any suggestions are welcome

[-- Attachment #2: Type: text/html, Size: 1224 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emulation for riscv
  2020-10-22 22:56 Emulation for riscv Moises Arreola
@ 2020-10-23  0:56 ` Alistair Francis
  2020-11-06  4:42   ` Palmer Dabbelt
  0 siblings, 1 reply; 7+ messages in thread
From: Alistair Francis @ 2020-10-23  0:56 UTC (permalink / raw)
  To: Moises Arreola; +Cc: qemu-devel@nongnu.org Developers

On Thu, Oct 22, 2020 at 4:58 PM Moises Arreola <moyarrezam@gmail.com> wrote:
>
> Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v processor, I'm using the Risc-V Getting Started Guide and on the final step I'm getting an error while trying to launch the virtual machine using the cmd:

Hello,

Please don't use the RISC-V Getting Started Guide. Pretty much all of
the information there is out of date and wrong. Unfortunately we are
unable to correct it.

The QEMU wiki is a much better place for information:
https://wiki.qemu.org/Documentation/Platforms/RISCV

>
> sudo qemu-system-riscv64 -nographic -machine virt \
> -kernel linux/arch/riscv/boot/Image -append "root=/dev/vda ro console=ttyS0" \
> -drive file=busybox,format=raw,id=hd0 \
> -device virtio-blk-device,drive=hd0
>
> But what I get in return is a message telling me that the file I gave wasn't the right one, the actual output is:
>
> qemu-system-riscv64: -drive file=busybox,format=raw,id=hd0: A regular file was expected by the 'file' driver, but something else was given
>
> And I checked the file busybox with de cmd "file" and got the following :
> busybox: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, for GNU/Linux 4.15.0, stripped

That looks like an ELF, which won't work when attached as a drive.

How are you building this rootFS?

Alistair

>
> So I was wondering if the error message was related to qemu.
> Thanks in advance for answering any suggestions are welcome


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emulation for riscv
  2020-10-23  0:56 ` Alistair Francis
@ 2020-11-06  4:42   ` Palmer Dabbelt
  2020-11-06 10:36     ` Alex Bennée
  0 siblings, 1 reply; 7+ messages in thread
From: Palmer Dabbelt @ 2020-11-06  4:42 UTC (permalink / raw)
  To: alistair23; +Cc: qemu-devel, moyarrezam

On Thu, 22 Oct 2020 17:56:38 PDT (-0700), alistair23@gmail.com wrote:
> On Thu, Oct 22, 2020 at 4:58 PM Moises Arreola <moyarrezam@gmail.com> wrote:
>>
>> Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v processor, I'm using the Risc-V Getting Started Guide and on the final step I'm getting an error while trying to launch the virtual machine using the cmd:
>
> Hello,
>
> Please don't use the RISC-V Getting Started Guide. Pretty much all of
> the information there is out of date and wrong. Unfortunately we are
> unable to correct it.
>
> The QEMU wiki is a much better place for information:
> https://wiki.qemu.org/Documentation/Platforms/RISCV

Ya, everything at riscv.org is useless.  It's best to stick to the open source
documentation, as when that gets out of date we can at least fix it.  Using a
distro helps a lot here, the wiki describes how to run a handful of popular
ones that were ported to RISC-V early but if your favorite isn't on the list
then it may have its own documentation somewhere else.

>> sudo qemu-system-riscv64 -nographic -machine virt \
>> -kernel linux/arch/riscv/boot/Image -append "root=/dev/vda ro console=ttyS0" \
>> -drive file=busybox,format=raw,id=hd0 \
>> -device virtio-blk-device,drive=hd0
>>
>> But what I get in return is a message telling me that the file I gave wasn't the right one, the actual output is:
>>
>> qemu-system-riscv64: -drive file=busybox,format=raw,id=hd0: A regular file was expected by the 'file' driver, but something else was given
>>
>> And I checked the file busybox with de cmd "file" and got the following :
>> busybox: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, for GNU/Linux 4.15.0, stripped
>
> That looks like an ELF, which won't work when attached as a drive.
>
> How are you building this rootFS?
>
> Alistair
>
>>
>> So I was wondering if the error message was related to qemu.
>> Thanks in advance for answering any suggestions are welcome


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emulation for riscv
  2020-11-06  4:42   ` Palmer Dabbelt
@ 2020-11-06 10:36     ` Alex Bennée
  2021-01-14  0:01       ` Alistair Francis
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Bennée @ 2020-11-06 10:36 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: alistair23, qemu-devel, moyarrezam


Palmer Dabbelt <palmer@dabbelt.com> writes:

> On Thu, 22 Oct 2020 17:56:38 PDT (-0700), alistair23@gmail.com wrote:
>> On Thu, Oct 22, 2020 at 4:58 PM Moises Arreola <moyarrezam@gmail.com> wrote:
>>>
>>> Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v processor, I'm using the Risc-V Getting Started Guide and on the final step I'm getting an error while trying to launch the virtual machine using the cmd:
>>
>> Hello,
>>
>> Please don't use the RISC-V Getting Started Guide. Pretty much all of
>> the information there is out of date and wrong. Unfortunately we are
>> unable to correct it.
>>
>> The QEMU wiki is a much better place for information:
>> https://wiki.qemu.org/Documentation/Platforms/RISCV
>
> Ya, everything at riscv.org is useless.  It's best to stick to the open source
> documentation, as when that gets out of date we can at least fix it.  Using a
> distro helps a lot here, the wiki describes how to run a handful of popular
> ones that were ported to RISC-V early but if your favorite isn't on the list
> then it may have its own documentation somewhere else.

Even better if you could submit some .rst pages for QEMU's git:

  docs/system/target-riscv.rst
  docs/system/riscv/virt.rst (and maybe the other models)

then we could improve the user manual where RiscV is currently a little
under-represented. A number of the systems have simple example command
lines or explain the kernel support needed for the model.

>
>>> sudo qemu-system-riscv64 -nographic -machine virt \
>>> -kernel linux/arch/riscv/boot/Image -append "root=/dev/vda ro console=ttyS0" \
>>> -drive file=busybox,format=raw,id=hd0 \
>>> -device virtio-blk-device,drive=hd0
>>>
>>> But what I get in return is a message telling me that the file I gave wasn't the right one, the actual output is:
>>>
>>> qemu-system-riscv64: -drive file=busybox,format=raw,id=hd0: A regular file was expected by the 'file' driver, but something else was given
>>>
>>> And I checked the file busybox with de cmd "file" and got the following :
>>> busybox: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, for GNU/Linux 4.15.0, stripped
>>
>> That looks like an ELF, which won't work when attached as a drive.
>>
>> How are you building this rootFS?
>>
>> Alistair
>>
>>>
>>> So I was wondering if the error message was related to qemu.
>>> Thanks in advance for answering any suggestions are welcome


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emulation for riscv
  2020-11-06 10:36     ` Alex Bennée
@ 2021-01-14  0:01       ` Alistair Francis
  2021-01-14  9:49         ` Bin Meng
  0 siblings, 1 reply; 7+ messages in thread
From: Alistair Francis @ 2021-01-14  0:01 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Palmer Dabbelt, qemu-devel@nongnu.org Developers, Moises Arreola

On Fri, Nov 6, 2020 at 2:36 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Palmer Dabbelt <palmer@dabbelt.com> writes:
>
> > On Thu, 22 Oct 2020 17:56:38 PDT (-0700), alistair23@gmail.com wrote:
> >> On Thu, Oct 22, 2020 at 4:58 PM Moises Arreola <moyarrezam@gmail.com> wrote:
> >>>
> >>> Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v processor, I'm using the Risc-V Getting Started Guide and on the final step I'm getting an error while trying to launch the virtual machine using the cmd:
> >>
> >> Hello,
> >>
> >> Please don't use the RISC-V Getting Started Guide. Pretty much all of
> >> the information there is out of date and wrong. Unfortunately we are
> >> unable to correct it.
> >>
> >> The QEMU wiki is a much better place for information:
> >> https://wiki.qemu.org/Documentation/Platforms/RISCV
> >
> > Ya, everything at riscv.org is useless.  It's best to stick to the open source
> > documentation, as when that gets out of date we can at least fix it.  Using a
> > distro helps a lot here, the wiki describes how to run a handful of popular
> > ones that were ported to RISC-V early but if your favorite isn't on the list
> > then it may have its own documentation somewhere else.
>
> Even better if you could submit some .rst pages for QEMU's git:
>
>   docs/system/target-riscv.rst
>   docs/system/riscv/virt.rst (and maybe the other models)
>
> then we could improve the user manual where RiscV is currently a little
> under-represented. A number of the systems have simple example command
> lines or explain the kernel support needed for the model.

Thanks for pointing that out Alex. Bin has sent some patches for this
so RISC-V should have a presence soon.

Alistair

>
> >
> >>> sudo qemu-system-riscv64 -nographic -machine virt \
> >>> -kernel linux/arch/riscv/boot/Image -append "root=/dev/vda ro console=ttyS0" \
> >>> -drive file=busybox,format=raw,id=hd0 \
> >>> -device virtio-blk-device,drive=hd0
> >>>
> >>> But what I get in return is a message telling me that the file I gave wasn't the right one, the actual output is:
> >>>
> >>> qemu-system-riscv64: -drive file=busybox,format=raw,id=hd0: A regular file was expected by the 'file' driver, but something else was given
> >>>
> >>> And I checked the file busybox with de cmd "file" and got the following :
> >>> busybox: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, for GNU/Linux 4.15.0, stripped
> >>
> >> That looks like an ELF, which won't work when attached as a drive.
> >>
> >> How are you building this rootFS?
> >>
> >> Alistair
> >>
> >>>
> >>> So I was wondering if the error message was related to qemu.
> >>> Thanks in advance for answering any suggestions are welcome
>
>
> --
> Alex Bennée


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emulation for riscv
  2021-01-14  0:01       ` Alistair Francis
@ 2021-01-14  9:49         ` Bin Meng
  2021-01-14 19:16           ` Palmer Dabbelt
  0 siblings, 1 reply; 7+ messages in thread
From: Bin Meng @ 2021-01-14  9:49 UTC (permalink / raw)
  To: Alistair Francis
  Cc: Palmer Dabbelt, Alex Bennée,
	qemu-devel@nongnu.org Developers, Moises Arreola

On Thu, Jan 14, 2021 at 8:09 AM Alistair Francis <alistair23@gmail.com> wrote:
>
> On Fri, Nov 6, 2020 at 2:36 AM Alex Bennée <alex.bennee@linaro.org> wrote:
> >
> >
> > Palmer Dabbelt <palmer@dabbelt.com> writes:
> >
> > > On Thu, 22 Oct 2020 17:56:38 PDT (-0700), alistair23@gmail.com wrote:
> > >> On Thu, Oct 22, 2020 at 4:58 PM Moises Arreola <moyarrezam@gmail.com> wrote:
> > >>>
> > >>> Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v processor, I'm using the Risc-V Getting Started Guide and on the final step I'm getting an error while trying to launch the virtual machine using the cmd:
> > >>
> > >> Hello,
> > >>
> > >> Please don't use the RISC-V Getting Started Guide. Pretty much all of
> > >> the information there is out of date and wrong. Unfortunately we are
> > >> unable to correct it.
> > >>
> > >> The QEMU wiki is a much better place for information:
> > >> https://wiki.qemu.org/Documentation/Platforms/RISCV
> > >
> > > Ya, everything at riscv.org is useless.  It's best to stick to the open source
> > > documentation, as when that gets out of date we can at least fix it.  Using a
> > > distro helps a lot here, the wiki describes how to run a handful of popular
> > > ones that were ported to RISC-V early but if your favorite isn't on the list
> > > then it may have its own documentation somewhere else.
> >
> > Even better if you could submit some .rst pages for QEMU's git:
> >
> >   docs/system/target-riscv.rst
> >   docs/system/riscv/virt.rst (and maybe the other models)
> >
> > then we could improve the user manual where RiscV is currently a little
> > under-represented. A number of the systems have simple example command
> > lines or explain the kernel support needed for the model.
>
> Thanks for pointing that out Alex. Bin has sent some patches for this
> so RISC-V should have a presence soon.
>

Yep, after the initial patches are merged, we can start adding more
RISC-V docs in reST.

Regards,
Bin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emulation for riscv
  2021-01-14  9:49         ` Bin Meng
@ 2021-01-14 19:16           ` Palmer Dabbelt
  0 siblings, 0 replies; 7+ messages in thread
From: Palmer Dabbelt @ 2021-01-14 19:16 UTC (permalink / raw)
  To: bmeng.cn; +Cc: alistair23, alex.bennee, qemu-devel, moyarrezam

On Thu, 14 Jan 2021 01:49:40 PST (-0800), bmeng.cn@gmail.com wrote:
> On Thu, Jan 14, 2021 at 8:09 AM Alistair Francis <alistair23@gmail.com> wrote:
>>
>> On Fri, Nov 6, 2020 at 2:36 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>> >
>> >
>> > Palmer Dabbelt <palmer@dabbelt.com> writes:
>> >
>> > > On Thu, 22 Oct 2020 17:56:38 PDT (-0700), alistair23@gmail.com wrote:
>> > >> On Thu, Oct 22, 2020 at 4:58 PM Moises Arreola <moyarrezam@gmail.com> wrote:
>> > >>>
>> > >>> Hello everyone, my name is Moses and I'm trying to set up a VM for a risc-v processor, I'm using the Risc-V Getting Started Guide and on the final step I'm getting an error while trying to launch the virtual machine using the cmd:
>> > >>
>> > >> Hello,
>> > >>
>> > >> Please don't use the RISC-V Getting Started Guide. Pretty much all of
>> > >> the information there is out of date and wrong. Unfortunately we are
>> > >> unable to correct it.
>> > >>
>> > >> The QEMU wiki is a much better place for information:
>> > >> https://wiki.qemu.org/Documentation/Platforms/RISCV
>> > >
>> > > Ya, everything at riscv.org is useless.  It's best to stick to the open source
>> > > documentation, as when that gets out of date we can at least fix it.  Using a
>> > > distro helps a lot here, the wiki describes how to run a handful of popular
>> > > ones that were ported to RISC-V early but if your favorite isn't on the list
>> > > then it may have its own documentation somewhere else.
>> >
>> > Even better if you could submit some .rst pages for QEMU's git:
>> >
>> >   docs/system/target-riscv.rst
>> >   docs/system/riscv/virt.rst (and maybe the other models)
>> >
>> > then we could improve the user manual where RiscV is currently a little
>> > under-represented. A number of the systems have simple example command
>> > lines or explain the kernel support needed for the model.
>>
>> Thanks for pointing that out Alex. Bin has sent some patches for this
>> so RISC-V should have a presence soon.
>>
>
> Yep, after the initial patches are merged, we can start adding more
> RISC-V docs in reST.

Thanks for doing this!


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-14 19:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 22:56 Emulation for riscv Moises Arreola
2020-10-23  0:56 ` Alistair Francis
2020-11-06  4:42   ` Palmer Dabbelt
2020-11-06 10:36     ` Alex Bennée
2021-01-14  0:01       ` Alistair Francis
2021-01-14  9:49         ` Bin Meng
2021-01-14 19:16           ` Palmer Dabbelt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.