]> www.infradead.org Git - mtd-utils.git/log
mtd-utils.git
17 years agoubi-utils: save libubigen
Artem Bityutskiy [Fri, 18 Jan 2008 18:03:16 +0000 (20:03 +0200)]
ubi-utils: save libubigen

I'm going to change libubigen so saving the old one in sort-me-out.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: move ecclayouts.h to sort-me-out
Artem Bityutskiy [Fri, 18 Jan 2008 14:53:34 +0000 (16:53 +0200)]
ubi-utils: move ecclayouts.h to sort-me-out

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: move more stuff to sort-me-out
Artem Bityutskiy [Fri, 18 Jan 2008 14:51:29 +0000 (16:51 +0200)]
ubi-utils: move more stuff to sort-me-out

Also remove error messages stuff from pfi2bin

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: move pddcustomize to sort-me-out
Artem Bityutskiy [Fri, 18 Jan 2008 14:28:32 +0000 (16:28 +0200)]
ubi-utils: move pddcustomize to sort-me-out

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: move pfiflash to sort-me-out
Artem Bityutskiy [Fri, 18 Jan 2008 14:24:07 +0000 (16:24 +0200)]
ubi-utils: move pfiflash to sort-me-out

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: move mkbootenv to sort-me-out
Artem Bityutskiy [Fri, 18 Jan 2008 14:05:46 +0000 (16:05 +0200)]
ubi-utils: move mkbootenv to sort-me-out

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: create control device node as well
Artem Bityutskiy [Fri, 18 Jan 2008 12:34:14 +0000 (14:34 +0200)]
ubi-utils: create control device node as well

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: move various stuff to sort-me-out
Artem Bityutskiy [Fri, 18 Jan 2008 12:01:04 +0000 (14:01 +0200)]
ubi-utils: move various stuff to sort-me-out

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: tweak mkpfi
Artem Bityutskiy [Fri, 18 Jan 2008 11:33:27 +0000 (13:33 +0200)]
ubi-utils: tweak mkpfi

17 years agoubi-tools: move ubigen to sort-me-out
Artem Bityutskiy [Fri, 18 Jan 2008 11:32:43 +0000 (13:32 +0200)]
ubi-tools: move ubigen to sort-me-out

This tool is not really needed and is unused.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: tweak ubigen
Artem Bityutskiy [Fri, 18 Jan 2008 09:45:36 +0000 (11:45 +0200)]
ubi-utils: tweak ubigen

Make ubigen consistent with other UBI utilities

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: minor amendments
Artem Bityutskiy [Fri, 18 Jan 2008 09:43:45 +0000 (11:43 +0200)]
ubi-utils: minor amendments

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: update headers
Artem Bityutskiy [Thu, 17 Jan 2008 10:21:40 +0000 (12:21 +0200)]
ubi-utils: update headers

Update UBI headers which requires some renameing changes.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agotests: move jittertest to tests directory
Artem Bityutskiy [Wed, 16 Jan 2008 15:38:44 +0000 (17:38 +0200)]
tests: move jittertest to tests directory

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agotests: move checkfs test to tests directory
Artem Bityutskiy [Wed, 16 Jan 2008 15:35:41 +0000 (17:35 +0200)]
tests: move checkfs test to tests directory

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: fix bytes output
Artem Bityutskiy [Wed, 16 Jan 2008 14:52:45 +0000 (16:52 +0200)]
ubi-utils: fix bytes output

Fix incorrect output of ubinfo like
"Amount of available logical eraseblocks: 00 bytes)"
which should look like
"Amount of available logical eraseblocks: 0 (0 bytes)"

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: fix spelling typo in help output
Artem Bityutskiy [Wed, 16 Jan 2008 14:09:51 +0000 (16:09 +0200)]
ubi-utils: fix spelling typo in help output

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: libubi.a was always regenerated due to bug in Makefile
Frank Haverkamp [Mon, 7 Jan 2008 13:05:00 +0000 (14:05 +0100)]
ubi-utils: libubi.a was always regenerated due to bug in Makefile

The Makefile defined a target which was never produced. So libubi.a was
regenerated regardless any dependencies.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: Remove obsolete code/data
Frank Haverkamp [Mon, 7 Jan 2008 13:05:00 +0000 (14:05 +0100)]
ubi-utils: Remove obsolete code/data

Artem figured out that certain stuff is obsolete. He also sugested that we
move the code from the perl directory into the scripts directory to reduce
the number of directories.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: bin2nand, nand2bin add support of different ecc layouts
Frank Haverkamp [Mon, 7 Jan 2008 13:05:00 +0000 (14:05 +0100)]
ubi-utils: bin2nand, nand2bin add support of different ecc layouts

Both tools were lacking support of alternate ECC layouts. Only our intitial
format was supported. With this change, it should be very easy to add more
layouts in addtion to the already supported ones, which are: IBM (our format),
and the MTD default layout. NAND OOB sizes of 512 and 2048 are currently
supported.

In contrast to the old version of bin2nand, the holes inbetween the ECC data
is now not filled with 0x00 anymore but instead 0xff (like deleted flash) is
used. This should not cause any difference. The testcase reflects the different
layouts too.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: fix bug using readdir
Adrian Hunter [Mon, 7 Jan 2008 07:49:25 +0000 (09:49 +0200)]
ubi-utils: fix bug using readdir

Library functions never reset errno to zero, so if you want
to use its value to check for errors then you must set it to zero
before calling the library function (in this case readdir).

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: add ubiattach and ubidetach
Artem Bityutskiy [Wed, 26 Dec 2007 13:12:26 +0000 (15:12 +0200)]
ubi-utils: add ubiattach and ubidetach

Add 2 new utilities to attach and detach UBI devices.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: move doc to sort-me-out
Artem Bityutskiy [Sun, 23 Dec 2007 21:01:19 +0000 (23:01 +0200)]
ubi-utils: move doc to sort-me-out

It is broken and have to be fixed

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: few mor fixes and cleanups
Artem Bityutskiy [Sun, 23 Dec 2007 20:56:49 +0000 (22:56 +0200)]
ubi-utils: few mor fixes and cleanups

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: cleanup ubicrc32
Artem Bityutskiy [Sun, 23 Dec 2007 19:38:47 +0000 (21:38 +0200)]
ubi-utils: cleanup ubicrc32

Just few cleanups to make it consistent with other utilites.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: move ubi_jffs2_test.sh to better place
Artem Bityutskiy [Sun, 23 Dec 2007 18:31:23 +0000 (20:31 +0200)]
ubi-utils: move ubi_jffs2_test.sh to better place

... to tests/ubi-tests/

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: move jffs2_test.sh
Artem Bityutskiy [Sun, 23 Dec 2007 16:36:47 +0000 (18:36 +0200)]
ubi-utils: move jffs2_test.sh

Move this piece of code to sort-me-out/. See README.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-tests: update to recent libubi changes
Artem Bityutskiy [Sun, 23 Dec 2007 16:32:09 +0000 (18:32 +0200)]
ubi-tests: update to recent libubi changes

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: be backward-compatible
Artem Bityutskiy [Sun, 23 Dec 2007 12:14:54 +0000 (14:14 +0200)]
ubi-utils: be backward-compatible

Since control device is not supported by UBI in mainline kernels,
we should not panic if it is absent.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: some renames
Artem Bityutskiy [Sat, 22 Dec 2007 16:02:43 +0000 (18:02 +0200)]
ubi-utils: some renames

Since there is often confusion what "eb" is - physical or logical
eraseblock. Fix libubi and change "eb" to "leb".

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: add ubiupdate
Artem Bityutskiy [Sat, 22 Dec 2007 15:47:22 +0000 (17:47 +0200)]
ubi-utils: add ubiupdate

Add an 'ubiupdate' utility which is basically a changed and cleaned-up
version of ubiupdatevol. It is also consistent with other ubi tools.

ubiupdatevol should go away, because it has features which should not
be present in tools for end users. If one needs debugging capabilities,
he should create a separate program.

So, I do not delete ubiupdatevol, but it will be moved somwthere later.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: fixes and cleanups
Artem Bityutskiy [Sat, 22 Dec 2007 15:32:19 +0000 (17:32 +0200)]
ubi-utils: fixes and cleanups

This patch fixes a libubi bug and does some random minor cleanups.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: introduce ubinfo utility
Artem Bityutskiy [Sat, 22 Dec 2007 13:43:19 +0000 (15:43 +0200)]
ubi-utils: introduce ubinfo utility

Add new handy UBI utility which prints various type of UBI information.

This commit also includes a lot of fixes and cleanups in libubi, and
other utilities. It was quite complex to separate this all out and
I figured that nobody anyway would really need this, and decided to
save my time for more useful things.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-tools: fix and cleanup ubirmvol
Artem Bityutskiy [Thu, 20 Dec 2007 20:43:58 +0000 (22:43 +0200)]
ubi-tools: fix and cleanup ubirmvol

Plus some more ubimkvol clean-ups

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: add -S option to ubimkvol
Artem Bityutskiy [Thu, 20 Dec 2007 18:48:06 +0000 (20:48 +0200)]
ubi-utils: add -S option to ubimkvol

Plus some additional clean-ups.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: clean-up and fix ubimkvol
Artem Bityutskiy [Thu, 20 Dec 2007 18:21:02 +0000 (20:21 +0200)]
ubi-utils: clean-up and fix ubimkvol

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agomkfs.jffs2: Set mkfs.jffs2 page size runtime instead of fixed
Ricard Wanderlof [Thu, 20 Dec 2007 11:46:38 +0000 (22:46 +1100)]
mkfs.jffs2: Set mkfs.jffs2 page size runtime instead of fixed

This patch reads the default PAGE_SIZE from sysconf(), i.e. the system
mkfs.jffs2 is running on, instead of just setting it to 4096 (which of
course is valid for most systems but not all).

This is useful if mkfs.jffs2 is running on the target system, e.g. to
create a backup image during firmware upgrade, so that the page size does
not have to be set explicitly using a command line parameter.

The --pagesize option is supported just as before.

If the user has not set the page size explicitly with --pagesize, and
the system page size is anything other than 4096, warn the user that
an unusual page size is being used, since this behavior is different
from before.

Signed-off-by Ricard Wanderlöf <ricardw@axis.com> .
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
17 years agoubi-utils: move UBI tests to tests/ubi-tests/
Artem Bityutskiy [Thu, 20 Dec 2007 15:34:55 +0000 (17:34 +0200)]
ubi-utils: move UBI tests to tests/ubi-tests/

Clean-up ubi-utils a little by moving tests to a proper place.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: add one more UBI test
Artem Bityutskiy [Thu, 20 Dec 2007 15:28:32 +0000 (17:28 +0200)]
ubi-utils: add one more UBI test

Add rmvol test

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: add udevsettle hack
Artem Bityutskiy [Mon, 17 Dec 2007 11:29:40 +0000 (13:29 +0200)]
ubi-utils: add udevsettle hack

Add udevsettle call to libubi which is not compiled in by default.
We need this for UBI testing.

Also, add one more TODO note

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: clean-up UBI tests
Artem Bityutskiy [Sat, 15 Dec 2007 17:06:25 +0000 (19:06 +0200)]
ubi-utils: clean-up UBI tests

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: add more TODOs
Artem Bityutskiy [Sat, 15 Dec 2007 16:51:55 +0000 (18:51 +0200)]
ubi-utils: add more TODOs

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: add a TODO
Artem Bityutskiy [Sat, 15 Dec 2007 16:45:30 +0000 (18:45 +0200)]
ubi-utils: add a TODO

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: clean-up text files
Artem Bityutskiy [Sat, 15 Dec 2007 16:43:15 +0000 (18:43 +0200)]
ubi-utils: clean-up text files

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: remove unused directory
Artem Bityutskiy [Sat, 15 Dec 2007 16:36:02 +0000 (18:36 +0200)]
ubi-utils: remove unused directory

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: remove rubbish
Artem Bityutskiy [Sat, 15 Dec 2007 16:26:25 +0000 (18:26 +0200)]
ubi-utils: remove rubbish

This file makes zero sense nowadays.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agomkfs.jffs2.c: use rbtrees for hardlink tracking
David Woodhouse [Sat, 15 Dec 2007 03:02:05 +0000 (22:02 -0500)]
mkfs.jffs2.c: use rbtrees for hardlink tracking

I just couldn't live with myself.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agomkfs.jffs2.c: detect hardlinks
David Woodhouse [Sat, 15 Dec 2007 00:33:35 +0000 (19:33 -0500)]
mkfs.jffs2.c: detect hardlinks

... with the stupidest possible algorithm for storing them and looking
them up. Optimising that is simple enough, but left as an exercise for
the user. This is userspace, after all. It's not as if I care.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agomkfs.jffs2: use separate ino field in struct filesystem_entry for jffs2 ino#
David Woodhouse [Fri, 14 Dec 2007 23:58:47 +0000 (18:58 -0500)]
mkfs.jffs2: use separate ino field in struct filesystem_entry for jffs2 ino#

...because when we support hard links we'll want to preserve the
original inode numbers...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoRemove mkfs.jffs from the makefile targets.
Josh Boyer [Mon, 26 Nov 2007 14:16:42 +0000 (08:16 -0600)]
Remove mkfs.jffs from the makefile targets.

Signed-off-by: Josh Boyer <jwboyer@gmail.com>
17 years agoRemove mkfs.jffs utility. The filesystem support was removed in the kernel
Josh Boyer [Mon, 26 Nov 2007 14:12:37 +0000 (08:12 -0600)]
Remove mkfs.jffs utility.  The filesystem support was removed in the kernel
in 2.6.21.

Signed-off-by: Josh Boyer <jwboyer@gmail.com>
17 years agoubi-utils: nand2bin had ECC calculation problems
Frank Haverkamp [Sat, 24 Nov 2007 10:04:51 +0000 (11:04 +0100)]
ubi-utils: nand2bin had ECC calculation problems

Fixed a problem when ECC was checked. The correction was not properly
done by subpage. Added more output for the moment to be able to figure
out more potential problems.

Added testcase: bin2nand2bin.sh and biterror inject program inject_biterror.pl

Interface
  o ECC correction disabled by default. Switch to turn it
    explicitly on. The user must specify what he wants to be done.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: unubi add physical erase block number for analysis
Frank Haverkamp [Sat, 24 Nov 2007 10:04:51 +0000 (11:04 +0100)]
ubi-utils: unubi add physical erase block number for analysis

The number is usefull to analyze cards with broken flash content.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: various fixes in unubi
Frank Haverkamp [Sat, 24 Nov 2007 10:04:51 +0000 (11:04 +0100)]
ubi-utils: various fixes in unubi

The extraction of data from blocks used for dynamic volumes was
totally broken. The data size was calculated wrong. This fix is not
perfect, the alignment is still ignored.

The parameter "header-size" is very misleading. It does not reflect
the vid hdr offset properly. I assume therefor that it only works for
the layout I am using where the vid hdr is at the _end_ of the 1st
NAND page (2048).

I added the generation of a textfile with information about the blocks
which are going into the internal graph representation.

Instead of a graph I think that a simple array will simplify the code
very much. The array must than be sorted properly to cope with older
and newer block-copies but that should not be a problem.

discussed the tool with my coleage Andreas Arnez and we found that it
might be a good idea to replace it even with a perl program for the
same purpose since that would offer the flexibility to change it on
the fly when needed. The tool is mainly used for crash analysis so it
could be an advantage to change it without needing a C-compiler.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: Test-case for unubi
Frank Haverkamp [Sat, 24 Nov 2007 10:04:50 +0000 (11:04 +0100)]
ubi-utils: Test-case for unubi

We have no good testcases for this kind of tool yet. Adding a 1st
draft.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: Update and bugfix unubi
Frank Haverkamp [Sat, 24 Nov 2007 10:04:50 +0000 (11:04 +0100)]
ubi-utils: Update and bugfix unubi

Drake Dawsett had done some changes to our unubi which where not yet
published. I hereby send his latest code and integrated the parameter
handling which was changed in our version. When reviewing this very
huge patch we need to ensure that possible changes of others are not
reversed.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: migrate to new libubi
Alexander Schmidt [Wed, 3 Oct 2007 07:41:25 +0000 (10:41 +0300)]
ubi-utils: migrate to new libubi

This patchset migrates the remaining tools (pddcustomize, ubimirror and
pfiflash) to the new libubi.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: Nand2bin add more information when bad blocks occur
Frank Haverkamp [Wed, 26 Sep 2007 11:40:10 +0000 (13:40 +0200)]
ubi-utils: Nand2bin add more information when bad blocks occur

When bad blocks occur more debug information is needed.
To identify the bad blocks the blocksize is required.
The split block mode was added to generate files per
block. In split mode the bad block markers are analyzed
and a summary is printed at the end.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: Fixup oob data generation
Frank Haverkamp [Wed, 26 Sep 2007 11:40:10 +0000 (13:40 +0200)]
ubi-utils: Fixup oob data generation

The filename for the OOB data was wrongly assigned.
OOB data could therefore not be dumped.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agofs-tests: fix bug in simple test_2
Adrian Hunter [Fri, 14 Sep 2007 15:00:19 +0000 (18:00 +0300)]
fs-tests: fix bug in simple test_2

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoAdd test program orph.c
Adrian Hunter [Fri, 20 Jul 2007 08:31:18 +0000 (11:31 +0300)]
Add test program orph.c

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoImprove option handling in nandtest, add markbad and offset/length options.
David Woodhouse [Tue, 11 Sep 2007 09:48:43 +0000 (11:48 +0200)]
Improve option handling in nandtest, add markbad and offset/length options.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoUpdate usage information for serve_image
David Woodhouse [Fri, 31 Aug 2007 23:58:41 +0000 (00:58 +0100)]
Update usage information for serve_image

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoubi-utils: remove useless build information
Artem Bityutskiy [Wed, 29 Aug 2007 16:03:56 +0000 (19:03 +0300)]
ubi-utils: remove useless build information

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: get rid of compile warnings
Artem Bityutskiy [Wed, 29 Aug 2007 15:51:07 +0000 (18:51 +0300)]
ubi-utils: get rid of compile warnings

Just silly hacks. Also remove udevsettle() invocation from UBI
library. If it must be called, it is not library's business
anyway. Wa added it to make scripts which use ubimkvol utility
run, so it is the only caller that really needs this. So
just move the cruft to the utility.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: add utils to make install
Artem Bityutskiy [Wed, 29 Aug 2007 15:06:45 +0000 (18:06 +0300)]
ubi-utils: add utils to make install

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: build utils from top dir
Artem Bityutskiy [Wed, 29 Aug 2007 14:28:08 +0000 (17:28 +0300)]
ubi-utils: build utils from top dir

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: do not interfer with system namespace
Artem Bityutskiy [Wed, 29 Aug 2007 13:01:26 +0000 (16:01 +0300)]
ubi-utils: do not interfer with system namespace

Rename __unused to ubi_unused to avoid clashes with system namespace

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoMake optflags easier for distros to override
David Woodhouse [Wed, 29 Aug 2007 10:59:47 +0000 (11:59 +0100)]
Make optflags easier for distros to override

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoImprove up recv_image error handling
David Woodhouse [Fri, 17 Aug 2007 08:26:36 +0000 (16:26 +0800)]
Improve up recv_image error handling

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoMake redundancy amount easier to change in serve_image
David Woodhouse [Wed, 15 Aug 2007 09:37:02 +0000 (17:37 +0800)]
Make redundancy amount easier to change in serve_image

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoImprove stats and output in recv_image
David Woodhouse [Wed, 15 Aug 2007 09:14:04 +0000 (17:14 +0800)]
Improve stats and output in recv_image

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoDouble packet size for multicast images
David Woodhouse [Wed, 15 Aug 2007 08:46:55 +0000 (16:46 +0800)]
Double packet size for multicast images

This halves the FEC decode time and doesn't seem to hurt the error rate
much.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoMore timing measurements
David Woodhouse [Wed, 15 Aug 2007 03:00:41 +0000 (11:00 +0800)]
More timing measurements

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoSwitch multicast distribution system to round-robin mode
David Woodhouse [Tue, 14 Aug 2007 14:54:49 +0000 (22:54 +0800)]
Switch multicast distribution system to round-robin mode

Send one packet from each eraseblock in turn, rather than all packets
for one eraseblock together. This means that bursts of loss are evenly
spread between blocks. It also makes the client side a bit more complex
if you can't assume that there's anywhere except the flash to store its
intermediate data.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoRearrange serve_image.c to allow for easily sending one packet per block
David Woodhouse [Tue, 14 Aug 2007 07:04:00 +0000 (15:04 +0800)]
Rearrange serve_image.c to allow for easily sending one packet per block
in round-robin fashion rather than full blocks one at a time.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoMerge branch 'master' of git+ssh://git.infradead.org/srv/git/mtd-utils
David Woodhouse [Tue, 14 Aug 2007 01:55:04 +0000 (09:55 +0800)]
Merge branch 'master' of git+ssh://git.infradead.org/srv/git/mtd-utils

17 years agoImport FEC code from Luigi Rizzo's RMDP
David Woodhouse [Mon, 13 Aug 2007 16:50:39 +0000 (00:50 +0800)]
Import FEC code from Luigi Rizzo's RMDP

Paper: http://info.iet.unipi.it/~luigi/mccr6.ps.gz
Code:  http://info.iet.unipi.it/~luigi/rmdp980703.tgz

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoubi-utils: add -m option to ubimkvol
Zoltan Sogor [Fri, 10 Aug 2007 09:37:56 +0000 (11:37 +0200)]
ubi-utils: add -m option to ubimkvol

Creates the volume with maximum available size

Signed-off-by: Zoltan Sogor <weth@inf.u-szeged.hu>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoFix timing calculations for serve_image
David Woodhouse [Sat, 11 Aug 2007 14:40:38 +0000 (22:40 +0800)]
Fix timing calculations for serve_image

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoMark blocks bad on failed write; don't abort.
David Woodhouse [Fri, 10 Aug 2007 09:22:53 +0000 (17:22 +0800)]
Mark blocks bad on failed write; don't abort.

17 years agoFine-tine the TX timing for serve_image.
David Woodhouse [Fri, 10 Aug 2007 06:40:01 +0000 (14:40 +0800)]
Fine-tine the TX timing for serve_image.

It just busy-waits until it's time to send the next packet now. Which
sucks, but gives us good timing for debugging. Needs work (and actually
if we have hrtimers we probably _can_ sleep and still have proper
timing).

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoFix repeated warning about ECC correction, in nandtest
David Woodhouse [Thu, 9 Aug 2007 15:25:04 +0000 (23:25 +0800)]
Fix repeated warning about ECC correction, in nandtest

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoChange multicast protocol to allow for a resending flag
David Woodhouse [Thu, 9 Aug 2007 13:44:16 +0000 (21:44 +0800)]
Change multicast protocol to allow for a resending flag

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoAdd utilities for multicast send/receive of MTD images.
David Woodhouse [Thu, 9 Aug 2007 08:23:56 +0000 (16:23 +0800)]
Add utilities for multicast send/receive of MTD images.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoAdd nand integrity testing utility.
David Woodhouse [Thu, 9 Aug 2007 08:23:19 +0000 (16:23 +0800)]
Add nand integrity testing utility.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoCopy with write errors in nandwrite, add 'markbad' option too.
David Woodhouse [Mon, 6 Aug 2007 08:13:30 +0000 (16:13 +0800)]
Copy with write errors in nandwrite, add 'markbad' option too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoIncrement mkfs.jffs2 version number v1.1.0
Josh Boyer [Fri, 3 Aug 2007 13:55:51 +0000 (08:55 -0500)]
Increment mkfs.jffs2 version number

Several change have gone into mkfs.jffs2 since we switch from CVS, but the
version number never got incremented.  Bump the version number up so people
can distinguish between older and newer versions.

Signed-off-by: Josh Boyer <jwboyer@gmail.com>
17 years agoRemove $Id:$ tags
Josh Boyer [Fri, 3 Aug 2007 13:49:10 +0000 (08:49 -0500)]
Remove $Id:$ tags

The $Id:$ tags are left over from the old CVS repository.  Several files have
since been changed, and they generally have little value in a git repo so they
should be removed.

Signed-off-by: Josh Boyer <jwboyer@gmail.com>
17 years agoDisable LZO compression by default
Josh Boyer [Fri, 3 Aug 2007 13:34:38 +0000 (08:34 -0500)]
Disable LZO compression by default

When the recent LZO compression support went into mtd-utils recently,
it was enabled by default.  This means that mkfs.jffs2 will default to
creating images with lzo compression as the default.

Older kernels cannot decompress such images, so lzo should be disabled
by default.  The patch below fixes this.  To enable lzo compression
from now on, simply pass '-X lzo' as an option to mkfs.jffs2.

Signed-off-by: Josh Boyer <jwboyer@gmail.com>
18 years agoUse lzo2 libraries
Josh Boyer [Mon, 23 Jul 2007 14:15:29 +0000 (09:15 -0500)]
Use lzo2 libraries

Switch to using the more common lzo2 libraries for LZO compression.  They
should still work with the lzo1x interfaces.

Signed-off-by: Josh Boyer <jwboyer@gmail.com>
18 years agoAdd favourlzo compression mode
Richard Purdie [Tue, 10 Jul 2007 15:03:47 +0000 (16:03 +0100)]
Add favourlzo compression mode

Add a favourlzo compression mode to mtd-utils

This allows lzo compression to be used in the cases where the
compression ratio isn't quite as good zlib. This can make sense in
certain use cases because LZO decompression is much faster than zlib.

Signed-off-by: Richard Purdie <rpurdie@openedhand.com>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
18 years agoAdd lzo support to mtd-utils
Richard Purdie [Tue, 10 Jul 2007 15:03:31 +0000 (16:03 +0100)]
Add lzo support to mtd-utils

Add LZO support to mtd-utils to generate LZO compressed jffs2 images

Unlike the kernel version, the standard lzo userspace library is used
along with lzo1x_999_compress rather than the lzo1x_1_compress version
since better compression ratios can be obtained (at no significant cost
to decompression time).

Signed-off-by: Richard Purdie <rpurdie@openedhand.com>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
18 years agoAdd more information to integrity test error message
Adrian Hunter [Wed, 18 Jul 2007 08:50:53 +0000 (11:50 +0300)]
Add more information to integrity test error message

When the integrity test encounters a file that does not contain
the expected data, it lists the data that it expected to find
in terms of writes to the file.

Now the test also displays a list of "raw" writes that includes
writes that have been truncated away, or completely overwritten
by other writes.

The test also now displays the pid because it is used as the
initial random seed.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
18 years agoCorrect integrity test calculations of free space
Adrian Hunter [Wed, 18 Jul 2007 08:45:08 +0000 (11:45 +0300)]
Correct integrity test calculations of free space

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
18 years agoAmend tests not to insist that file system type is JFFS2
Adrian Hunter [Wed, 18 Jul 2007 08:41:51 +0000 (11:41 +0300)]
Amend tests not to insist that file system type is JFFS2

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
18 years agoUBI-utils: add compare feature
Alexander Schmidt [Tue, 10 Jul 2007 15:53:54 +0000 (17:53 +0200)]
UBI-utils: add compare feature

This is a new feature for pfiflash, called "--compare". It allows the user
to simulate a pfiflash session without actually changing the flash
content. If the flash content is equal to the data in the pfif file,
pfiflash returns zero. A positive value is returned when the flash
content differs from the pfi file, which indicates that an update is
necessary. This feature is useful when a controller mounts an NFS share
during boot and has to determine if a pfi file stored on this share
contains a code update. Modified PDD values are also registered by the
compare feature.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
18 years agoUBI-Utils: ubimirror discards returncode
Alexander Schmidt [Fri, 29 Jun 2007 10:46:11 +0000 (12:46 +0200)]
UBI-Utils: ubimirror discards returncode

Ubimirror compares volumes before they are mirrored, but discards the
result of the comparison and alway copies volumes.

I've tested this code with equal and unequal volumes and it seems to work
fine now.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
18 years agoUBI-Utils: Cleanup of libubimirror
Alexander Schmidt [Thu, 28 Jun 2007 16:49:32 +0000 (18:49 +0200)]
UBI-Utils: Cleanup of libubimirror

libubimirror has several odd intendations and spacing errors.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
18 years agoUBI: fix tests
Artem Bityutskiy [Mon, 18 Jun 2007 13:35:23 +0000 (16:35 +0300)]
UBI: fix tests

This patch fixes UBI tests and adds udev problems solution description.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>