diff options
author | Richard Purdie <richard@openedhand.com> | 2006-11-30 11:16:21 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-11-30 11:16:21 +0000 |
commit | d35635aff2a9ba8383b8ba295ec9684185d1f372 (patch) | |
tree | c48577bcd69adb2c97dd4bf80ec3e7d260e13eef /scripts | |
parent | 6ee267a55e1fc0df5267021de17814f2fda43e6b (diff) | |
download | openembedded-core-d35635aff2a9ba8383b8ba295ec9684185d1f372.tar.gz openembedded-core-d35635aff2a9ba8383b8ba295ec9684185d1f372.tar.bz2 openembedded-core-d35635aff2a9ba8383b8ba295ec9684185d1f372.tar.xz openembedded-core-d35635aff2a9ba8383b8ba295ec9684185d1f372.zip |
scripts/runqemu improvements:
* Try harder to find ifconfig
* Error out if the environment isn't correct
* Tell the user we're running sudo
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@989 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/qemu-ifup | 9 | ||||
-rwxr-xr-x | scripts/runqemu | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/scripts/qemu-ifup b/scripts/qemu-ifup index da3918c6a..8abe35f57 100755 --- a/scripts/qemu-ifup +++ b/scripts/qemu-ifup @@ -1,2 +1,9 @@ #!/bin/sh -ifconfig tap0 192.168.7.1
\ No newline at end of file + +IFCONFIG=`which ifconfig` +if [ "x$IFCONFIG" == "x" ]; then + # better than nothing... + IFCONFIG=/sbin/ifconfig +fi + +$IFCONFIG tap0 192.168.7.1 diff --git a/scripts/runqemu b/scripts/runqemu index d1e33517b..3b4ad1bf1 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1,5 +1,10 @@ #!/bin/sh +if [ "x$BUILDDIR" == "x" ]; then + echo "You need to source poky-init-build-env before running this script" + exit 1 +fi + PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$PATH KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" @@ -40,10 +45,12 @@ if [ "$MACHINE" == "qemuarm" ]; then if [ "x$HDIMAGE" == "x" ]; then HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemuarm.ext2 fi + echo "Running $QEMU using sudo..." sudo $QEMU -kernel $ZIMAGE -append "root=/dev/sda mem=$QEMU_MEMORY" $QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet fi if [ "$TYPE" == "nfs" ]; then dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 + echo "Running $QEMU using sudo..." sudo $QEMU -kernel $1 -append "root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemuarm rw $KERNEL_NETWORK_CMD" $QEMU_NETWORK_CMD -M versatilepb -hda /tmp/blank rm /tmp/blank fi @@ -61,10 +68,12 @@ if [ "$MACHINE" == "qemux86" ]; then HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 fi # video=vesafb:1024x768-32@86 + echo "Running $QEMU using sudo..." sudo $QEMU -std-vga -kernel $ZIMAGE -append "root=/dev/hda mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" $QEMU_NETWORK_CMD -hda $HDIMAGE -usb -usbdevice wacom-tablet fi if [ "$TYPE" == "nfs" ]; then dd if=/dev/zero of=/tmp/blank bs=1024 count=8192 + echo "Running $QEMU using sudo..." sudo $QEMU -std-vga -kernel $1 -append "root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemux86 rw $KERNEL_NETWORK_CMD" $QEMU_NETWORK_CMD -hda /tmp/blank rm /tmp/blank fi |