eSDK / runqemu fixes
cover eSDK / runqemu fixes
The following changes since commit ba2884f6ad3a4e746fc80cbd707f83fa8abd4210:
oe-run-native: print more error messages (2017-04-14 10:26:10 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/esdk-runqemu-fixes
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/esdk-runqemu-fixes
Paul Eggleton (3):
runqemu: fix incorrect calls to get variable values classes/populate_sdk_ext: work around runqemu behaviour within the eSDK ext-sdk-prepare.py: use quiet mode when preparing sysroot
meta/classes/populate_sdk_ext.bbclass | 2 ++ meta/files/ext-sdk-prepare.py | 2 +- scripts/runqemu | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-)
Signature · 1 line
2.9.3
PATCH 1/3 runqemu: fix incorrect calls to get variable values
We were specifying a default parameter; the get() function defined here does not take such a parameter. I appears this code had not been tested. This fixes runqemu erroring out immediately when used within the eSDK.
--- scripts/runqemu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/runqemu +2 -2
@@ -732,8 +732,8 @@ class BaseConfig(object): # be able to call `bitbake -e`, then try: # - get OE_TMPDIR from environment and guess paths based on it # - get OECORE_NATIVE_SYSROOT from environment (for sdk) - tmpdir = self.get('OE_TMPDIR', None) - oecore_native_sysroot = self.get('OECORE_NATIVE_SYSROOT', None) + tmpdir = self.get('OE_TMPDIR') + oecore_native_sysroot = self.get('OECORE_NATIVE_SYSROOT') if tmpdir: logger.info('Setting STAGING_DIR_NATIVE and STAGING_BINDIR_NATIVE relative to OE_TMPDIR (%s)' % tmpdir) hostos, _, _, _, machine = os.uname()
Signature · 1 line
2.9.3
PATCH 2/3 classes/populate_sdk_ext: work around runqemu behaviour within the eSDK
In reply to Paul EggletonCurrently, in order to figure out variable values when run within the eSDK, runqemu does not use the standard SDK method nor is it able to run bitbake (since the eSDK environment isn't initialised like the normal OE build environment). runqemu really ought to be fixed, but the quick workaround is to set DEPLOY_DIR_IMAGE in the environment so that runqemu can find image files.
Fixes [YOCTO #10447].
--- meta/classes/populate_sdk_ext.bbclass | 2 ++ 1 file changed, 2 insertions(+)
meta/classes/populate_sdk_ext.bbclass +2 -0
@@ -577,6 +577,8 @@ sdk_ext_postinst() { # Allow bitbake environment setup to be ran as part of this sdk. echo "export OE_SKIP_SDK_CHECK=1" >> $env_setup_script + # Work around runqemu not knowing how to get this information within the eSDK + echo "export DEPLOY_DIR_IMAGE=$target_sdk_dir/tmp/${@os.path.relpath(d.getVar('DEPLOY_DIR_IMAGE'), d.getVar('TMPDIR'))}" >> $env_setup_script # A bit of another hack, but we need this in the path only for devtool # so put it at the end of $PATH.
Signature · 1 line
2.9.3
PATCH 3/3 ext-sdk-prepare.py: use quiet mode when preparing sysroot
In reply to Paul EggletonIn order to have a shared sysroot usable within the eSDK after recipe specific sysroots were implemented, we need to run
bitbake build-sysroots as a separate call. However, unlike the first call, --quiet wasn't being specified and that somewhat undermined the earlier effort to clean up the eSDK installation output. Make this second call quiet as well so that the output is tidier.
--- meta/files/ext-sdk-prepare.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/files/ext-sdk-prepare.py +1 -1
@@ -54,7 +54,7 @@ def main(): ret = run_command_interruptible('BB_SETSCENE_ENFORCE=1 bitbake --quiet %s' % ' '.join(sdk_targets)) if not ret: - ret = run_command_interruptible('bitbake build-sysroots') + ret = run_command_interruptible('bitbake --quiet build-sysroots') lastlog = get_last_consolelog() if lastlog: with open(lastlog, 'r') as f:
Signature · 1 line
2.9.3
Re: [PATCH 1/3] runqemu: fix incorrect calls to get variable values
In reply to Paul EggletonSorry, this should be my fault, this fix is fine to me.
// Robert
Quoted 25 lines · Paul Eggleton
We were specifying a default parameter; the
get()function defined here does not take such a parameter. I appears this code had not been tested. This fixes runqemu erroring out immediately when used within the eSDK.Signed-off-by Paul Eggleton <[email protected]>--- scripts/runqemu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/runqemu +2
-2@@ -732,8 +732,8 @@ class BaseConfig(object): # be able to call `bitbake -e`, then try: # - get OE_TMPDIR from environment and guess paths based on it # - get OECORE_NATIVE_SYSROOT from environment (for sdk) - tmpdir = self.get('OE_TMPDIR', None) - oecore_native_sysroot = self.get('OECORE_NATIVE_SYSROOT', None) + tmpdir = self.get('OE_TMPDIR') + oecore_native_sysroot = self.get('OECORE_NATIVE_SYSROOT') if tmpdir: logger.info('Setting STAGING_DIR_NATIVE and STAGING_BINDIR_NATIVE relative to OE_TMPDIR (%s)' % tmpdir) hostos, _, _, _, machine = os.uname()