From f4e483f7b44be972cee5d7ecc2e5cd04a84b9ad2 Mon Sep 17 00:00:00 2001 From: Nagendrababu Date: Fri, 13 Aug 2021 12:32:24 -0400 Subject: [PATCH] WIFI-3244-WF610D-Config-Reset-Over-Sysupgrade This patch will fix configuration restore problem over sysupgrade on WF610D Even though there is a configuration data in the /dev/mtdblock12, it is getting erased while reading it beacuse of JFFS2 empty bitmask code. So I added a condition to check whether the datatype available is JFFS2 or not, and making sure it is not empty before returning the JFFS2 flag to restore the configuration. Signed-off-by: Nagendrababu --- ...-wf610d-config-reset-over-sysupgrade.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 patches/0060-wifi-3244-wf610d-config-reset-over-sysupgrade.patch diff --git a/patches/0060-wifi-3244-wf610d-config-reset-over-sysupgrade.patch b/patches/0060-wifi-3244-wf610d-config-reset-over-sysupgrade.patch new file mode 100644 index 000000000..a66087230 --- /dev/null +++ b/patches/0060-wifi-3244-wf610d-config-reset-over-sysupgrade.patch @@ -0,0 +1,37 @@ +From 87af8ae014551b73a51c30a0c30da2a2c666e548 Mon Sep 17 00:00:00 2001 +From: Nagendrababu +Date: Fri, 13 Aug 2021 11:41:25 -0400 +Subject: [PATCH] WIFI-3244-config-reset-over-sysupgrade + +This patch will fix configuration restore problem over sysupgrade +on WF610D +Even though there is a configuration data in the /dev/mtdblock12, it is getting erased while reading it beacuse of JFFS2 empty bitmask code. So I added a condition to check whether the datatype available is JFFS2 or not, and making sure it is not empty before returning the JFFS2 flag to restore the configuration. + +Signed-off-by: Nagendrababu +--- + .../system/fstools/patches/002-wf610d-config-reset | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + create mode 100644 package/system/fstools/patches/002-wf610d-config-reset + +diff --git a/package/system/fstools/patches/002-wf610d-config-reset b/package/system/fstools/patches/002-wf610d-config-reset +new file mode 100644 +index 0000000000..6e18f8669c +--- /dev/null ++++ b/package/system/fstools/patches/002-wf610d-config-reset +@@ -0,0 +1,13 @@ ++Index: fstools-2020-05-12-84269037/libfstools/mtd.c ++=================================================================== ++--- fstools-2020-05-12-84269037.orig/libfstools/mtd.c +++++ fstools-2020-05-12-84269037/libfstools/mtd.c ++@@ -226,6 +226,8 @@ static int mtd_volume_identify(struct vo ++ if (v->type == UBIVOLUME && deadc0de == 0xffffffff) { ++ return FS_JFFS2; ++ } +++ if (v->type == FS_JFFS2 && v->size && deadc0de == 0xffffffff) +++ return FS_JFFS2; ++ ++ return FS_NONE; ++ } +-- +2.25.1 +