From: adrian.freihofer@gmail.com
To: Alexander Kanavin <alex.kanavin@gmail.com>,
Khem Raj <raj.khem@gmail.com>
Cc: shrikantvaishnav@hotmail.com, yocto@lists.yoctoproject.org
Subject: Re: [yocto] Qemu not working for raspberry pi
Date: Sat, 19 Aug 2023 19:48:30 +0200 [thread overview]
Message-ID: <a86f9062fe608d32fbc5ad8e34992189a7cd345c.camel@gmail.com> (raw)
In-Reply-To: <CANNYZj8KhtafOYpJV_5O1=a91dfD3o5psZF13WHL5TRjZH6PAw@mail.gmail.com>
On Sat, 2023-08-19 at 19:21 +0200, Alexander Kanavin wrote:
> It’s well possible that emulating the arm hardware is not needed, in
> this case x86_64 is vastly better, as it will run at native speeds
> with kvm. When qemu translates arm to x86, the performance drops 10x
> or more.
>
> The issue preventing qemu from running is something else in any case,
> I’d suggest making a plain poky build in a new build directory from
> scratch actually.
This approach has two advantage (as Alex already pointed out):
- The firmware runs with native speed of the host machine if started
with kvm.
- It's trivial to setup. It just works.
But it also also comes with a major disadvantage: It requires to build
everything twice: Once for the target architecture and once for the
host architecture.
The compromise which just works but does not require an extra build for
Qemu is what we have with the beaglebone-yocto machine in poky:
https://git.yoctoproject.org/poky/tree/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf.
This allows to build for the target hardware but also running the same
firmware image with runqemu. The trick is to add the QB_ configuration
lines to the machine conf file and adding some drivers for the Qemu
emulated hardware to the target kernel.
I guess the Raspberry layer could be improved to support this as well.
But I do not use it.
Regards,
Adrian
>
> Alex
>
> On Sat 19. Aug 2023 at 19.09, Khem Raj <raj.khem@gmail.com> wrote:
> > On Sat, Aug 19, 2023 at 5:42 AM <shrikantvaishnav@hotmail.com>
> > wrote:
> > >
> > > Hi all,
> > > i want to run my raspberry pi in qemu and for this, I have
> > > created the image using core-image-weston and also set machine
> > > to:MACHINE ??= "qemux86-64" .after this whenever I try to run
> > > using qemu it shows
> > > Error:"runqemu - ERROR - IMAGE_LINK_NAME wasn't set to find
> > > corresponding .qemuboot.conf file"
> >
> > Its not clear what you are trying to do but I guess you have built
> > an
> > image for RPI which
> > you want to run on an emulator instead of real hardware. In that
> > case,
> > you have to use
> > either qemuarm or qemuarm64 depending upon your image being 64bit
> > or
> > 32bit. you might
> > have to explore runqemu options where you can point it to a kernel
> > and
> > rootfs explicitly
> > and use that to point it to the rpi images. This may not work even
> > after that since there might be more tweaks needed for the pi image
> > to
> > run in qemu.
> >
> > >
> > > Please help
> > >
> > >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#60832):
> https://lists.yoctoproject.org/g/yocto/message/60832
> Mute This Topic: https://lists.yoctoproject.org/mt/100837806/4454582
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe:
> https://lists.yoctoproject.org/g/yocto/unsub [adrian.freihofer@gmail.com
> ]
> -=-=-=-=-=-=-=-=-=-=-=-
>
prev parent reply other threads:[~2023-08-19 17:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-19 12:42 Qemu not working for raspberry pi shrikantvaishnav
2023-08-19 17:09 ` [yocto] " Khem Raj
2023-08-19 17:21 ` Alexander Kanavin
2023-08-19 17:48 ` adrian.freihofer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a86f9062fe608d32fbc5ad8e34992189a7cd345c.camel@gmail.com \
--to=adrian.freihofer@gmail.com \
--cc=alex.kanavin@gmail.com \
--cc=raj.khem@gmail.com \
--cc=shrikantvaishnav@hotmail.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox