From: ChenQi <Qi.Chen@windriver.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][RFC][PATCH] oeqa/selftest/sdk: add test_sdk_runqemu
Date: Wed, 11 Feb 2026 14:11:18 +0800 [thread overview]
Message-ID: <91e636fb-455c-47db-88dc-5fb634a4485c@windriver.com> (raw)
In-Reply-To: <CANNYZj-0=nQQOLY1h1w2SH9PFOa8K63+wELwNB9KKHuEPu6S9w@mail.gmail.com>
Hi Alex,
I guess you were still in a bitbake build environment when testing
runqemu in SDK manually.
That's why your command 'runqemu kvm slirp snapshot
/path/to/images/qemux86-64' worked.
See commands and output below (Pure SDK, no bitbake environment):
"""
chenqi@HOST:/buildarea3/chenqi/SDK/Yocto [3][0] $ runqemu kvm snapshot
slirp /buildarea3/chenqi/SDK/Yocto/qemux86-64/
runqemu - ERROR - In order for this script to dynamically infer paths
kernels or filesystem images, you either need bitbake in your PATH
or to source oe-init-build-env before running this script.
Dynamic path inference can be avoided by passing a *.qemuboot.conf to
runqemu, i.e. `runqemu /path/to/my-image-name.qemuboot.conf`
Bitbake is needed to run 'MACHINE=qemux86-64 bitbake -e None', but it
is not found in PATH. Please source the bitbake build environment.
runqemu - INFO - Cleaning up
runqemu - INFO - Host uptime: 16354810.08
chenqi@HOST:/buildarea3/chenqi/SDK/Yocto [3][0] $ runqemu kvm snapshot
slirp
/buildarea3/chenqi/SDK/Yocto/qemux86-64/core-image-minimal-qemux86-64.rootfs.qemuboot.conf
runqemu - ERROR - In order for this script to dynamically infer paths
kernels or filesystem images, you either need bitbake in your PATH
or to source oe-init-build-env before running this script.
Dynamic path inference can be avoided by passing a *.qemuboot.conf to
runqemu, i.e. `runqemu /path/to/my-image-name.qemuboot.conf`
Bitbake is needed to run 'MACHINE=qemux86-64 bitbake -e None', but it
is not found in PATH. Please source the bitbake build environment.
runqemu - INFO - Cleaning up
runqemu - INFO - Host uptime: 16354858.44
chenqi@HOST:/buildarea3/chenqi/SDK/Yocto [3][0] $ which bitbake
chenqi@HOST:/buildarea3/chenqi/SDK/Yocto [3][0] $ echo $?
1
chenqi@HOST:/buildarea3/chenqi/SDK/Yocto [3][0] $ which runqemu
/buildarea3/chenqi/SDK/Yocto/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu
"""
Regards,
Qi
On 2/10/26 19:37, Alexander Kanavin wrote:
> On Sat, 7 Feb 2026 at 06:13, <Qi.Chen@windriver.com> wrote:
>> Add test case to ensure runqemu works in SDK.
>>
>> Using runqemu from SDK has been supported for many years. Add a
>> test case to ensure we have no regression.
> I set and ran this test. This indeed does not work:
>
> ====
> alex@Zen2:~$ runqemu qemux86-64 kvm snapshot nographic
> runqemu - ERROR - In order for this script to dynamically infer paths
> kernels or filesystem images, you either need bitbake in your PATH
> or to source oe-init-build-env before running this script.
>
> Dynamic path inference can be avoided by passing a *.qemuboot.conf to
> runqemu, i.e. `runqemu /path/to/my-image-name.qemuboot.conf`
>
> Bitbake is needed to run 'MACHINE=qemux86-64 bitbake -e', but it is
> not found in PATH. Please source the bitbake build environment.
> ====
>
> The error makes sense, doesn't it? How would runqemu be able to figure
> out where the image it needs to run is on the filesystem if all it has
> is MACHINE value? We can try to hardcode something relative to SDK
> installation, from some environment variable that SDK sets, but that
> would be limiting: in the context of an SDK, images can be downloaded
> and located anywhere.
>
> On the other hand, if you pass the path to the image directory to
> runqemu, it works perfectly:
>
> ====
> alex@Zen2:~$ runqemu kvm slirp snapshot
> /srv/storage/alex/yocto/build-64/tmp/deploy/images/qemux86-64/
> runqemu - INFO - Decompressing
> /srv/storage/alex/yocto/build-64/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs-20260210110409.ext4.zst
> to /srv/storage/alex/yocto/build-64/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs-20260210110409.ext4
> /srv/storage/alex/yocto/build-64/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs-20260210110409.ext4.zst:
> 43323392 bytes
> runqemu - INFO - Continuing with the following parameters:
> KERNEL: [/srv/storage/alex/yocto/build-64/tmp/deploy/images/qemux86-64/bzImage]
> MACHINE: [qemux86-64]
> FSTYPE: [ext4]
> ROOTFS: [/srv/storage/alex/yocto/build-64/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs-20260210110409.ext4]
> SNAPSHOT: [Enabled. Changes on rootfs won't be kept after QEMU shutdown.]
> CONFFILE: [/srv/storage/alex/yocto/build-64/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs-20260210110409.qemuboot.conf]
> ....
> ====
>
> So would it be okay to set the path to the image directory explicitly?
> If you have several images in that directory, then you need to pass
> the path to a particular some-image.qemuboot.conf file, and it will
> still work:
>
> alex@Zen2:~$ runqemu kvm slirp snapshot
> /srv/storage/alex/yocto/build-64/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs-20260210110409.qemuboot.conf
>
> Alex
next prev parent reply other threads:[~2026-02-11 6:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-07 5:13 [OE-core][RFC][PATCH] oeqa/selftest/sdk: add test_sdk_runqemu Qi.Chen
2026-02-09 14:05 ` Alexander Kanavin
2026-02-10 11:37 ` Alexander Kanavin
2026-02-11 6:11 ` ChenQi [this message]
2026-02-11 13:09 ` Alexander Kanavin
2026-02-12 2:25 ` Chen, Qi
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=91e636fb-455c-47db-88dc-5fb634a4485c@windriver.com \
--to=qi.chen@windriver.com \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.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