From c85d064bdd382e1fc8b5045b9b2540336b44eaa0 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Tue, 22 Aug 2023 16:28:12 +0200 Subject: [PATCH] recovery: squashfs: change the way to determine nand device There is a corner case in the cc6ul where the update from recovery was failing. If the u-boot variable rootfstype is set to squashfs u-boot modify the bootargs adding "root=/dev/ubiblock1_0". The grep of the command line was failing and detecting the device as mmc and making the firmware update process fail. Modify the grep to use the same system that we are using in the update-firmware script. Signed-off-by: Francisco Gil --- .../recovery/recovery-initramfs/recovery-initramfs-init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init index e940e075a..2008343ca 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init +++ b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init @@ -169,10 +169,10 @@ quit_with_error() { # @return - "yes" if the system is running in NAND, "no" otherwise #------------------------------------------------------------------------------ is_nand() { - if grep -qs "\broot=\(ubi\|mtd\)" /proc/cmdline; then - echo "yes" - else + if grep -qs 'root=PARTUUID.*' /proc/cmdline; then echo "no" + else + echo "yes" fi }