summaryrefslogtreecommitdiff
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-12-04 11:43:27 +0000
committerRichard Purdie <richard@openedhand.com>2006-12-04 11:43:27 +0000
commit6a83bb19de71176f22f23b58f7fed8ba6aa88313 (patch)
tree41c37ee948ab80855f775e049d3626f68d2e80e6 /scripts/runqemu
parentef853d08f8a27890aa94c78bdee0c49153fb3db2 (diff)
downloadopenembedded-core-6a83bb19de71176f22f23b58f7fed8ba6aa88313.tar.gz
openembedded-core-6a83bb19de71176f22f23b58f7fed8ba6aa88313.tar.bz2
openembedded-core-6a83bb19de71176f22f23b58f7fed8ba6aa88313.tar.xz
openembedded-core-6a83bb19de71176f22f23b58f7fed8ba6aa88313.zip
scripts/runqemu: Add distcc support
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@995 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu45
1 files changed, 34 insertions, 11 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 3b4ad1bf1..1ab174f4d 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -5,7 +5,7 @@ if [ "x$BUILDDIR" == "x" ]; then
exit 1
fi
-PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$PATH
+PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$BUILDDIR/tmp/cross/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"
@@ -34,16 +34,41 @@ if [ "x$4" != "x" ]; then
HDIMAGE=$4
fi
-if [ "$MACHINE" == "qemuarm" ]; then
+if [ "$MACHINE" == "qemuarm" -o "$MACHINE" == "spitz" -o "$MACHINE" == "borzoi" -o "$MACHINE" == "akita" ]; then
+ QEMU=`which qemu-system-arm`
if [ "x$ZIMAGE" == "x" ]; then
- ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-qemuarm.bin
+ ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-$MACHINE.bin
fi
+ CROSSPATH=$BUILDDIR/tmp/cross/arm-poky-linux/bin
+fi
- QEMU=`which qemu-system-arm`
+if [ "$MACHINE" == "qemux86" ]; then
+ QEMU=`which qemu`
+ if [ "x$ZIMAGE" == "x" ]; then
+ ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-$MACHINE.bin
+ fi
+ CROSSPATH=$BUILDDIR/tmp/cross/i586-poky-linux/bin
+fi
+
+export PATH=$CROSSPATH:$PATH
+
+if [ ! -e $CROSSPATH/cc ]; then
+ ln -s $CROSSPATH/gcc $CROSSPATH/cc
+fi
+
+DISTCCD=`which distccd`
+
+if [ -x "$DISTCCD" ]; then
+ $DISTCCD --allow 192.168.7.2 --daemon
+else
+ echo "Warning: distccd not present, no distcc support loaded"
+fi
+
+if [ "$MACHINE" == "qemuarm" ]; then
if [ "$TYPE" == "ext2" ]; then
if [ "x$HDIMAGE" == "x" ]; then
- HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemuarm.ext2
+ HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-sdk-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
@@ -57,12 +82,6 @@ if [ "$MACHINE" == "qemuarm" ]; then
fi
if [ "$MACHINE" == "qemux86" ]; then
- if [ "x$ZIMAGE" == "x" ]; then
- ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-qemux86.bin
- fi
-
- QEMU=`which qemu`
-
if [ "$TYPE" == "ext2" ]; then
if [ "x$HDIMAGE" == "x" ]; then
HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2
@@ -78,3 +97,7 @@ if [ "$MACHINE" == "qemux86" ]; then
rm /tmp/blank
fi
fi
+
+if [ -x "$DISTCCD" ]; then
+ killall distccd
+fi