recovery-initramfs: get rid off singlemtdsys variable

This variable is not defined in ccmp1 platforms, making the
swupdate for single mtd failing.

Instead of reading this variable from uboot environment,
determine if the system is multimtd checking the existence
of /dev/ubi1.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
This commit is contained in:
Francisco Gil 2023-07-05 15:19:54 +02:00
parent 0c5b5ff75e
commit 1e5bd003bd
1 changed files with 2 additions and 4 deletions

View File

@ -231,10 +231,8 @@ format_ubi_volume() {
psplash_message "Formatting '${1}' partition..."
psplash_progress "0"
# Read the singlemtdsys variable.
read_uboot_var singlemtdsys singlemtdsys
if [ "${singlemtdsys}" = "yes" ]; then
# If /dev/ubi1 exists is a system with multiple MTD partitions
if [ ! -c "/dev/ubi1" ]; then
# Find the volume number associated to the volume name
for d in /dev/ubi0_*; do
volname="$(ubinfo ${d} | grep ^Name | awk '{print $(2)}')"