mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
runqemu: minor tweaks
(From OE-Core rev: cda565317eefbac1b7fb268d3d8720ebae8057fa) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
215a1ea026
commit
56f243e4ce
+21
-19
@@ -104,21 +104,19 @@ while [ $i -le $# ]; do
|
|||||||
error "conflicting FSTYPE types [$FSTYPE] and [$arg]"
|
error "conflicting FSTYPE types [$FSTYPE] and [$arg]"
|
||||||
;;
|
;;
|
||||||
*-image*)
|
*-image*)
|
||||||
if [ -z "$ROOTFS" ]; then
|
[ -z "$ROOTFS" ] || \
|
||||||
if [ -f "$arg" ]; then
|
error "conflicting ROOTFS args [$ROOTFS] and [$arg]"
|
||||||
process_filename $arg
|
if [ -f "$arg" ]; then
|
||||||
elif [ -d "$arg" ]; then
|
process_filename $arg
|
||||||
# Handle the case where the nfsroot dir has -image-
|
elif [ -d "$arg" ]; then
|
||||||
# in the pathname
|
# Handle the case where the nfsroot dir has -image-
|
||||||
echo "Assuming $arg is an nfs rootfs"
|
# in the pathname
|
||||||
FSTYPE=nfs
|
echo "Assuming $arg is an nfs rootfs"
|
||||||
ROOTFS=$arg
|
FSTYPE=nfs
|
||||||
else
|
ROOTFS=$arg
|
||||||
ROOTFS=$arg
|
|
||||||
LAZY_ROOTFS="true"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
error "conflicting ROOTFS args [$ROOTFS] and [$arg]"
|
ROOTFS=$arg
|
||||||
|
LAZY_ROOTFS="true"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"nographic")
|
"nographic")
|
||||||
@@ -144,14 +142,15 @@ while [ $i -le $# ]; do
|
|||||||
;;
|
;;
|
||||||
"audio")
|
"audio")
|
||||||
if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" ]; then
|
if [ "x$MACHINE" = "xqemux86" -o "x$MACHINE" = "xqemux86-64" ]; then
|
||||||
echo "Enable audio on qemu. Pls. install snd_intel8x0 or snd_ens1370 driver in linux guest.";
|
echo "Enabling audio in qemu."
|
||||||
|
echo "Please install snd_intel8x0 or snd_ens1370 driver in linux guest."
|
||||||
QEMU_AUDIO_DRV="alsa"
|
QEMU_AUDIO_DRV="alsa"
|
||||||
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -soundhw ac97,es1370"
|
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -soundhw ac97,es1370"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"kvm")
|
"kvm")
|
||||||
KVM_ENABLED="yes"
|
KVM_ENABLED="yes"
|
||||||
KVM_CAPABLE=`grep 'vmx\|smx' /proc/cpuinfo`
|
KVM_CAPABLE=`grep -q 'vmx\|smx' /proc/cpuinfo && echo 1`
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# A directory name is an nfs rootfs
|
# A directory name is an nfs rootfs
|
||||||
@@ -190,7 +189,8 @@ YOCTO_KVM_WIKI="https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qe
|
|||||||
# Detect KVM configuration
|
# Detect KVM configuration
|
||||||
if [ "x$KVM_ENABLED" = "xyes" ]; then
|
if [ "x$KVM_ENABLED" = "xyes" ]; then
|
||||||
if [ -z "$KVM_CAPABLE" ]; then
|
if [ -z "$KVM_CAPABLE" ]; then
|
||||||
echo "You are tring to enable KVM on cpu without VT support. Remove kvm from the command-line, or refer";
|
echo "You are trying to enable KVM on a cpu without VT support."
|
||||||
|
echo "Remove kvm from the command-line, or refer"
|
||||||
echo "$YOCTO_KVM_WIKI";
|
echo "$YOCTO_KVM_WIKI";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
@@ -199,14 +199,16 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
if [ ! -e /dev/kvm ]; then
|
if [ ! -e /dev/kvm ]; then
|
||||||
echo "Missing KVM device. Have you inserted kvm modules? Pls. refer";
|
echo "Missing KVM device. Have you inserted kvm modules?"
|
||||||
|
echo "For further help see"
|
||||||
echo "$YOCTO_KVM_WIKI";
|
echo "$YOCTO_KVM_WIKI";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
if 9<>/dev/kvm ; then
|
if 9<>/dev/kvm ; then
|
||||||
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm"
|
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm"
|
||||||
else
|
else
|
||||||
echo "You have no rights on /dev/kvm. Pls. change the owndership as described at";
|
echo "You have no rights on /dev/kvm."
|
||||||
|
echo "Please change the ownership of this file as described at"
|
||||||
echo "$YOCTO_KVM_WIKI";
|
echo "$YOCTO_KVM_WIKI";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user