Skip to content

Commit

Permalink
VGV952CJW33-E-IR: Revert subpage handling in upgrade scripts.
Browse files Browse the repository at this point in the history
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 fabfbe6.

Revert "VGV952CJW33-E-IR: Sysupgrade: Deactivate subpages on nand."

This reverts commit ac64e9e.
  • Loading branch information
Quallenauge committed Aug 6, 2020
1 parent 4d9b315 commit e959def
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
21 changes: 3 additions & 18 deletions package/base-files/files/lib/upgrade/nand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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 ] && {
Expand Down
17 changes: 1 addition & 16 deletions target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,11 @@ 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
;;
*)
default_do_upgrade "$1"
;;
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
}

0 comments on commit e959def

Please sign in to comment.