* [PATCH 0/1] runqemu bugfix
@ 2011-07-23 1:36 Scott Garman
2011-07-23 1:36 ` [PATCH 1/1] runqemu: report error if TMPDIR cannot be determined Scott Garman
2011-07-25 15:40 ` [PATCH 0/1] runqemu bugfix Saul Wold
0 siblings, 2 replies; 4+ messages in thread
From: Scott Garman @ 2011-07-23 1:36 UTC (permalink / raw)
To: openembedded-core
This fixes an issue Jessica Zhang reported to me today:
Invoking runqemu outside of the build directory for an
in-tree setup results in an empty TMPDIR because bitbake -e
cannot be run to find it.
A symptom of this problem is running runqemu and getting the
following error:
Error: Unable to find tunctl binary in <directory>
Catch this case and report the error to the user.
This fixes [YOCTO #1278]
The following changes since commit eea4bd731ef286516ee1fb934fe2222a09c06e70:
mpc8315e-rdb: Set TARGET_FPU correct (2011-07-22 09:02:58 -0700)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib sgarman/runqemu-fix
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/runqemu-fix
Scott Garman (1):
runqemu: report error if TMPDIR cannot be determined
scripts/runqemu | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/1] runqemu: report error if TMPDIR cannot be determined
2011-07-23 1:36 [PATCH 0/1] runqemu bugfix Scott Garman
@ 2011-07-23 1:36 ` Scott Garman
2011-07-25 15:40 ` [PATCH 0/1] runqemu bugfix Saul Wold
1 sibling, 0 replies; 4+ messages in thread
From: Scott Garman @ 2011-07-23 1:36 UTC (permalink / raw)
To: openembedded-core
Invoking runqemu outside of the build directory for an
in-tree setup results in an empty TMPDIR because bitbake -e
cannot be run to find it.
A symptom of this problem is running runqemu and getting the
following error:
Error: Unable to find tunctl binary in <directory>
Catch this case and report the error to the user.
This fixes [YOCTO #1278]
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
scripts/runqemu | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 5aed25a..dacaf7c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -272,22 +272,27 @@ setup_tmpdir() {
# We have bitbake in PATH, get TMPDIR from bitbake
TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
+ if [ -z "$TMPDIR" ]; then
+ echo "Error: this script needs to be run from your build directory,"
+ echo "or you need to explicitly set TMPDIR in your environment"
+ exit 1
+ fi
fi
}
setup_sysroot() {
- # Toolchain installs set up $OECORE_NATIVE_SYSROOT in their
- # environment script. If that variable isn't set, we're
- # either in an in-tree build scenario or the environment
- # script wasn't source'd.
- if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
- setup_tmpdir
- BUILD_ARCH=`uname -m`
- BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
- BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
-
- OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS
- fi
+ # Toolchain installs set up $OECORE_NATIVE_SYSROOT in their
+ # environment script. If that variable isn't set, we're
+ # either in an in-tree build scenario or the environment
+ # script wasn't source'd.
+ if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
+ setup_tmpdir
+ BUILD_ARCH=`uname -m`
+ BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
+ BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
+
+ OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS
+ fi
}
# Locate a rootfs image based on defaults defined above
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/1] runqemu bugfix
2011-07-23 1:36 [PATCH 0/1] runqemu bugfix Scott Garman
2011-07-23 1:36 ` [PATCH 1/1] runqemu: report error if TMPDIR cannot be determined Scott Garman
@ 2011-07-25 15:40 ` Saul Wold
1 sibling, 0 replies; 4+ messages in thread
From: Saul Wold @ 2011-07-25 15:40 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Scott Garman
On 07/22/2011 06:36 PM, Scott Garman wrote:
> This fixes an issue Jessica Zhang reported to me today:
>
> Invoking runqemu outside of the build directory for an
> in-tree setup results in an empty TMPDIR because bitbake -e
> cannot be run to find it.
>
> A symptom of this problem is running runqemu and getting the
> following error:
>
> Error: Unable to find tunctl binary in<directory>
>
> Catch this case and report the error to the user.
>
> This fixes [YOCTO #1278]
>
> The following changes since commit eea4bd731ef286516ee1fb934fe2222a09c06e70:
>
> mpc8315e-rdb: Set TARGET_FPU correct (2011-07-22 09:02:58 -0700)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib sgarman/runqemu-fix
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/runqemu-fix
>
> Scott Garman (1):
> runqemu: report error if TMPDIR cannot be determined
>
> scripts/runqemu | 27 ++++++++++++++++-----------
> 1 files changed, 16 insertions(+), 11 deletions(-)
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Merged into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/1] runqemu bugfix
@ 2012-09-14 23:15 Scott Garman
0 siblings, 0 replies; 4+ messages in thread
From: Scott Garman @ 2012-09-14 23:15 UTC (permalink / raw)
To: openembedded-core
Hello,
This is a fix for Yocto bug #3112, where there are certain edge cases
where the bitbake command is avalable to fails to run. Previously we
mistakenly treated that as the same case as if bitbake didn't exist in
the user's $PATH, and this fix causes us to show the user the output
of bitbake so they can view the error message.
Scott
The following changes since commit 7887b99646d8e1e736ad6e4a306e47df9955221e:
local.conf.sample: change valgrind support architecture comment (2012-09-14 17:05:59 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib sgarman/runqemu-bitbake-fix-oe
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=sgarman/runqemu-bitbake-fix-oe
Scott Garman (1):
runqemu: show bitbake errors to user
scripts/runqemu | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-14 23:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-23 1:36 [PATCH 0/1] runqemu bugfix Scott Garman
2011-07-23 1:36 ` [PATCH 1/1] runqemu: report error if TMPDIR cannot be determined Scott Garman
2011-07-25 15:40 ` [PATCH 0/1] runqemu bugfix Saul Wold
-- strict thread matches above, loose matches on Subject: below --
2012-09-14 23:15 Scott Garman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox