diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/poky-qemu | 28 | ||||
| -rwxr-xr-x | scripts/poky-qemu-internal | 5 |
2 files changed, 19 insertions, 14 deletions
diff --git a/scripts/poky-qemu b/scripts/poky-qemu index 66a6631df5..9e604b5a10 100755 --- a/scripts/poky-qemu +++ b/scripts/poky-qemu | |||
| @@ -165,19 +165,6 @@ fi | |||
| 165 | machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'` | 165 | machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'` |
| 166 | # MACHINE is now set for all cases | 166 | # MACHINE is now set for all cases |
| 167 | 167 | ||
| 168 | if [[ -e "$ROOTFS" && -z "$FSTYPE" ]]; then | ||
| 169 | # Extract the filename extension | ||
| 170 | EXT=`echo $ROOTFS | awk -F . '{ print \$NF }'` | ||
| 171 | if [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" || | ||
| 172 | "x$EXT" == "xjffs2" ]]; then | ||
| 173 | FSTYPE=$EXT | ||
| 174 | else | ||
| 175 | echo "Note: Unable to determine filesystem extension for $ROOTFS" | ||
| 176 | echo "We will use the default FSTYPE for $MACHINE" | ||
| 177 | # ...which is done further below... | ||
| 178 | fi | ||
| 179 | fi | ||
| 180 | |||
| 181 | # Defaults used when these vars need to be inferred | 168 | # Defaults used when these vars need to be inferred |
| 182 | QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin | 169 | QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin |
| 183 | QEMUX86_DEFAULT_FSTYPE=ext3 | 170 | QEMUX86_DEFAULT_FSTYPE=ext3 |
| @@ -258,6 +245,21 @@ findimage() { | |||
| 258 | exit 1 | 245 | exit 1 |
| 259 | } | 246 | } |
| 260 | 247 | ||
| 248 | if [[ -e "$ROOTFS" && -z "$FSTYPE" ]]; then | ||
| 249 | setup_tmpdir | ||
| 250 | |||
| 251 | # Extract the filename extension | ||
| 252 | EXT=`echo $ROOTFS | awk -F . '{ print \$NF }'` | ||
| 253 | if [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" || | ||
| 254 | "x$EXT" == "xjffs2" ]]; then | ||
| 255 | FSTYPE=$EXT | ||
| 256 | else | ||
| 257 | echo "Note: Unable to determine filesystem extension for $ROOTFS" | ||
| 258 | echo "We will use the default FSTYPE for $MACHINE" | ||
| 259 | # ...which is done further below... | ||
| 260 | fi | ||
| 261 | fi | ||
| 262 | |||
| 261 | if [ -z "$KERNEL" ]; then | 263 | if [ -z "$KERNEL" ]; then |
| 262 | setup_tmpdir | 264 | setup_tmpdir |
| 263 | eval kernel_file=\$${machine2}_DEFAULT_KERNEL | 265 | eval kernel_file=\$${machine2}_DEFAULT_KERNEL |
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index 2f8af95707..66db0333ee 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal | |||
| @@ -108,7 +108,10 @@ release_lock() { | |||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | LOCKDIR="/tmp/qemu-tap-locks" | 110 | LOCKDIR="/tmp/qemu-tap-locks" |
| 111 | [ ! -d "$LOCKDIR" ] && mkdir $LOCKDIR | 111 | if [ ! -d "$LOCKDIR" ]; then |
| 112 | mkdir $LOCKDIR | ||
| 113 | chmod 777 $LOCKDIR | ||
| 114 | fi | ||
| 112 | 115 | ||
| 113 | IFCONFIG=`which ifconfig` | 116 | IFCONFIG=`which ifconfig` |
| 114 | if [ -z "$IFCONFIG" ]; then | 117 | if [ -z "$IFCONFIG" ]; then |
