Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] CentOS 5.x fixes
@ 2011-12-14 17:31 Paul Eggleton
  2011-12-14 17:31 ` [PATCH 1/3] qemu: for native, do not fail if kvm is unavailable Paul Eggleton
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Paul Eggleton @ 2011-12-14 17:31 UTC (permalink / raw)
  To: openembedded-core

A few fixes I made in the process of testing builds on CentOS 5.7.

The following changes since commit b9dfccc018f32a47fc045f35d5f53d7269d791ed:

  gdk-pixbuf: Ensure the binaries can be relocated (2011-12-13 18:00:18 +0000)

are available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib paule/qemu-centos5
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/qemu-centos5

Paul Eggleton (3):
  qemu: for native, do not fail if kvm is unavailable
  scripts/runqemu: show an error if /dev/net/tun is unusable
  scripts/bitbake: add a version >= 2.6 check

 meta/recipes-devtools/qemu/qemu.inc       |   10 ++++++++--
 meta/recipes-devtools/qemu/qemu_0.14.0.bb |    2 +-
 meta/recipes-devtools/qemu/qemu_0.15.1.bb |    2 ++
 meta/recipes-devtools/qemu/qemu_git.bb    |    2 +-
 scripts/bitbake                           |    9 +++++++++
 scripts/runqemu                           |    8 ++++++++
 6 files changed, 29 insertions(+), 4 deletions(-)

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] qemu: for native, do not fail if kvm is unavailable
  2011-12-14 17:31 [PATCH 0/3] CentOS 5.x fixes Paul Eggleton
@ 2011-12-14 17:31 ` Paul Eggleton
  2011-12-14 17:31 ` [PATCH 2/3] scripts/runqemu: show an error if /dev/net/tun is unusable Paul Eggleton
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2011-12-14 17:31 UTC (permalink / raw)
  To: openembedded-core

When building qemu-native, if the linux kvm header is unavailable (as
it is on CentOS 5.x 32-bit) then do not pass the --enable-kvm switch to
the configure script, thus avoiding failed do_configure.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-devtools/qemu/qemu.inc       |   10 ++++++++--
 meta/recipes-devtools/qemu/qemu_0.14.0.bb |    2 +-
 meta/recipes-devtools/qemu/qemu_0.15.1.bb |    2 ++
 meta/recipes-devtools/qemu/qemu_git.bb    |    2 +-
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 65bd8dc..bd86b4e 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -12,7 +12,7 @@ SDL ?= "--disable-sdl"
 SDL_virtclass-native ?= ""
 SDL_virtclass-nativesdk ?= ""
 
-EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls --enable-kvm --audio-drv-list=oss,alsa --audio-card-list=ac97,es1370 ${SDL}"
+EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls --audio-drv-list=oss,alsa --audio-card-list=ac97,es1370 ${SDL}"
 
 #EXTRA_OECONF += "--disable-sdl"
 
@@ -39,7 +39,13 @@ do_configure_prepend_virtclass-native() {
 }
 
 do_configure() {
-    ${S}/configure --prefix=${prefix} --sysconfdir=${sysconfdir} --disable-strip ${EXTRA_OECONF}
+    # Handle distros such as CentOS 5 32-bit that do not have kvm support
+    KVMOPTS=""
+    if [ "${PN}" != "qemu-native" ] || [ -f /usr/include/linux/kvm.h ] ; then
+        KVMOPTS="--enable-kvm"
+    fi
+
+    ${S}/configure --prefix=${prefix} --sysconfdir=${sysconfdir} --disable-strip ${EXTRA_OECONF} $KVMOPTS
     test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh
 }
 
diff --git a/meta/recipes-devtools/qemu/qemu_0.14.0.bb b/meta/recipes-devtools/qemu/qemu_0.14.0.bb
index 5a0cd55..bc0c16b 100644
--- a/meta/recipes-devtools/qemu/qemu_0.14.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_0.14.0.bb
@@ -3,7 +3,7 @@ require qemu.inc
 LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
                     file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
 
-PR = "r4"
+PR = "r5"
 
 FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
 FILESDIR = "${WORKDIR}"
diff --git a/meta/recipes-devtools/qemu/qemu_0.15.1.bb b/meta/recipes-devtools/qemu/qemu_0.15.1.bb
index 7eea924..ae68327 100644
--- a/meta/recipes-devtools/qemu/qemu_0.15.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_0.15.1.bb
@@ -3,6 +3,8 @@ require qemu.inc
 LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
                     file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
 
+PR = "r1"
+
 FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
 FILESDIR = "${WORKDIR}"
 
diff --git a/meta/recipes-devtools/qemu/qemu_git.bb b/meta/recipes-devtools/qemu/qemu_git.bb
index 3b4369b..bcec9bb 100644
--- a/meta/recipes-devtools/qemu/qemu_git.bb
+++ b/meta/recipes-devtools/qemu/qemu_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
                     file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
 
 PV = "0.14.0"
-PR = "r2"
+PR = "r3"
 
 FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
 FILESDIR = "${WORKDIR}"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] scripts/runqemu: show an error if /dev/net/tun is unusable
  2011-12-14 17:31 [PATCH 0/3] CentOS 5.x fixes Paul Eggleton
  2011-12-14 17:31 ` [PATCH 1/3] qemu: for native, do not fail if kvm is unavailable Paul Eggleton
@ 2011-12-14 17:31 ` Paul Eggleton
  2011-12-14 17:31 ` [PATCH 3/3] scripts/bitbake: add a version >= 2.6 check Paul Eggleton
  2011-12-15 19:19 ` [PATCH 0/3] CentOS 5.x fixes Saul Wold
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2011-12-14 17:31 UTC (permalink / raw)
  To: openembedded-core

If /dev/net/tun is either not present or is not writable by the
user, then show an appropriate error message. (QEMU needs access to this
device in order to enable networking; it may be missing if it is not
enabled or loaded into the kernel, and some distributions such as CentOS
5.x set restrictive permissions upon it.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/runqemu |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 4adeace..bed6a29 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -194,6 +194,14 @@ while [ $i -le $# ]; do
     i=$((i + 1))
 done
 
+if [ ! -c /dev/net/tun ] ; then
+	echo "TUN control device /dev/net/tun is unavailable; you may need to enable TUN (e.g. sudo modprobe tun)"
+	exit 1
+elif [ ! -w /dev/net/tun ] ; then
+	echo "TUN control device /dev/net/tun is not writable, please fix (e.g. sudo chmod 666 /dev/net/tun)"
+	exit 1
+fi
+
 YOCTO_KVM_WIKI="https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu"
 # Detect KVM configuration
 if [[ "x$KVM_ENABLED" == "xyes" ]]; then
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] scripts/bitbake: add a version >= 2.6 check
  2011-12-14 17:31 [PATCH 0/3] CentOS 5.x fixes Paul Eggleton
  2011-12-14 17:31 ` [PATCH 1/3] qemu: for native, do not fail if kvm is unavailable Paul Eggleton
  2011-12-14 17:31 ` [PATCH 2/3] scripts/runqemu: show an error if /dev/net/tun is unusable Paul Eggleton
@ 2011-12-14 17:31 ` Paul Eggleton
  2011-12-15 19:19 ` [PATCH 0/3] CentOS 5.x fixes Saul Wold
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2011-12-14 17:31 UTC (permalink / raw)
  To: openembedded-core

Unfortunately we now have code in BitBake which is parsed before the
current version check and is incompatible with Python < 2.6. Rather than
fixing this and being eternally vigilant for >= 2.6 feature usage, just
add a version check to the wrapper script.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/bitbake |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/scripts/bitbake b/scripts/bitbake
index 587428c..1c8d4eb 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -27,6 +27,15 @@ if [ "$py_v3_check" != "" ]; then
 	exit 1
 fi
 
+# Similarly, we now have code that doesn't parse correctly with older
+# versions of Python, and rather than fixing that and be eternally
+# vigilant for any other new feature use, just check the version here.
+py_v26_check=`python -c 'import sys; print sys.version_info >= (2,6,0)'`
+if [ "$py_v26_check" != "True" ]; then
+	echo "BitBake requires Python 2.6 or later"
+	exit 1
+fi
+
 needtar="1"
 TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4`
 float_test() {
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] CentOS 5.x fixes
  2011-12-14 17:31 [PATCH 0/3] CentOS 5.x fixes Paul Eggleton
                   ` (2 preceding siblings ...)
  2011-12-14 17:31 ` [PATCH 3/3] scripts/bitbake: add a version >= 2.6 check Paul Eggleton
@ 2011-12-15 19:19 ` Saul Wold
  3 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2011-12-15 19:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Paul Eggleton

On 12/14/2011 09:31 AM, Paul Eggleton wrote:
> A few fixes I made in the process of testing builds on CentOS 5.7.
>
> The following changes since commit b9dfccc018f32a47fc045f35d5f53d7269d791ed:
>
>    gdk-pixbuf: Ensure the binaries can be relocated (2011-12-13 18:00:18 +0000)
>
> are available in the git repository at:
>    git://git.openembedded.org/openembedded-core-contrib paule/qemu-centos5
>    http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/qemu-centos5
>
> Paul Eggleton (3):
>    qemu: for native, do not fail if kvm is unavailable
>    scripts/runqemu: show an error if /dev/net/tun is unusable
>    scripts/bitbake: add a version>= 2.6 check
>
>   meta/recipes-devtools/qemu/qemu.inc       |   10 ++++++++--
>   meta/recipes-devtools/qemu/qemu_0.14.0.bb |    2 +-
>   meta/recipes-devtools/qemu/qemu_0.15.1.bb |    2 ++
>   meta/recipes-devtools/qemu/qemu_git.bb    |    2 +-
>   scripts/bitbake                           |    9 +++++++++
>   scripts/runqemu                           |    8 ++++++++
>   6 files changed, 29 insertions(+), 4 deletions(-)
>

Merged into OE-Core

Thanks
	Sau!



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-15 19:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 17:31 [PATCH 0/3] CentOS 5.x fixes Paul Eggleton
2011-12-14 17:31 ` [PATCH 1/3] qemu: for native, do not fail if kvm is unavailable Paul Eggleton
2011-12-14 17:31 ` [PATCH 2/3] scripts/runqemu: show an error if /dev/net/tun is unusable Paul Eggleton
2011-12-14 17:31 ` [PATCH 3/3] scripts/bitbake: add a version >= 2.6 check Paul Eggleton
2011-12-15 19:19 ` [PATCH 0/3] CentOS 5.x fixes Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox