gui/update.cpp: download different image for different system fs erase size

Origin commit data
------------------
Commit: 8ade9f656b
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-08-05 (Mon, 05 Aug 2013)
This commit is contained in:
[CST] Focus
2013-08-05 19:19:08 +04:00
parent 75ff071743
commit aa3fa4f480

View File

@@ -260,6 +260,15 @@ bool CFlashUpdate::selectHttpImage(void)
newVersion = versions[selected];
file_md5 = md5s[selected];
fileType = fileTypes[selected];
#ifdef BOXMODEL_APOLLO
if(fileType < '3') {
int esize = CMTDInfo::getInstance()->getMTDEraseSize(sysfs);
printf("[update] erase size is %x\n", esize);
if (esize == 0x40000) {
filename += ".256k";
}
}
#endif
#ifdef DEBUG
printf("[update] filename %s type %c newVersion %s md5 %s\n", filename.c_str(), fileType, newVersion.c_str(), file_md5.c_str());
#endif