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 | |
parent | 99c0cbd6d6ab0d0130c251ad89b114a09c6df1c4 (diff) | |
download | poky-d393edda26269f74914d3f86092779a808fdb296.tar.gz |
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')
-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 | |||
37 | "qemux86-64") | 37 | "qemux86-64") |
38 | QEMU_MEMORY="128M" | 38 | QEMU_MEMORY="128M" |
39 | ;; | 39 | ;; |
40 | "qemuarm") | ||
41 | QEMU_MEMORY="128M" | ||
42 | ;; | ||
40 | "qemumips") | 43 | "qemumips") |
41 | QEMU_MEMORY="128M" | 44 | QEMU_MEMORY="128M" |
42 | ;; | 45 | ;; |
@@ -50,6 +53,16 @@ if [ -z "$QEMU_MEMORY" ]; then | |||
50 | 53 | ||
51 | fi | 54 | fi |
52 | 55 | ||
56 | # Bug 433: qemuarm cannot use > 128 MB RAM | ||
57 | if [ "$MACHINE" = "qemuarm" ]; then | ||
58 | RAM=`echo $QEMU_MEMORY | sed 's/M$//'` | ||
59 | if [[ -z "$RAM" || $RAM -gt 128 ]]; then | ||
60 | echo "WARNING: qemuarm does not support > 128M of RAM." | ||
61 | echo "*** Changing QEMU_MEMORY to default of 128M ***" | ||
62 | QEMU_MEMORY="128M" | ||
63 | fi | ||
64 | fi | ||
65 | |||
53 | # This file is created when poky-gen-tapdevs creates a bank of tap | 66 | # This file is created when poky-gen-tapdevs creates a bank of tap |
54 | # devices, indicating that the user should not bring up new ones using | 67 | # devices, indicating that the user should not bring up new ones using |
55 | # sudo. | 68 | # sudo. |
@@ -97,7 +110,12 @@ release_lock() { | |||
97 | LOCKDIR="/tmp/qemu-tap-locks" | 110 | LOCKDIR="/tmp/qemu-tap-locks" |
98 | [ ! -d "$LOCKDIR" ] && mkdir $LOCKDIR | 111 | [ ! -d "$LOCKDIR" ] && mkdir $LOCKDIR |
99 | 112 | ||
100 | POSSIBLE=`ifconfig -a | grep '^tap' | awk '{print $1}'` | 113 | IFCONFIG=`which ifconfig` |
114 | if [ -z "$IFCONFIG" ]; then | ||
115 | IFCONFIG=/sbin/ifconfig | ||
116 | fi | ||
117 | |||
118 | POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'` | ||
101 | TAP="" | 119 | TAP="" |
102 | LOCKFILE="" | 120 | LOCKFILE="" |
103 | for tap in $POSSIBLE; do | 121 | for tap in $POSSIBLE; do |