poky-qemu: fix for handling full path to rootfs
This fixes [BUGID #427] Signed-off-by: Scott Garman <scott.a.garman@intel.com>
This commit is contained in:
parent
cecd1bdf6f
commit
364aaa6dfa
|
@ -74,8 +74,12 @@ while [ $i -le $# ]; do
|
||||||
;;
|
;;
|
||||||
*-image-*)
|
*-image-*)
|
||||||
if [ -z "$ROOTFS" ]; then
|
if [ -z "$ROOTFS" ]; then
|
||||||
ROOTFS=$arg
|
if [ -e "$arg" ]; then
|
||||||
LAZY_ROOTFS="true"
|
ROOTFS=$arg
|
||||||
|
else
|
||||||
|
ROOTFS=$arg
|
||||||
|
LAZY_ROOTFS="true"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Error: conflicting ROOTFS args [$ROOTFS] and [$arg]"
|
echo "Error: conflicting ROOTFS args [$ROOTFS] and [$arg]"
|
||||||
usage
|
usage
|
||||||
|
@ -159,6 +163,19 @@ fi
|
||||||
machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
|
machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
|
||||||
# MACHINE is now set for all cases
|
# MACHINE is now set for all cases
|
||||||
|
|
||||||
|
if [[ -e "$ROOTFS" && -z "$FSTYPE" ]]; then
|
||||||
|
# Extract the filename extension
|
||||||
|
EXT=`echo $ROOTFS | awk -F . '{ print \$NF }'`
|
||||||
|
if [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" ||
|
||||||
|
"x$EXT" == "xjffs2" ]]; then
|
||||||
|
FSTYPE=$EXT
|
||||||
|
else
|
||||||
|
echo "Note: Unable to determine filesystem extension for $ROOTFS"
|
||||||
|
echo "We will use the default FSTYPE for $MACHINE"
|
||||||
|
# ...which is done further below...
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Defaults used when these vars need to be inferred
|
# Defaults used when these vars need to be inferred
|
||||||
QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
|
QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
|
||||||
QEMUX86_DEFAULT_FSTYPE=ext3
|
QEMUX86_DEFAULT_FSTYPE=ext3
|
||||||
|
|
Loading…
Reference in New Issue