* [PATCH 1/3] runqemu: fix incorrect calls to get variable values
2017-04-19 8:57 [PATCH 0/3] eSDK / runqemu fixes Paul Eggleton
@ 2017-04-19 8:57 ` Paul Eggleton
2017-04-19 9:01 ` Robert Yang
2017-04-19 8:57 ` [PATCH 2/3] classes/populate_sdk_ext: work around runqemu behaviour within the eSDK Paul Eggleton
2017-04-19 8:57 ` [PATCH 3/3] ext-sdk-prepare.py: use quiet mode when preparing sysroot Paul Eggleton
2 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2017-04-19 8:57 UTC (permalink / raw)
To: openembedded-core
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 <paul.eggleton@linux.intel.com>
---
scripts/runqemu | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 3744c67..605bcf2 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -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()
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/3] runqemu: fix incorrect calls to get variable values
2017-04-19 8:57 ` [PATCH 1/3] runqemu: fix incorrect calls to get variable values Paul Eggleton
@ 2017-04-19 9:01 ` Robert Yang
0 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2017-04-19 9:01 UTC (permalink / raw)
To: Paul Eggleton, openembedded-core
Sorry, this should be my fault, this fix is fine to me.
// Robert
On 04/19/2017 04:57 PM, Paul Eggleton wrote:
> 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 <paul.eggleton@linux.intel.com>
> ---
> scripts/runqemu | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 3744c67..605bcf2 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -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()
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] classes/populate_sdk_ext: work around runqemu behaviour within the eSDK
2017-04-19 8:57 [PATCH 0/3] eSDK / runqemu fixes Paul Eggleton
2017-04-19 8:57 ` [PATCH 1/3] runqemu: fix incorrect calls to get variable values Paul Eggleton
@ 2017-04-19 8:57 ` Paul Eggleton
2017-04-19 8:57 ` [PATCH 3/3] ext-sdk-prepare.py: use quiet mode when preparing sysroot Paul Eggleton
2 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2017-04-19 8:57 UTC (permalink / raw)
To: openembedded-core
Currently, 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].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/classes/populate_sdk_ext.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 3e1858c..4dfb94c 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -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.
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] ext-sdk-prepare.py: use quiet mode when preparing sysroot
2017-04-19 8:57 [PATCH 0/3] eSDK / runqemu fixes Paul Eggleton
2017-04-19 8:57 ` [PATCH 1/3] runqemu: fix incorrect calls to get variable values Paul Eggleton
2017-04-19 8:57 ` [PATCH 2/3] classes/populate_sdk_ext: work around runqemu behaviour within the eSDK Paul Eggleton
@ 2017-04-19 8:57 ` Paul Eggleton
2 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2017-04-19 8:57 UTC (permalink / raw)
To: openembedded-core
In 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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/files/ext-sdk-prepare.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/files/ext-sdk-prepare.py b/meta/files/ext-sdk-prepare.py
index ef09639..96c5212 100644
--- a/meta/files/ext-sdk-prepare.py
+++ b/meta/files/ext-sdk-prepare.py
@@ -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:
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread