qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] RISC-V: Include ROM in QEMU


From: Alistair Francis
Subject: Re: [Qemu-devel] RISC-V: Include ROM in QEMU
Date: Wed, 19 Jun 2019 07:27:34 -0700

On Tue, Jun 18, 2019 at 3:17 PM Alistair Francis <address@hidden> wrote:
>
> On Mon, Jun 10, 2019 at 11:30 PM Gerd Hoffmann <address@hidden> wrote:
> >
> > On Fri, Jun 07, 2019 at 05:03:42PM -0700, Palmer Dabbelt wrote:
> > > On Thu, 06 Jun 2019 16:22:47 PDT (-0700), address@hidden wrote:
> > > > Hello,
> > > >
> > > > As a test of the waters, how would the QEMU community feel about
> > > > including the RISC-V OpenSBI project as a ROM submodule?
> > > >
> > > > The idea would be to have OpenSBI (similar to ATF for ARM and a BIOS
> > > > for x86) included by default to simplify the QEMU RISC-V boot process
> > > > for users. This would remove the requirement for users/developers to
> > > > build a RISC-V firmware. The goal here is to allow people to just
> > > > download and run their kernel as easily as they currently do for x86.
> > > >
> > > > We would make sure that it can be disabled! That is users/developers
> > > > can use their own (or none) if they want to. The idea here is just to
> > > > simplify the boot process, not lock anyone out.
> > >
> > > I like it.  My only question is about the mechanics of doing so: are we 
> > > just
> > > going to assume there's a cross compiler in PATH?  I guess that's less of 
> > > a
> > > usability headache than needing a complier and a firmware.
> >
> > Usual way to add firmware:
> >
> >   (1) Add a submodule below roms/
> >   (2) Add rules to build the firmware to roms/Makefile.  Firmware
> >       maintainers can use them, and they also document the build process.
> >       A normal qemu build will not automatically build the firmware
> >       though.
> >   (3) Place a pre-built binary in pc-bios/
> >
> > There is some cross compiler detection logic in roms/Makefile which you
> > can use.
>
> Thanks for the info. I have it all working now, just running a few
> more tests. I will send my patches out today or tomorrow.

We hit the problem in RISC-V now that including a firmware by default
will break all existing users as they are already passing the firmware
in via -kernel.

I don't suppose any other architecture ever had this problem and has a
nice fix? At the moment the only fix I can think of is only include
the default firmware if the user specifies "-bios default". Then
hopefully once everyone is doing that we can make it the default and
not break anything. I can't see a sane way to automatically extract
the information from the kernel binary to be smart about the default.

Alistair

>
> Alistair
>
> >
> > cheers,
> >   Gerd
> >



reply via email to

[Prev in Thread] Current Thread [Next in Thread]