[PATCH] dfu: mtd: skip empty pages when writing page for UBI partition

Tom Rini trini at konsulko.com
Sat Jan 29 19:49:43 CET 2022


On Tue, Jan 18, 2022 at 10:26:21AM +0100, Patrick Delaunay wrote:

> Align the DFU MTD backend for the UBI partitions with the mtd command write
> behavior when the option .dontskipff is not used: don't write the empty
> pages (full of 0xFF); it is not required for UBI, see [1] for details.
> 
> This patch avoids the "free space fixup" procedure in the kernel [2]
> and allows to program a UBIFS volume generated by mkfs.ubifs without the
> option -F, --space-fixup.
> 
> The MTD DFU backend implements this behavior introduced on DFU NAND
> backend by the commit 13cb7cc9e8e4 ("dfu: Add option to skip empty pages
> when flashing UBI images to NAND") and also supported by the command nand
> by CONFIG_CMD_NAND_TRIMFFS and by commit c9494866df83 ("cmd_nand: add nand
> write.trimffs command").
> 
> [1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo
> [2] http://www.linux-mtd.infradead.org/faq/ubifs.html#L_free_space_fixup
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220129/5406f240/attachment.sig>


More information about the U-Boot mailing list