aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/mtd/src/mtd.h
Commit message (Collapse)AuthorAgeFilesLines
* brcm47xx: rename target to bcm47xxAdrian Schmutzler2020-02-141-1/+1
| | | | | | | | | | This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mtd: add logic for TP-Link ramips recovery magicDavid Bauer2019-01-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds an option to set the recovery flag of newer TP-Link MediaTek boards and remove it after a successful write. To make use of this feature, add the '-t' option to mtd-write. The '-t' option takes the mtd partition containing the recovery flag (usually 'romfile') as an argument. Make sure this partition is not flagged as read-only! Example: > mtd -t romfile write owrt.bin firmware This command writes the recovery-flag before it begins writing the image to the firmware partition. After the image-write has been successful, the recovery flag is removed. This way, the TP-Link web-recovery is automatically enabled on an unsucessful flash (e.g. power loss). This option is only available if the mtd package is compiled for the ramips target. Signed-off-by: David Bauer <mail@david-bauer.net>
* mtd: add fixwrg commandGeorge Hopkins2018-02-131-0/+1
| | | | | | Add a command to fix WRG headers, based on wrgg.c. Signed-off-by: George Hopkins <george-hopkins@null.net>
* mtd: add fixwrgg commandStijn Tintel2016-10-271-0/+1
| | | | | | | Based on fixseama. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: John Crispin <john@phrozen.org>
* mtd: support -c (datasize) option for fixseama commandRafał Miłecki2016-06-201-1/+1
| | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
* mtd: add -c option for specifying amount of data to be used for checksumRafał Miłecki2016-05-091-1/+1
| | | | | | | | | | | | | | | So far fixtrx was calculating checksum over amount of data matching partition erase size. It was mostly a workaround of checksum problem after changing anything in initial TRX content (e.g. formatting JFFS2). Its main purpose was to make bootloader accept modified TRX. This didn't provide much protection of flash data against corruption. This new option lets caller request calculating checksum over a bigger amount of data. It may be used e.g. to include whole kernel data for checksum and hopefully make bootloader go info failsafe mode if something goes wrong. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
* mtd: detect image format when writingRafał Miłecki2016-02-061-1/+1
| | | | | | | | | | | | | | | Recently TRX checking code was changed to detect Seama format and don't abort whole writing operation because of it. This isn't a good long-term solution. It's a poor idea to teach every format handler recognizing all possible formats. Instead it should be handled in a generic code which should run check depending on the detected format. This will also allow further improvements like fixing formats other than TRX after replacing JFFS2. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48639
* mvebu: add support for the Linksys boot counterImre Kaloz2015-08-191-0/+1
| | | | | | | | | | | | | 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: add support for bad blocks in NAND flashFelix Fietkau2014-03-261-0/+1
| | | | | | | | | | | | | 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
* packages: clean up the package folderJohn Crispin2013-06-211-0/+29
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37007