u-boot/drivers/dfu
Patrick Delaunay 562274730a dfu: mtd: skip empty pages when writing page for UBI partition
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 13cb7cc9e8 ("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 c9494866df ("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@foss.st.com>
2022-01-28 17:58:41 -05:00
..
dfu.c dfu: newline after updating 2021-11-07 18:36:56 +01:00
dfu_alt.c dfu: add dfu_write_by_alt() 2020-10-30 14:20:27 +01:00
dfu_mmc.c global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
dfu_mtd.c dfu: mtd: skip empty pages when writing page for UBI partition 2022-01-28 17:58:41 -05:00
dfu_nand.c global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
dfu_ram.c global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
dfu_sf.c dfu: dfu_sf: Read the SPI flash in 16 MiB chunks 2021-10-25 18:13:12 -04:00
dfu_virt.c global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
Kconfig dfu: Sort Kconfig entries alphabetically 2021-10-26 15:26:45 -04:00
Makefile dfu: rename dfu_tftp_write() to dfu_write_by_name() 2020-10-30 14:20:27 +01:00