From d393edda26269f74914d3f86092779a808fdb296 Mon Sep 17 00:00:00 2001 From: Scott Garman Date: Tue, 12 Oct 2010 09:07:09 -0700 Subject: 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 --- scripts/poky-qemu-internal | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'scripts') 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 -- cgit 1.2.3-korg