From aa3fa4f4802d00ece88d05475a9ba3b59fded9de Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 5 Aug 2013 19:19:08 +0400 Subject: [PATCH] gui/update.cpp: download different image for different system fs erase size Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/8ade9f656b88522bae7f49a8cf86920133fede71 Author: [CST] Focus Date: 2013-08-05 (Mon, 05 Aug 2013) --- src/gui/update.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 8e0ddfec7..63e651dc0 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -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