diff options
author | Scott Garman <scott.a.garman@intel.com> | 2010-10-12 09:07:09 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-10-12 17:21:39 +0100 |
commit | d393edda26269f74914d3f86092779a808fdb296 (patch) | |
tree | cfa3317b22d7d2542e213008da32868c1517f491 /scripts/poky-qemu-internal | |
parent | 99c0cbd6d6ab0d0130c251ad89b114a09c6df1c4 (diff) | |
download | openembedded-core-d393edda26269f74914d3f86092779a808fdb296.tar.gz openembedded-core-d393edda26269f74914d3f86092779a808fdb296.tar.bz2 openembedded-core-d393edda26269f74914d3f86092779a808fdb296.zip |
poky-qemu-internal: enforce a 128M memory limit for qemuarm
This fixes [BUGID #433]
Also set a sane default for the ifconfig command, which simplifies
our autobuilder sanity test setup.
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'scripts/poky-qemu-internal')
-rwxr-xr-x | scripts/poky-qemu-internal | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index 834624dede..2f8af95707 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal @@ -37,6 +37,9 @@ if [ -z "$QEMU_MEMORY" ]; then "qemux86-64") QEMU_MEMORY="128M" ;; + "qemuarm") + QEMU_MEMORY="128M" + ;; "qemumips") QEMU_MEMORY="128M" ;; @@ -50,6 +53,16 @@ if [ -z "$QEMU_MEMORY" ]; then fi +# Bug 433: qemuarm cannot use > 128 MB RAM +if [ "$MACHINE" = "qemuarm" ]; then + RAM=`echo $QEMU_MEMORY | sed 's/M$//'` + if [[ -z "$RAM" || $RAM -gt 128 ]]; then + echo "WARNING: qemuarm does not support > 128M of RAM." + echo "*** Changing QEMU_MEMORY to default of 128M ***" + QEMU_MEMORY="128M" + fi +fi + # This file is created when poky-gen-tapdevs creates a bank of tap # devices, indicating that the user should not bring up new ones using # sudo. @@ -97,7 +110,12 @@ release_lock() { LOCKDIR="/tmp/qemu-tap-locks" [ ! -d "$LOCKDIR" ] && mkdir $LOCKDIR -POSSIBLE=`ifconfig -a | grep '^tap' | awk '{print $1}'` +IFCONFIG=`which ifconfig` +if [ -z "$IFCONFIG" ]; then + IFCONFIG=/sbin/ifconfig +fi + +POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'` TAP="" LOCKFILE="" for tap in $POSSIBLE; do |