summaryrefslogtreecommitdiffstats
path: root/package/mtd/src/mtd.c
Commit message (Collapse)AuthorAgeFilesLines
* mtd: fix trx_fixupnbd2012-07-251-1/+7
| | | | | | | | | | | | | | | | With the BRCM47xx image I have built (Linksys E3000), there are additional writes following the completion of "mtd_replace_jffs2" which invalidate the 'trx_fixup' performed by 'mtd_replace_jffs2'. Moving the 'trx_fixup' to somewhere after all writes have completed fixes the problem. I also noticed that 'erasesize' used to compute 'block_offset' in 'mtd_fixtrx' is used before it is computed by 'mtd_check_open'; moving the call to 'mtd_check_open' up a few lines fixes this. Unlike 'mtd_fixtrx', 'trx_fixup' appears to assume that the TRX header is always at offset 0; which may be the cause of the problem described in Ticket #8960. Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32866 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd - add partition offset parameterjow2012-07-041-6/+20
| | | | | | | | | The offset parameter can be used to write the data at the offset instead of writing it to the beginning of the partition. Signed-off-by: Marek Linder <lindner_marek@yahoo.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32600 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: define MTDREFRESH if not defined (external kernel)florian2012-02-061-0/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30340 3c298f89-4303-0410-b956-a3cf2f4a3e73
* target: linux: mtd: fix MTDREFRESH to an arbitrary high numberjogo2011-11-091-1/+1
| | | | | | | | | To make the ioctl number "stable", use an arbitrary high number to prevent conflicts with new mtd ioctls that would push MTDREFRESH's number. Also make mtd use the in-kernel mtd headers. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28893 3c298f89-4303-0410-b956-a3cf2f4a3e73
* package/mtd: don't append jffs2 data multiple timesjuhosg2011-07-021-0/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27358 3c298f89-4303-0410-b956-a3cf2f4a3e73
* package/mtd: make fixtrx available on ar71xx as welljuhosg2011-01-051-2/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24911 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: Added fixtrx for brcm63xx imagetag. This allows brcm63xx boards which ↵cshore2010-12-261-1/+1
| | | | | | | | experience a CRC on second boot due to the JFFS2 creation / DEADC0DE deletion to work correctly when mtd fixtrx is run on first boot Signed-off-by: Daniel Dickinson <daniel@cshore.neomailbox.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24835 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: Changed mtd_fixtrx and related functions to be weak references. The ↵cshore2010-12-261-106/+23
| | | | | | | | weak references only lead to actual functions for brcm47xx Signed-off-by: Daniel Dickinson <daniel@cshore.neomailbox.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24833 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] mtd: whitespace cleanupjow2010-11-241-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24135 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [package] mtd: fix r24132jow2010-11-241-29/+29
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24134 3c298f89-4303-0410-b956-a3cf2f4a3e73
* package/mtd: (enhancement) add option to prevent erase when writing to ↵acoul2010-11-241-1/+10
| | | | | | flash. (closes #8308) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24132 3c298f89-4303-0410-b956-a3cf2f4a3e73
* package/mtd: write remaining data after adding file to the jffs2 partitionjuhosg2010-09-031-7/+29
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22881 3c298f89-4303-0410-b956-a3cf2f4a3e73
* package/mtd: add fixtrx commandjuhosg2010-03-271-2/+109
| | | | | | | | * patch by Bernhard Loos * note: trailing whitespaces are removed git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20524 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: fix typo (thx, Plouj)nbd2010-01-211-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19263 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: fix wrong open() return code checksnbd2009-09-211-6/+6
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17666 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: update copyright headersnbd2009-09-211-5/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17660 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: add support for rewriting the fis table layout on redboot based systemsnbd2009-09-211-50/+199
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17659 3c298f89-4303-0410-b956-a3cf2f4a3e73
* fix jffs2 eof marker search in mtd (patch by Daniel Dickinson)nbd2009-09-051-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17522 3c298f89-4303-0410-b956-a3cf2f4a3e73
* get rid of $Id$ - it has never helped us and it has broken too many patches ;)nbd2009-04-171-1/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15242 3c298f89-4303-0410-b956-a3cf2f4a3e73
* remove accidentally committed debug messagenbd2008-10-021-3/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12827 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: fix image check on non-broadcom platformsnbd2008-10-021-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12825 3c298f89-4303-0410-b956-a3cf2f4a3e73
* fix some warningsnbd2008-09-251-1/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12707 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: improve support for reading input from a pipe. fixes sysupgradenbd2008-09-251-9/+21
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12706 3c298f89-4303-0410-b956-a3cf2f4a3e73
* clean up mtd, fix up trx header when integrating jffs2 data on broadcom devicesnbd2008-09-231-72/+12
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12655 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mtd: use broadcom specific code on linux 2.6 as wellnbd2008-09-221-0/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12651 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add support for appending a file to jffs2 during reflash on the flynbd2008-08-081-26/+49
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12250 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add sysupgrade script for config preserving system upgrades. only ↵nbd2007-08-211-1/+1
| | | | | | implemented for x86-2.6 at the moment, but can be ported to other platforms easily git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8456 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cleanup mtd, implement jffs2write - one step closer to config preserving ↵nbd2007-08-201-124/+171
| | | | | | system upgrades git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8444 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add 'mtd refresh' commandnbd2007-08-191-1/+32
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8439 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Add a "Rebooting ..." message to the mtd utilmbm2007-05-101-1/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7159 3c298f89-4303-0410-b956-a3cf2f4a3e73
* change handling of non-trx filesmbm2007-04-101-13/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6924 3c298f89-4303-0410-b956-a3cf2f4a3e73
* fallback when devfs names aren't foundmbm2007-03-091-1/+6
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6541 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add reboot fix for mtd (thanks, wbx)nbd2006-11-261-4/+8
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5645 3c298f89-4303-0410-b956-a3cf2f4a3e73
* fix mtd compilenbd2006-11-121-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5505 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ignore mtd erase errors (will probably be required for nand flash)nbd2006-10-251-5/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5292 3c298f89-4303-0410-b956-a3cf2f4a3e73
* turn target runtime check of mtd into a compile-time checknbd2006-10-241-18/+6
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5285 3c298f89-4303-0410-b956-a3cf2f4a3e73
* improve mtd image check - don't check trx header if the target partition is ↵nbd2006-10-231-10/+15
| | | | | | not 'linux', don't display image check messages with -qq and -f, fixes #850 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5269 3c298f89-4303-0410-b956-a3cf2f4a3e73
* move source file to src/.nico2006-06-181-0/+475
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3991 3c298f89-4303-0410-b956-a3cf2f4a3e73