Florian Fainelli
7453b0dd8e
mtd: do not include error.h
...
We do not use anything from it, and it is not available with all libcs.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 34294
2012-11-21 20:27:02 +00:00
Jonas Gorski
a50d121d8e
linux: export bcm963xx_tag.h to userspace
...
Export bcm963xx_tag.h so mtd can use it without using kernel includes.
Signed-off-by: Catalin Patulea <cat@vv.carleton.ca>
[jonas.gorski@gmail.com: fixup bcm63xx patches, completely remove header
from original location, refresh patches, use a more matching patch
number, port to 3.6]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
SVN-Revision: 34103
2012-11-06 15:21:46 +00:00
Felix Fietkau
c57f66f745
mtd: avoid adding the kernel dir to includes, use the toolchain headers
...
SVN-Revision: 34071
2012-11-04 17:01:30 +00:00
Hamish Guthrie
81a3d9ba31
licensing: Add licensing metadata to many packages Two new variables are introduces to many packages, namely PKG_LICENSE and PKG_LICENSE_FILES - there may be more than one license applied to packages, and these are listed in the PKG_LICENSE variable and separated by spaces. All relevant license files are also added to the PKG_LICENSE_FILES variable, also space separated.
...
The licensing metadata is put into the bin/<platform>/packages/Packages file
for later parsing. A script for that is on it's way!
SVN-Revision: 33861
2012-10-19 15:34:28 +00:00
Gabor Juhos
a67d5fd24f
package/mtd: add option for fixing seama images
...
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 33841
2012-10-18 07:22:59 +00:00
Jonas Gorski
dd81dc48dd
package: mtd: use in-kernel bcm63xx image tag header
...
Use the image tag header from the kernel instead of an external header
file.
SVN-Revision: 33654
2012-10-08 09:59:47 +00:00
Felix Fietkau
5832e754fb
mtd: fix trx_fixup
...
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>
SVN-Revision: 32866
2012-07-25 17:28:32 +00:00
Jo-Philipp Wich
38cb1da868
mtd - remove partition table assumption when writing fis table
...
When mtd alters the fis partition table it assumes that the first partition
table entry also is the first logical parition table entry. For instance our
table could look like this (irrelevant partitions put aside):
* vmlinux.bin.l7 0xA8710000
* rootfs 0xA8030000
Here mtd would assume vmlinux.bin.l7 being the first partition and use its
address to calculate the size and offset which ultimately leads to a broken
partition table.
This patch alters the behavior by checking what partition has the smaller
address to do the calculations based on that address.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
SVN-Revision: 32601
2012-07-04 11:56:25 +00:00
Jo-Philipp Wich
0b83775202
mtd - add partition offset parameter
...
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>
SVN-Revision: 32600
2012-07-04 11:37:53 +00:00
Florian Fainelli
486d54bf05
mtd: define MTDREFRESH if not defined (external kernel)
...
SVN-Revision: 30340
2012-02-06 17:15:40 +00:00
Jo-Philipp Wich
3a794cde8c
mtd: external toolchains usually do not know about MTDREFRESH, so search in $(LINUX_DIR)/include first, fixes compilation with external CodeSourcery toolchain
...
SVN-Revision: 29779
2012-01-18 19:22:14 +00:00
Jonas Gorski
f53128f79b
target: linux: mtd: fix MTDREFRESH to an arbitrary high number
...
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.
SVN-Revision: 28893
2011-11-09 21:16:36 +00:00
Gabor Juhos
091ea63719
package/mtd: don't append jffs2 data multiple times
...
SVN-Revision: 27358
2011-07-02 08:38:00 +00:00
Gabor Juhos
9abe5cf110
package/mtd: make fixtrx available on ar71xx as well
...
SVN-Revision: 24911
2011-01-05 19:27:55 +00:00
Daniel Dickinson
fc3a1d0ba3
Added OpenWRT-specific field to imagetag so that we can record the real root length, so that when the CRC fixup is applied and the root length is recorded as zero we can still calculate the rootfs mtd partition size.
...
Signed-off-by: Daniel Dickinson <daniel@cshore.neomailbox.net>
SVN-Revision: 24838
2010-12-26 04:18:13 +00:00
Daniel Dickinson
b3bcc483b2
mtd: Added trx_fixup for brcm63xx imagetag, and made references to fix_trx use the weak reference rather than the brcm47xx ifdef. This fixes a bug in which sysupgrade failed due to changing bad CRC on reboot.
...
Signed-off-by: Daniel Dickinson <daniel@cshore.neomailbox.net>
SVN-Revision: 24837
2010-12-26 04:18:08 +00:00
Daniel Dickinson
daa854ee2d
mtd: Added fixtrx for brcm63xx imagetag. This allows brcm63xx boards which 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>
SVN-Revision: 24835
2010-12-26 04:18:01 +00:00
Daniel Dickinson
b1362f94bc
mtd: Changed mtd_fixtrx and related functions to be weak references. The weak references only lead to actual functions for brcm47xx
...
Signed-off-by: Daniel Dickinson <daniel@cshore.neomailbox.net>
SVN-Revision: 24833
2010-12-26 04:17:51 +00:00
Jo-Philipp Wich
2c63c1543e
mtd: whitespace cleanup
...
SVN-Revision: 24135
2010-11-24 16:21:25 +00:00
Jo-Philipp Wich
04b604704b
mtd: fix r24132
...
SVN-Revision: 24134
2010-11-24 16:18:34 +00:00
Alexandros C. Couloumbis
f5a54d6601
package/mtd: (enhancement) add option to prevent erase when writing to flash. ( closes #8308 )
...
SVN-Revision: 24132
2010-11-24 14:10:01 +00:00
Gabor Juhos
2a541325d3
package/mtd: write remaining data after adding file to the jffs2 partition
...
SVN-Revision: 22881
2010-09-03 18:14:32 +00:00
Jo-Philipp Wich
2dcfed2eff
mtd: request locked pages when mmap'ing the FIS table, cures random segfaults in table rewrite until http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2d4dc890b5c8fabd818a8586607e6843c4375e62 is added.
...
SVN-Revision: 21823
2010-06-16 23:34:38 +00:00
Gabor Juhos
ebab30b7c7
package/mtd: fix automatic partition size detection in fis_remap
...
SVN-Revision: 20537
2010-03-28 07:16:27 +00:00
Gabor Juhos
37712c70c5
package/mtd: add fixtrx command
...
* patch by Bernhard Loos
* note: trailing whitespaces are removed
SVN-Revision: 20524
2010-03-27 17:38:33 +00:00
Gabor Juhos
6758494897
package/mtd: reuse existing crc32 stuff in the trx code
...
* patch by Bernhard Loos
* note: fixed compiler error on brcm47xx
SVN-Revision: 20523
2010-03-27 17:38:30 +00:00
Felix Fietkau
91dc246123
mtd: fix typo (thx, Plouj)
...
SVN-Revision: 19263
2010-01-21 23:48:52 +00:00
Jo-Philipp Wich
c8e7192064
mtd: treat failure to open FIS partition as fatal when a fis_layout is given, aborts mtd write if reformat is needed and FIS table not available
...
SVN-Revision: 19231
2010-01-19 21:28:22 +00:00
Felix Fietkau
5b02773940
mtd: fix wrong open() return code checks
...
SVN-Revision: 17666
2009-09-21 19:13:34 +00:00
Felix Fietkau
9474d99dc0
mtd: bump release
...
SVN-Revision: 17661
2009-09-21 11:19:08 +00:00
Felix Fietkau
a512be592f
mtd: update copyright headers
...
SVN-Revision: 17660
2009-09-21 10:09:02 +00:00
Felix Fietkau
63c91af404
mtd: add support for rewriting the fis table layout on redboot based systems
...
SVN-Revision: 17659
2009-09-21 09:58:41 +00:00
Andy Boyett
a5f80019ef
bump some revisions and update copyrights
...
SVN-Revision: 17554
2009-09-10 10:07:04 +00:00
Felix Fietkau
40e46b9830
fix jffs2 eof marker search in mtd (patch by Daniel Dickinson)
...
SVN-Revision: 17522
2009-09-05 23:38:51 +00:00
Felix Fietkau
34939cad39
get rid of $Id$ - it has never helped us and it has broken too many patches ;)
...
SVN-Revision: 15242
2009-04-17 14:09:46 +00:00
Felix Fietkau
0d71217695
remove accidentally committed debug message
...
SVN-Revision: 12827
2008-10-02 18:31:26 +00:00
Felix Fietkau
8f567ff728
mtd: fix image check on non-broadcom platforms
...
SVN-Revision: 12825
2008-10-02 18:19:02 +00:00
Felix Fietkau
a38c409d6a
fix some warnings
...
SVN-Revision: 12707
2008-09-25 18:24:53 +00:00
Felix Fietkau
5a0a3cbc00
mtd: improve support for reading input from a pipe. fixes sysupgrade
...
SVN-Revision: 12706
2008-09-25 18:24:18 +00:00
Felix Fietkau
bbd9eb4669
clean up mtd, fix up trx header when integrating jffs2 data on broadcom devices
...
SVN-Revision: 12655
2008-09-23 09:23:58 +00:00
Felix Fietkau
d374e28a2b
mtd: use broadcom specific code on linux 2.6 as well
...
SVN-Revision: 12651
2008-09-22 17:06:03 +00:00
Felix Fietkau
413b45df85
fix mtd target define for brcm-2.4
...
SVN-Revision: 12650
2008-09-22 17:03:06 +00:00
Felix Fietkau
4ac7d33b7a
mtd: add jffs2 cleanmarker for big endian systems
...
SVN-Revision: 12418
2008-08-28 00:15:22 +00:00
Felix Fietkau
753e5b492d
add support for appending a file to jffs2 during reflash on the fly
...
SVN-Revision: 12250
2008-08-08 22:43:19 +00:00
Nicolas Thill
34bb4638e7
move package description to a separate definition, remove it when DESCRIPTION=TITLE
...
SVN-Revision: 8659
2007-09-07 08:34:51 +00:00
Felix Fietkau
1e38527a52
add sysupgrade script for config preserving system upgrades. only implemented for x86-2.6 at the moment, but can be ported to other platforms easily
...
SVN-Revision: 8456
2007-08-21 18:23:57 +00:00
Felix Fietkau
ff917433fb
oops. forgot one file
...
SVN-Revision: 8445
2007-08-20 21:27:29 +00:00
Felix Fietkau
a91350732c
cleanup mtd, implement jffs2write - one step closer to config preserving system upgrades
...
SVN-Revision: 8444
2007-08-20 16:12:24 +00:00
Felix Fietkau
5307d511aa
add 'mtd refresh' command
...
SVN-Revision: 8439
2007-08-19 21:53:44 +00:00
Mike Baker
9a66abf108
Add a "Rebooting ..." message to the mtd util
...
SVN-Revision: 7159
2007-05-10 08:54:37 +00:00