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 <francisco.gilmartinez@digi.com>
This commit is contained in:
parent
305789730e
commit
7c07b15370
|
|
@ -62,10 +62,11 @@ if [ -z "${UPDATE_FILE}" ]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
PARTTABLE="/proc/mtd"
|
||||
MTDINDEX="$(sed -ne "s/\(^mtd[0-9]\+\):.*\<environment\>.*/\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\).*\<ubifs\>.*/\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)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue