mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-10-29 11:32:30 +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,8 +35,22 @@ fi
|
||||
if [ -z "$rootdev" ]; then
|
||||
echo "[FAIL]"
|
||||
if [ -n "$mayberoot" ]; then
|
||||
rootdev="$mayberoot"
|
||||
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"
|
||||
fi
|
||||
else
|
||||
rootdev="/dev/@@TNSPEC_BOOTDEV@@"
|
||||
rootdev="/dev/@@TNSPEC_BOOTDEV@@"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user