recovery init: configure UBIFS update partition to use ZLIB compression

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2017-01-24 19:22:51 +01:00
parent 7cf8aa6e06
commit e80d5b021c
1 changed files with 3 additions and 0 deletions

View File

@ -279,6 +279,9 @@ format_ubi_volume() {
# Create UBI Vol. # Create UBI Vol.
ubimkvol "/dev/ubi${dev_number}" -m -N "${1}" >/dev/null 2>&1 ubimkvol "/dev/ubi${dev_number}" -m -N "${1}" >/dev/null 2>&1
if [ "$?" = "0" ]; then if [ "$?" = "0" ]; then
# Configure the empty UBIFS partition to use ZLIB
volid="$(ubinfo "/dev/ubi${dev_number}" -N "${1}" | sed -ne 's,Volume ID:[[:blank:]]\+\([0-9]\+\)[[:blank:]]\+.*,\1,g;T;p')"
mkfs.ubifs -x zlib -F /dev/ubi${dev_number}_${volid}
psplash_progress "100" psplash_progress "100"
log "Partition '${1}' successfully erased!" log "Partition '${1}' successfully erased!"
# Detach MTD partition. # Detach MTD partition.