summaryrefslogtreecommitdiffstats
path: root/package/system/mtd/src/mtd.c
Commit message (Collapse)AuthorAgeFilesLines
* mvebu: add support for the Linksys boot counterImre Kaloz2015-08-191-0/+12
| | | | | | | | | | | | | The u-boot boot counter was never reset after a successful boot, which sometimes could make some variables become out of sync. This patch adds support for the boot counter and enables auto_recovery unconditionally. Signed-off-by: Jonas Gorski <jogo@openwrt.org> Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 46690
* mtd: fix md5sum error checkingJohn Crispin2015-03-051-1/+1
| | | | | | | | | | | | | | In mtd_verify(), the return value of md5sum() has been interpreted as error if nonzero, while the function returns number of processed bytes, which caused mtd_verify() to always fail. This patch fixes error checking to interpret only negative values as errors. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> SVN-Revision: 44605
* mtd: make the dump commnd honour the -o optionJohn Crispin2014-12-031-6/+5
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 43512
* mtd: make the mtd dump call run properly on nand flashJohn Crispin2014-12-021-5/+18
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 43503
* mtd: add ability to dump a mtd deviceJohn Crispin2014-12-021-5/+57
| | | | | | | | | this can be used on nand flashes and will skip bad blocks and run ecc on the read data before dumping it. Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 43500
* mtd: fix 2 compiler warningsJohn Crispin2014-11-261-2/+1
| | | | | | | | | mtd.c:544:7: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘ssize_t’ [-Wformat] mtd.c:602:1: warning: label ‘done’ defined but not used [-Wunused-label] Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 43383
* mtd: fix compile error with muslFelix Fietkau2014-05-211-0/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40819
* mtd: improve mtd detectionJohn Crispin2014-03-301-1/+3
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 40301
* mtd: add support for bad blocks in NAND flashFelix Fietkau2014-03-261-5/+46
| | | | | | | | | | | | | NAND flash is very likely to contain bad blocks. Currently, mtd and therefore sysupgrade fails when it encounters a single bad block, potentially leaving an unbootable system. This patch allows the mtd utility to skip bad blocks in NAND flash and complete sysupgrade successfully. Patch by: Matthew Redfearn <matt.redfearn@nxp.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40021
* mtd: add a "mtd verify" callJohn Crispin2013-11-191-1/+69
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 38871
* ar71xx: Unifi AP Pro sysupgrade patchFelix Fietkau2013-11-141-3/+12
| | | | | | | | | | | | | | | | | | The current implementation of mtd will not append the backup file created by sysupgrade to the correct partition, as mtd will append the data to first jffs2 partition it finds. As the kernel is also stored on a jffs2 partition (which resides before the overlay partition), the data will be appended to this partition. To fix this problem, a new option -s <number> skip the first n bytes when appending data to the jffs2 partiton, defaults to "0" is added to mtd. Signed-off-by: Peter Wagner <tripolar@gmx.at> SVN-Revision: 38807
* kernel/base-files: clean up old code related to refreshing mtd partitions, ↵Felix Fietkau2013-07-141-38/+0
| | | | | | | | it is no longer used anywhere Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37282
* packages: clean up the package folderJohn Crispin2013-06-211-0/+761
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37007