From e959def67f7373b3f509adf333d8e4be975839e8 Mon Sep 17 00:00:00 2001 From: Quallenauge Date: Thu, 16 Jan 2020 23:24:51 +0800 Subject: [PATCH] VGV952CJW33-E-IR: Revert subpage handling in upgrade scripts. The kernel handles these by itself since some time ago. Revert "Use partition 'ubi' (mtd12) for rootfs and rootfs_data; use 512 UBI sub-blocks" This reverts commit fabfbe6bf19696f2fc211586ba4875b14c7bd58e. Revert "VGV952CJW33-E-IR: Sysupgrade: Deactivate subpages on nand." This reverts commit ac64e9e820be47dffa5b967d613fca2cfc876a1c. --- package/base-files/files/lib/upgrade/nand.sh | 21 +++---------------- .../xrx200/base-files/lib/upgrade/platform.sh | 17 +-------------- 2 files changed, 4 insertions(+), 34 deletions(-) diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh index 5075fc243d2..ad04bbc753b 100644 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/base-files/files/lib/upgrade/nand.sh @@ -13,9 +13,6 @@ CI_UBIPART="${CI_UBIPART:-ubi}" # 'rootfs' partition on NAND contains the rootfs CI_ROOTPART="${CI_ROOTPART:-rootfs}" -# VID header offset is used e.g. to ignore sub pages by setting them to 2048 -CU_UBI_VID_HEADER_OFFSET="" - ubi_mknod() { local dir="$1" local dev="/dev/$(basename $dir)" @@ -132,26 +129,14 @@ nand_upgrade_prepare_ubi() { local ubidev="$( nand_find_ubi "$CI_UBIPART" )" if [ ! "$ubidev" ]; then - if [ ! -z $CU_UBI_VID_HEADER_OFFSET ]; then - echo "Forcing ubiattach with possible non standard VID header offset of <$CU_UBI_VID_HEADER_OFFSET>" - ubiattach -m "$mtdnum" -O $CU_UBI_VID_HEADER_OFFSET - else - ubiattach -m "$mtdnum" - fi + ubiattach -m "$mtdnum" sync ubidev="$( nand_find_ubi "$CI_UBIPART" )" fi if [ ! "$ubidev" ]; then - if [ ! -z $CU_UBI_VID_HEADER_OFFSET ]; then - echo "Forcing ubiformat with possible non standard VID header offset of <$CU_UBI_VID_HEADER_OFFSET>" - ubiformat /dev/mtd$mtdnum -s $CU_UBI_VID_HEADER_OFFSET -y - echo "Forcing ubiattach with possible non standard VID header offset of <$CU_UBI_VID_HEADER_OFFSET>" - ubiattach -m "$mtdnum" -O $CU_UBI_VID_HEADER_OFFSET - else - ubiformat /dev/mtd$mtdnum -y - ubiattach -m "$mtdnum" - fi + ubiformat /dev/mtd$mtdnum -y + ubiattach -m "$mtdnum" sync ubidev="$( nand_find_ubi "$CI_UBIPART" )" [ "$has_env" -gt 0 ] && { diff --git a/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh index 7f6b8667733..dcd797c30dc 100755 --- a/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh +++ b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh @@ -15,8 +15,7 @@ platform_do_upgrade() { avm,fritz7412|\ bt,homehub-v5a|\ zyxel,p-2812hnu-f1|\ - zyxel,p-2812hnu-f3|\ - lantiq,vgv952cjw33-e-ir) + zyxel,p-2812hnu-f3) nand_do_upgrade $1 ;; *) @@ -24,17 +23,3 @@ platform_do_upgrade() { ;; esac } - -platform_nand_pre_upgrade() { - local board=$(board_name) - echo "platform_nand_pre_upgrade()" - - case "$board" in - lantiq,vgv952cjw33-e-ir ) - # This is a global defined in nand.sh, sets another VID header offset than default. - # (now disabled, as it looks like eb904 can handle 512 byte subpages as reported by driver) - #echo "Set header offset" - #CU_UBI_VID_HEADER_OFFSET="2048" - ;; - esac -}