mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
poky-qemu: integrate userspace nfsroot support
This is the first phase of some refactoring the poky-qemu control scripts are getting. This integrates userspace nfsroot support into poky-qemu, making runqemu-nfs obsolete. This fixes [BUGID #295] Signed-off-by: Scott Garman <scott.a.garman@intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
c8a181e847
commit
fcbd67c047
+23
-21
@@ -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"
|
||||
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
|
||||
if [ "$MACHINE" = "spitz" ]; then
|
||||
TYPE="ext3"
|
||||
fi
|
||||
if [ "$MACHINE" = "nokia800" ]; then
|
||||
TYPE="jffs2"
|
||||
fi
|
||||
if [ "$MACHINE" = "nokia800-maemo" ]; then
|
||||
TYPE="jffs2"
|
||||
fi
|
||||
HDIMAGE=$1
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user