From: <Qi.Chen@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [OE-core][PATCH V3 1/2] runqemu: restore support to run inside SDK
Date: Fri, 27 Feb 2026 02:24:20 +0000 [thread overview]
Message-ID: <20260227022421.4072802-1-Qi.Chen@windriver.com> (raw)
From: Chen Qi <Qi.Chen@windriver.com>
Using runqemu from SDK has been supported for a long time[1].
Below are example steps for using runqemu inside SDK.
1. mkdir destdir
2. cp -r /path/to/build/tmp/deploy/image/qemux86-64 destdir
3. Install SDK to destdir
4. Source SDK
5. runqemu qemux86-64 nographic slirp
Recently the related code path was deleted by accident during
an effort to make codes cleaner and more consistent.
We need to restore support for it.
What actually matters is the STAGING_BINDIR_NATIVE, which we
use to locate the qemu binary. So in case of SDK, we set it
from OECORE_NATIVE_SYSROOT. The STAGING_DIR_NATIVE checking
and setting are meaningless, thus deleting it.
[1] https://git.openembedded.org/openembedded-core/commit/?id=93649edc034f2540ff55dc9b41638797209cfb9c
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
scripts/runqemu | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 32a3d6296a..5587d47865 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -997,17 +997,21 @@ to your build configuration.
logger.info('Setting DEPLOY_DIR_IMAGE to folder containing %s (%s)' % (self.qemuboot, imgdir))
self.set('DEPLOY_DIR_IMAGE', imgdir)
- # If the STAGING_*_NATIVE directories from the config file don't exist
+ oecore_native_sysroot = self.get('OECORE_NATIVE_SYSROOT')
+ if oecore_native_sysroot:
+ logger.info('In SDK environment, setting STAGING_BINDIR_NATIVE from OECORE_NATIVE_SYSROOT (%s)' % oecore_native_sysroot)
+ self.set('STAGING_BINDIR_NATIVE', '%s/usr/bin' % oecore_native_sysroot)
+
+ # If the STAGING_BINDIR_NATIVE directories from the config file don't exist
# and we're in a sourced OE build directory try to extract the paths
# from `bitbake -e`
- havenative = os.path.exists(self.get('STAGING_DIR_NATIVE')) and \
- os.path.exists(self.get('STAGING_BINDIR_NATIVE'))
+ havenative = os.path.exists(os.path.exists(self.get('STAGING_BINDIR_NATIVE')))
if not havenative:
if not self.bitbake_e:
self.load_bitbake_env()
- native_vars = ['STAGING_DIR_NATIVE']
+ native_vars = ['STAGING_BINDIR_NATIVE']
for nv in native_vars:
s = re.search('^%s="(.*)"' % nv, self.bitbake_e, re.M)
if s and s.group(1) != self.get(nv):
--
2.43.0
next reply other threads:[~2026-02-27 2:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 2:24 Qi.Chen [this message]
2026-02-27 2:24 ` [OE-core][PATCH V3 2/2] oeqa/selftest/sdk: add test_sdk_runqemu Qi.Chen
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=20260227022421.4072802-1-Qi.Chen@windriver.com \
--to=qi.chen@windriver.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