summaryrefslogtreecommitdiffstats
path: root/common/ubiformat.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: fastboot: ubiformat: Fix bad block handlingSascha Hauer2019-01-281-12/+28
| | | | | | | When fastboot handles UBI images in sparse file format then bad blocks of the underlying mtd device are not skipped. This patch fixes this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ubiformat: print messages after checking a block is not badSascha Hauer2018-11-141-6/+6
| | | | | | | | | ubiformat prints its "flashing eraseblock x" and "formatting eraseblock x" messages before having checked that a block is actually good. This is misleading, so first check if a block is good and only if it is print a message. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ubiformat: Allow to ubiformat with a buffer givenSascha Hauer2018-02-091-19/+36
| | | | | | | So far ubiformat can only handle files. Make it possible to pass a buffer into ubiformat. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2018-01-221-4/+14
|\
| * ubiformat: Lower message printing frequencySascha Hauer2018-01-111-4/+14
| | | | | | | | | | | | | | | | | | During scanning and formatting printing the messages on a serial line has significant overhead up to the point where it takes longer to print the messages than it takes to do the work. Lower the message printing frequency to improve performance. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ubiformat: Add ubiformat write functionSascha Hauer2018-01-111-0/+61
|/ | | | | | | | | | | | | The ubiformat C API expects an image file as argument. With upcoming Android fastboot sparse image support we can no longer provide a complete image anymore. With this patch we can write an image in multiple chunks after we've formatted a MTD device with ubiformat. ubiformat_write will skip the EC header in both the MTD device we write to and also the image we read from, so we can flash an image on a MTD device containing EC headers already. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ubiformat: use default values for ubi_ver and image_seqSascha Hauer2016-04-261-0/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: ubiformat: move code to common/Sascha Hauer2016-04-261-0/+675
This is the final step to separate the ubiformat code from the command. With this the ubiformat code gains a C API. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>