From d00be8a3441ef2d9901711fb26cc4aa1dcfe272f Mon Sep 17 00:00:00 2001 From: Matt Madison Date: Mon, 5 Sep 2022 09:50:14 -0700 Subject: [PATCH] tegra-minimal-init: add delay and retry when looking up partition label Another workaround for SDcard-based systems. Signed-off-by: Matt Madison --- .../initrdscripts/tegra-minimal-init/platform-preboot.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot.sh b/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot.sh index 96f9c35d..7aa30f2d 100644 --- a/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot.sh +++ b/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot.sh @@ -17,7 +17,13 @@ if [ "$foundslotsfx" != "yes" ]; then [ "$slotnum" != "1" ] || slotsfx="_b" fi fi +blkid --probe 2>/dev/null rootdev=`blkid -l -t PARTLABEL=APP$slotsfx | cut -d: -f1` +if [ -z "$rootdev" ]; then + sleep 0.5 + blkid --probe 2>/dev/null + rootdev=`blkid -l -t PARTLABEL=APP$slotsfx | cut -d: -f1` +fi if [ -z "$rootdev" ]; then if [ -n "$mayberoot" ]; then rootdev="$mayberoot"