mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-11-02 13:27:58 +00:00
tegra-minimal-init:platform-preboot.sh: support more bootdev types
Support more bootdev types: UUID, PARTUUID, PARTLABEL, LABEL. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
This commit is contained in:
@@ -35,7 +35,21 @@ fi
|
|||||||
if [ -z "$rootdev" ]; then
|
if [ -z "$rootdev" ]; then
|
||||||
echo "[FAIL]"
|
echo "[FAIL]"
|
||||||
if [ -n "$mayberoot" ]; then
|
if [ -n "$mayberoot" ]; then
|
||||||
|
if [ "`echo $mayberoot | cut -c1-5`" = "UUID=" ]; then
|
||||||
|
rootuuid=`echo $mayberoot | cut -c6-`
|
||||||
|
rootdev="`blkid -t UUID=$rootuuid -l | awk -F: '{ print $1 }'`"
|
||||||
|
elif [ "`echo $mayberoot | cut -c1-9`" = "PARTUUID=" ]; then
|
||||||
|
rootpartuuid=`echo $mayberoot | cut -c10-`
|
||||||
|
rootdev="`blkid -t PARTUUID=$rootpartuuid -l | awk -F: '{ print $1 }'`"
|
||||||
|
elif [ "`echo $mayberoot | cut -c1-10`" = "PARTLABEL=" ]; then
|
||||||
|
rootpartlabel=`echo $mayberoot | cut -c11-`
|
||||||
|
rootdev="`blkid -t PARTLABEL=$rootpartlabel -l | awk -F: '{ print $1 }'`"
|
||||||
|
elif [ "`echo $mayberoot | cut -c1-6`" = "LABEL=" ]; then
|
||||||
|
rootlabel=`echo $mayberoot | cut -c7-`
|
||||||
|
rootdev="`blkid -t LABEL=$rootlabel -l | awk -F: '{ print $1 }'`"
|
||||||
|
else
|
||||||
rootdev="$mayberoot"
|
rootdev="$mayberoot"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
rootdev="/dev/@@TNSPEC_BOOTDEV@@"
|
rootdev="/dev/@@TNSPEC_BOOTDEV@@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user