diff options
author | Richard Purdie <richard@openedhand.com> | 2006-12-04 11:43:27 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-12-04 11:43:27 +0000 |
commit | 6a83bb19de71176f22f23b58f7fed8ba6aa88313 (patch) | |
tree | 41c37ee948ab80855f775e049d3626f68d2e80e6 /scripts | |
parent | ef853d08f8a27890aa94c78bdee0c49153fb3db2 (diff) | |
download | poky-6a83bb19de71176f22f23b58f7fed8ba6aa88313.tar.gz |
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')
-rwxr-xr-x | scripts/runqemu | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 3b4ad1bf16..1ab174f4d1 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -5,7 +5,7 @@ if [ "x$BUILDDIR" == "x" ]; then | |||
5 | exit 1 | 5 | exit 1 |
6 | fi | 6 | fi |
7 | 7 | ||
8 | PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$PATH | 8 | PATH=$BUILDDIR/tmp/staging/$BUILD_SYS/bin:$BUILDDIR/tmp/cross/bin:$PATH |
9 | 9 | ||
10 | KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" | 10 | KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" |
11 | QEMU_NETWORK_CMD="-net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$OEROOT/scripts/qemu-ifup" | 11 | 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 | |||
34 | HDIMAGE=$4 | 34 | HDIMAGE=$4 |
35 | fi | 35 | fi |
36 | 36 | ||
37 | if [ "$MACHINE" == "qemuarm" ]; then | 37 | if [ "$MACHINE" == "qemuarm" -o "$MACHINE" == "spitz" -o "$MACHINE" == "borzoi" -o "$MACHINE" == "akita" ]; then |
38 | QEMU=`which qemu-system-arm` | ||
38 | if [ "x$ZIMAGE" == "x" ]; then | 39 | if [ "x$ZIMAGE" == "x" ]; then |
39 | ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-qemuarm.bin | 40 | ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-$MACHINE.bin |
40 | fi | 41 | fi |
42 | CROSSPATH=$BUILDDIR/tmp/cross/arm-poky-linux/bin | ||
43 | fi | ||
41 | 44 | ||
42 | QEMU=`which qemu-system-arm` | 45 | if [ "$MACHINE" == "qemux86" ]; then |
46 | QEMU=`which qemu` | ||
47 | if [ "x$ZIMAGE" == "x" ]; then | ||
48 | ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-$MACHINE.bin | ||
49 | fi | ||
50 | CROSSPATH=$BUILDDIR/tmp/cross/i586-poky-linux/bin | ||
51 | fi | ||
52 | |||
53 | export PATH=$CROSSPATH:$PATH | ||
54 | |||
55 | if [ ! -e $CROSSPATH/cc ]; then | ||
56 | ln -s $CROSSPATH/gcc $CROSSPATH/cc | ||
57 | fi | ||
58 | |||
59 | DISTCCD=`which distccd` | ||
43 | 60 | ||
61 | |||
62 | if [ -x "$DISTCCD" ]; then | ||
63 | $DISTCCD --allow 192.168.7.2 --daemon | ||
64 | else | ||
65 | echo "Warning: distccd not present, no distcc support loaded" | ||
66 | fi | ||
67 | |||
68 | if [ "$MACHINE" == "qemuarm" ]; then | ||
44 | if [ "$TYPE" == "ext2" ]; then | 69 | if [ "$TYPE" == "ext2" ]; then |
45 | if [ "x$HDIMAGE" == "x" ]; then | 70 | if [ "x$HDIMAGE" == "x" ]; then |
46 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemuarm.ext2 | 71 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-sdk-qemuarm.ext2 |
47 | fi | 72 | fi |
48 | echo "Running $QEMU using sudo..." | 73 | echo "Running $QEMU using sudo..." |
49 | sudo $QEMU -kernel $ZIMAGE -append "root=/dev/sda mem=$QEMU_MEMORY" $QEMU_NETWORK_CMD -M versatilepb -hda $HDIMAGE -usb -usbdevice wacom-tablet | 74 | 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 | |||
57 | fi | 82 | fi |
58 | 83 | ||
59 | if [ "$MACHINE" == "qemux86" ]; then | 84 | if [ "$MACHINE" == "qemux86" ]; then |
60 | if [ "x$ZIMAGE" == "x" ]; then | ||
61 | ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-qemux86.bin | ||
62 | fi | ||
63 | |||
64 | QEMU=`which qemu` | ||
65 | |||
66 | if [ "$TYPE" == "ext2" ]; then | 85 | if [ "$TYPE" == "ext2" ]; then |
67 | if [ "x$HDIMAGE" == "x" ]; then | 86 | if [ "x$HDIMAGE" == "x" ]; then |
68 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 | 87 | HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 |
@@ -78,3 +97,7 @@ if [ "$MACHINE" == "qemux86" ]; then | |||
78 | rm /tmp/blank | 97 | rm /tmp/blank |
79 | fi | 98 | fi |
80 | fi | 99 | fi |
100 | |||
101 | if [ -x "$DISTCCD" ]; then | ||
102 | killall distccd | ||
103 | fi | ||