if [ $? -ne 0 ]; then
# Re-run standalone to see verbose errors
sudo $QEMUIFUP $USERID $GROUPID $OECORE_NATIVE_SYSROOT
- return
+ return 1
fi
LOCKFILE="$LOCKDIR/$tap"
echo "Acquiring lockfile for $tap..."
"spitz") ;;
*)
echo "Error: Unsupported machine type $MACHINE"
- return
+ return 1
;;
esac
if [ ! -f "$KERNEL" -a "x$FSTYPE" != "xvmdk" ]; then
echo "Error: Kernel image file $KERNEL doesn't exist"
cleanup
- return
+ return 1
fi
if [ "$FSTYPE" != "nfs" -a "$FSTYPE" != "vmdk" -a ! -f "$ROOTFS" ]; then
echo "Error: Image file $ROOTFS doesn't exist"
cleanup
- return
+ return 1
fi
if [ "$FSTYPE" = "nfs" ]; then
runqemu-export-rootfs restart $ROOTFS
if [ $? != 0 ]; then
cleanup
- return
+ return 1
fi
NFSRUNNING="true"
fi
if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
echo "Error: NFS mount point $ROOTFS doesn't exist"
cleanup
- return
+ return 1
fi
KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb --no-reboot $QEMU_UI_OPTIONS"
if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
echo "Error: NFS mount point $ROOTFS doesn't exist."
cleanup
- return
+ return 1
fi
KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
if [ ! -d "$ROOTFS" ]; then
echo "Error: NFS mount point $ROOTFS doesn't exist."
cleanup
- return
+ return 1
fi
KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
echo "Error: NFS mount point $ROOTFS doesn't exist"
cleanup
- return
+ return 1
fi
KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS"
if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
echo "Error: NFS mount point $ROOTFS doesn't exist"
cleanup
- return
+ return 1
fi
KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS"
if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
echo "Error: NFS mount point $ROOTFS doesn't exist"
cleanup
- return
+ return 1
fi
KERNCMDLINE="root=/dev/nfs console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio"
if [ "x$QEMUOPTIONS" = "x" ]; then
echo "Error: Unable to support this combination of options"
cleanup
- return
+ return 1
fi
if [ "x$CROSSPATH" = "x" ]; then
if [ ! -x "$QEMUBIN" ]; then
echo "Error: No QEMU binary '$QEMU' could be found."
cleanup
- return
+ return 1
fi
NEED_GL=`ldd $QEMUBIN/$QEMU 2>&1 | grep libGLU`
echo "You need libGL.so and libGLU.so to exist in your library path to run the QEMU emulator.
Ubuntu package names are: libgl1-mesa-dev and libglu1-mesa-dev.
Fedora package names are: mesa-libGL-devel mesa-libGLU-devel."
- exit 1;
+ return 1;
fi
fi
kill `cat $PIDFILE`
fi
cleanup
- return
+ return 1
}
DISTCCD=`which distccd 2> /dev/null`
echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"
fi
-
-
+ret=$?
cleanup
trap - INT TERM QUIT
+
+return $ret