diff options
Diffstat (limited to 'scripts/poky-qemu')
-rwxr-xr-x | scripts/poky-qemu | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/scripts/poky-qemu b/scripts/poky-qemu index 6fe6f5e99b..111aa15b70 100755 --- a/scripts/poky-qemu +++ b/scripts/poky-qemu @@ -20,40 +20,42 @@ if [ "x$1" = "x" ]; then MYNAME=`basename $0` - echo "Run as MACHINE=xyz $MYNAME ZIMAGE IMAGEFILE [OPTIONS]" + echo "Run as MACHINE=xyz $MYNAME KERNEL ROOTFS [OPTIONS]" echo "where:" - echo " ZIMAGE - the kernel image file to use" - echo " IMAGEFILE - the image file/location to use" - echo " (NFS booting assumed if IMAGEFILE not specified)" - echo " MACHINE=xyz - the machine name (optional, autodetected from ZIMAGE if unspecified)" + echo " KERNEL - the kernel image file to use" + echo " ROOTFS - the rootfs image file or nfsroot directory to use" +# echo " (NFS booting assumed if ROOTFS not specified)" + echo " MACHINE=xyz - the machine name (optional, autodetected from KERNEL filename if unspecified)" echo " OPTIONS - extra options to pass to QEMU" exit 1 else - ZIMAGE=$1 + KERNEL=$1 shift fi if [ "x$MACHINE" = "x" ]; then - MACHINE=`basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'` + MACHINE=`basename $KERNEL | sed -r -e 's#.*-([a-z]+[0-9\-]*)-?[0-9]*..*#\1#'` fi if [ "x$1" = "x" ]; then - TYPE="nfs" + FSTYPE="nfs" + echo "Error: NFS booting without an explicit ROOTFS path is not yet supported" + exit 1 else - TYPE="ext3" - if [ "$MACHINE" = "akita" ]; then - TYPE="jffs2" - fi - if [ "$MACHINE" = "spitz" ]; then - TYPE="ext3" - fi - if [ "$MACHINE" = "nokia800" ]; then - TYPE="jffs2" - fi - if [ "$MACHINE" = "nokia800-maemo" ]; then - TYPE="jffs2" + ROOTFS=$1 + + if [ -d "$1" ]; then + echo "$ROOTFS is a directory, assuming nfsroot" + FSTYPE="nfs" + else + FSTYPE="ext3" + EXT=${ROOTFS##.*} + if [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" || + "x$EXT" == "xjffs2" ]]; then + FSTYPE=$EXT + fi + echo "Using $FSTYPE as filesytem type for $ROOTFS" fi - HDIMAGE=$1 shift fi |