mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-10-29 19:42:41 +00:00
tegra-minimal-init:platform-preboot.sh: avoid unecessarily boot delay
When foundslotsfx is not set true, it does not have to wait for APP$slotsfx partition, that can delay the boot. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ for bootarg in `cat /proc/cmdline`; do
|
||||
rootwait) wait="yes" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$foundslotsfx" != "yes" ]; then
|
||||
# This variable file contains a type (should be 6) followed by the value (should be 0 or 1)
|
||||
bcdata=$(echo $(hexdump -n 8 -e '2/4 " %u"' /sys/firmware/efi/efivars/BootChainOsCurrent-781e084c-a330-417c-b678-38e696380cb9 2>/dev/null))
|
||||
@@ -16,20 +17,21 @@ if [ "$foundslotsfx" != "yes" ]; then
|
||||
slotnum=$(echo "$bcdata" | cut -d' ' -f2)
|
||||
[ "$slotnum" != "1" ] || slotsfx="_b"
|
||||
fi
|
||||
|
||||
message="Waiting for APP$slotsfx partition..."
|
||||
for count in $(seq 1 10); do
|
||||
blkid --probe 2>/dev/null
|
||||
rootdev=`blkid -l -t PARTLABEL=APP$slotsfx | cut -d: -f1`
|
||||
if [ -n "$rootdev" ]; then
|
||||
echo "[OK: $rootdev]"
|
||||
break
|
||||
fi
|
||||
echo -n "$message"
|
||||
message="."
|
||||
sleep 0.5
|
||||
done
|
||||
fi
|
||||
|
||||
message="Waiting for APP$slotsfx partition..."
|
||||
for count in $(seq 1 10); do
|
||||
blkid --probe 2>/dev/null
|
||||
rootdev=`blkid -l -t PARTLABEL=APP$slotsfx | cut -d: -f1`
|
||||
if [ -n "$rootdev" ]; then
|
||||
echo "[OK: $rootdev]"
|
||||
break
|
||||
fi
|
||||
echo -n "$message"
|
||||
message="."
|
||||
sleep 0.5
|
||||
done
|
||||
if [ -z "$rootdev" ]; then
|
||||
echo "[FAIL]"
|
||||
if [ -n "$mayberoot" ]; then
|
||||
|
||||
Reference in New Issue
Block a user