summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index dead347ea..d1e33517b 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -2,6 +2,9 @@
PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$PATH
+KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0"
+QEMU_NETWORK_CMD="-net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$OEROOT/scripts/qemu-ifup"
+
if [ -z "$QEMU_MEMORY" ]; then
QEMU_MEMORY="64M"
fi
@@ -37,11 +40,11 @@ if [ "$MACHINE" == "qemuarm" ]; then
if [ "x$HDIMAGE" == "x" ]; then
HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemuarm.ext2
fi
- sudo $QEMU -kernel $ZIMAGE -append "root=/dev/sda mem=$QEMU_MEMORY" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$OEROOT/scripts/qemu-ifup -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet
+ 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
- sudo $QEMU -kernel $1 -append "root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemuarm rw ip=192.168.7.2::192.168.7.1:255.255.255.0" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$OEROOT/scripts/qemu-ifup -M versatilepb -hda /tmp/blank
+ 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
fi
@@ -58,11 +61,11 @@ if [ "$MACHINE" == "qemux86" ]; then
HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2
fi
# video=vesafb:1024x768-32@86
- sudo $QEMU -std-vga -kernel $ZIMAGE -append "root=/dev/hda mem=$QEMU_MEMORY" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$OEROOT/scripts/qemu-ifup -hda $HDIMAGE -usb -usbdevice wacom-tablet
+ 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
- sudo $QEMU -std-vga -kernel $1 -append "root=/dev/nfs nfsroot=192.168.7.1:/srv/nfs/qemux86 rw ip=192.168.7.2::192.168.7.1:255.255.255.0" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$OEROOT/scripts/qemu-ifup -hda /tmp/blank
+ 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
fi