I just received a R6300v2.
@tusc, thanks for the explanation. have you had any luck with the data persistence with the UBI images?
Zajec wrote:One important thing left to do is sysupgrade. We should think about a way do upgrade firmware without loosing UBI wearing level.
@zajec, just read a bit up on UBI, if I understand well it works in the following way:
raw flash -> MTD -> UBI -> UBIFS
UBI layer does wear-leveling and bad-block management. If i understand well, wear-leveling means that it keeps all the erase blocks at the same erase level via the Erase Counter ( EC ) in the UBI header. If the wear level is aprox. the same for all erase blocks not sure why we need to keep it over the upgrades. I assume the flashing happens at the mtd level, so the UBI headers are getting overwritten and all will start from 0, which is good because we are again at an average level with all blocks, but we lost the old level. Do we really need that level? or we just want all the blocks to be at the same level.
I've got another question in my mind, regarding bad-blocks. if the bad-blocks are know at UBI level, and flashing happens at MTD level, how will the flashing avoid the bad-blocks?
the UBI doc says ( http://www.linux-mtd.infradead.org/doc/ … bi_headers ) :
UBI stores 2 small 64-byte headers at the beginning of each non-bad physical eraseblock:
erase counter header (or EC header) which contains the erase counter of the physical eraseblock (PEB) plus some other not so important information;
volume identifier header (or VID header) which stores volume ID and logical eraseblock (LEB) number this PEB belongs to (plus some other not so important information).
maybe the fact that an UBI header is missing helps us identifying the bad-blocks.