Commit Graph

60 Commits (c86eeac4352323d5bc988f10b9ec5d9c30f5e80b)

Author SHA1 Message Date
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
12 years ago
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
12 years ago
Felix Fietkau c57f66f745 mtd: avoid adding the kernel dir to includes, use the toolchain headers
SVN-Revision: 34071
12 years ago
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
12 years ago
Gabor Juhos a67d5fd24f package/mtd: add option for fixing seama images
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 33841
12 years ago
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
12 years ago
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
12 years ago
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
12 years ago
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
12 years ago
Florian Fainelli 486d54bf05 mtd: define MTDREFRESH if not defined (external kernel)
SVN-Revision: 30340
13 years ago
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
13 years ago
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
13 years ago
Gabor Juhos 091ea63719 package/mtd: don't append jffs2 data multiple times
SVN-Revision: 27358
13 years ago
Gabor Juhos 9abe5cf110 package/mtd: make fixtrx available on ar71xx as well
SVN-Revision: 24911
14 years ago
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
14 years ago
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
14 years ago
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
14 years ago
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
14 years ago
Jo-Philipp Wich 2c63c1543e mtd: whitespace cleanup
SVN-Revision: 24135
14 years ago
Jo-Philipp Wich 04b604704b mtd: fix r24132
SVN-Revision: 24134
14 years ago
Alexandros C. Couloumbis f5a54d6601 package/mtd: (enhancement) add option to prevent erase when writing to flash. (closes #8308)
SVN-Revision: 24132
14 years ago
Gabor Juhos 2a541325d3 package/mtd: write remaining data after adding file to the jffs2 partition
SVN-Revision: 22881
14 years ago
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
14 years ago
Gabor Juhos ebab30b7c7 package/mtd: fix automatic partition size detection in fis_remap
SVN-Revision: 20537
14 years ago
Gabor Juhos 37712c70c5 package/mtd: add fixtrx command
* patch by Bernhard Loos
 * note: trailing whitespaces are removed

SVN-Revision: 20524
14 years ago
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
14 years ago
Felix Fietkau 91dc246123 mtd: fix typo (thx, Plouj)
SVN-Revision: 19263
15 years ago
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
15 years ago
Felix Fietkau 5b02773940 mtd: fix wrong open() return code checks
SVN-Revision: 17666
15 years ago
Felix Fietkau 9474d99dc0 mtd: bump release
SVN-Revision: 17661
15 years ago
Felix Fietkau a512be592f mtd: update copyright headers
SVN-Revision: 17660
15 years ago
Felix Fietkau 63c91af404 mtd: add support for rewriting the fis table layout on redboot based systems
SVN-Revision: 17659
15 years ago
Andy Boyett a5f80019ef bump some revisions and update copyrights
SVN-Revision: 17554
15 years ago
Felix Fietkau 40e46b9830 fix jffs2 eof marker search in mtd (patch by Daniel Dickinson)
SVN-Revision: 17522
15 years ago
Felix Fietkau 34939cad39 get rid of $Id$ - it has never helped us and it has broken too many patches ;)
SVN-Revision: 15242
15 years ago
Felix Fietkau 0d71217695 remove accidentally committed debug message
SVN-Revision: 12827
16 years ago
Felix Fietkau 8f567ff728 mtd: fix image check on non-broadcom platforms
SVN-Revision: 12825
16 years ago
Felix Fietkau a38c409d6a fix some warnings
SVN-Revision: 12707
16 years ago
Felix Fietkau 5a0a3cbc00 mtd: improve support for reading input from a pipe. fixes sysupgrade
SVN-Revision: 12706
16 years ago
Felix Fietkau bbd9eb4669 clean up mtd, fix up trx header when integrating jffs2 data on broadcom devices
SVN-Revision: 12655
16 years ago
Felix Fietkau d374e28a2b mtd: use broadcom specific code on linux 2.6 as well
SVN-Revision: 12651
16 years ago
Felix Fietkau 413b45df85 fix mtd target define for brcm-2.4
SVN-Revision: 12650
16 years ago
Felix Fietkau 4ac7d33b7a mtd: add jffs2 cleanmarker for big endian systems
SVN-Revision: 12418
16 years ago
Felix Fietkau 753e5b492d add support for appending a file to jffs2 during reflash on the fly
SVN-Revision: 12250
16 years ago
Nicolas Thill 34bb4638e7 move package description to a separate definition, remove it when DESCRIPTION=TITLE
SVN-Revision: 8659
17 years ago
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
17 years ago
Felix Fietkau ff917433fb oops. forgot one file
SVN-Revision: 8445
17 years ago
Felix Fietkau a91350732c cleanup mtd, implement jffs2write - one step closer to config preserving system upgrades
SVN-Revision: 8444
17 years ago
Felix Fietkau 5307d511aa add 'mtd refresh' command
SVN-Revision: 8439
17 years ago
Mike Baker 9a66abf108 Add a "Rebooting ..." message to the mtd util
SVN-Revision: 7159
17 years ago