From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 18 Jul 2013 17:10:05 +0200 Subject: [U-Boot] [RFC][DFU] Unification of dfu_alt_info alt settings description + command execution In-Reply-To: <20130718080926.27474380DF1@gemini.denx.de> References: <20130716173521.3dd7ec9e@amdc308.digital.local> <51E77A1D.90403@denx.de> <20130718080926.27474380DF1@gemini.denx.de> Message-ID: <201307181710.05980.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, > Dear Heiko Schocher, > > In message <51E77A1D.90403@denx.de> you wrote: > > > Try "nand write.trimffs" to write UBI images produced with ubinize . > > > > This solves not the erasecounter problem, or? > > > > For UBI we need something like this: > > http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo > > > > But I am not an UBI expert. It is possible I overlook something > > obvious ... > > No, you don't. Devices managed by UBI should never be erased by > other, non-UBI-aware tools. I based my reply on the following commit in U-Boot and the fact that write.trimffs is used to flash UBI images. Maybe I was wrong? commit c9494866df835bcee68e17339aec1090faa704da Author: Ben Gardiner Date: Tue Jun 14 16:35:07 2011 -0400 cmd_nand: add nand write.trimffs command Add another nand write. variant, trimffs. This command will request of nand_write_skip_bad() that all trailing all-0xff pages will be dropped from eraseblocks when they are written to flash as-per the reccommended behaviour of the UBI FAQ [1]. The function that implements this timming is the drop_ffs() function by Artem Bityutskiy, ported from the mtd-utils tree. [1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo Best regards, Marek Vasut