From 7c07b15370715cdfe76bc68133a00d543eb3b122 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Mon, 14 Nov 2022 17:42:38 +0100 Subject: [PATCH] update-firmware: change the way to determine nand device The partition "environment" is not available in the ccmp15. The solution suggested is read the "/proc/mounts" and check if the "rootfs" is "ubifs" mounted. Signed-off-by: Francisco Gil --- .../recipes-digi/dualboot/dualboot/update-firmware | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meta-digi-dey/recipes-digi/dualboot/dualboot/update-firmware b/meta-digi-dey/recipes-digi/dualboot/dualboot/update-firmware index d1650644a..0ca753613 100755 --- a/meta-digi-dey/recipes-digi/dualboot/dualboot/update-firmware +++ b/meta-digi-dey/recipes-digi/dualboot/dualboot/update-firmware @@ -62,10 +62,11 @@ if [ -z "${UPDATE_FILE}" ]; then exit fi -PARTTABLE="/proc/mtd" -MTDINDEX="$(sed -ne "s/\(^mtd[0-9]\+\):.*\.*/\1/g;T;p" ${PARTTABLE} 2>/dev/null)" +# Check if the rootfs is ubifs to determine if it is a nand or emmc device +PARTTABLE="/proc/mounts" +NANDROOTFS="$(sed -ne "s/\(rootfs\).*\.*/\1/g;T;p" ${PARTTABLE} 2>/dev/null)" -if [ -z "${MTDINDEX}" ]; then +if [ -z "${NANDROOTFS}" ]; then # Get Boot partition device and index. BOOT_PART="$(fw_printenv -n mmcpart 2>/dev/null)" BOOT_DEV="$(fw_printenv -n mmcbootdev 2>/dev/null)"