]> www.infradead.org Git - mtd-utils.git/log
mtd-utils.git
17 years agoubi-utils: don't use argp.h
Hamish Moffatt [Wed, 26 Mar 2008 05:17:59 +0000 (16:17 +1100)]
ubi-utils: don't use argp.h

Don't include argp.h as it's glibc-specific, and not used anyway.

Signed-Off-By: Hamish Moffatt <hamish@cloud.net.au>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoFix recv_image compilation with new glibc
David Woodhouse [Sat, 23 Feb 2008 13:28:36 +0000 (22:28 +0900)]
Fix recv_image compilation with new glibc

struct ip_mreq is hidden behind __USE_MISC now

17 years agoubi-utils: fix compilation warnings in eb_chain.c when using gcc 4.2.3
Otavio Salvador [Sat, 23 Feb 2008 13:25:39 +0000 (10:25 -0300)]
ubi-utils: fix compilation warnings in eb_chain.c when using gcc 4.2.3

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years agoubi-utils: fix compilation warnings in unubi_analyze.c when using gcc 4.2.3
Otavio Salvador [Sat, 23 Feb 2008 13:23:29 +0000 (10:23 -0300)]
ubi-utils: fix compilation warnings in unubi_analyze.c when using gcc 4.2.3

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years agoubi-utils: fix compilation warnings in unubi.c when using gcc 4.2.3
Otavio Salvador [Sat, 23 Feb 2008 13:17:51 +0000 (10:17 -0300)]
ubi-utils: fix compilation warnings in unubi.c when using gcc 4.2.3

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
17 years agoubi-utils: pddcustomize fixup update volume
Frank Haverkamp [Fri, 22 Feb 2008 11:37:26 +0000 (13:37 +0200)]
ubi-utils: pddcustomize fixup update volume

Somehow calling ubi_update_start was forgotten and caused the
tool not to write but silently ignore the write.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-utils: Fixup Makefile for new version of the tools
Frank Haverkamp [Thu, 21 Feb 2008 14:00:13 +0000 (16:00 +0200)]
ubi-utils: Fixup Makefile for new version of the tools

Because of defining targets which get never build calling make multiple times
caused regeneration of the code. The fix creates proper .a files which prevent
the rebuild since they exist after build.

Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
17 years agoubi-tools: sanify old and new tools a bit
Artem Bityutskiy [Wed, 20 Feb 2008 16:00:42 +0000 (18:00 +0200)]
ubi-tools: sanify old and new tools a bit

This commit adds compatible options to new ubimkvol, ubirmvol,
and ubiupdatevol and deletes corresponding old utilities.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-nize: fix output messages
Artem Bityutskiy [Tue, 19 Feb 2008 16:07:02 +0000 (18:07 +0200)]
ubi-nize: fix output messages

As reported by one of the users there is a missing white-space
and unknown abbreviation in the output.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoRemove redundant tests
Artem Bityutskiy [Tue, 19 Feb 2008 15:17:44 +0000 (17:17 +0200)]
Remove redundant tests

Sorry for this mess in the history, but I hope this is the
last ugly commit. I accidentally copies the tests from
mtd-utils.git/tests/ubi-tests/ to here. Remove them.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoRevert ubi-tools changes
Artem Bityutskiy [Tue, 19 Feb 2008 12:54:17 +0000 (14:54 +0200)]
Revert ubi-tools changes

Restore ubi tools to their "original" state, which means to
the state they were before I stareted cleaning them up.

Instead, create a "new-utils" subdirectory and move my work
there.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoFix error message printing
Artem Bityutskiy [Sat, 16 Feb 2008 13:06:31 +0000 (15:06 +0200)]
Fix error message printing

Add missing "\n" to get rid of ugliness like:

[dedekind@golum test]$ ubinize -o ubi.img -m 2048 -p 128KiB -s 512 ubinize.cfg
ubinize error: cannot stat "/home/dedekind/git/ubifs.img"
error 2 (No such file or directory)[dedekind@golum test]$

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubinize: bugfix in parsing image size string
Artem Bityutskiy [Sat, 16 Feb 2008 13:03:55 +0000 (15:03 +0200)]
ubinize: bugfix in parsing image size string

This is a copy-paste problem: copied, but forgot to change
the argument.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoAdd load_nandsim.sh script
Artem Bityutskiy [Fri, 8 Feb 2008 10:10:54 +0000 (12:10 +0200)]
Add load_nandsim.sh script

This script makes it easier to load nandsim and emulate a NAND flash
of specified geometry

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-tools: improve printing macros
Artem Bityutskiy [Wed, 6 Feb 2008 16:59:15 +0000 (18:59 +0200)]
ubi-tools: improve printing macros

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubimkvol: slightly amend printing
Artem Bityutskiy [Wed, 6 Feb 2008 14:23:00 +0000 (16:23 +0200)]
ubimkvol: slightly amend printing

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agomtd_debug: support new flags
Artem Bityutskiy [Mon, 4 Feb 2008 15:32:01 +0000 (17:32 +0200)]
mtd_debug: support new flags

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agolibubi: fix sysfs direntries scanning
Artem Bityutskiy [Fri, 1 Feb 2008 10:40:28 +0000 (12:40 +0200)]
libubi: fix sysfs direntries scanning

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-tools: fix ubinize
Adrian Hunter [Thu, 31 Jan 2008 15:21:57 +0000 (17:21 +0200)]
ubi-tools: fix ubinize

ubinize reserves 2 eraseblocks for the volume table at the start of the
output file and then never seeked back to the start of the file.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: use mtd_swab.h
Artem Bityutskiy [Fri, 25 Jan 2008 15:54:50 +0000 (17:54 +0200)]
ubi-utils: use mtd_swab.h

Do not relay on asm/byteorder and use mtd_swab.h instead

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agolibubi: fix comment
Artem Bityutskiy [Fri, 25 Jan 2008 14:50:15 +0000 (16:50 +0200)]
libubi: fix comment

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agolibubi: support atomic LEB change ioctl
Artem Bityutskiy [Fri, 25 Jan 2008 14:43:07 +0000 (16:43 +0200)]
libubi: support atomic LEB change ioctl

And add testing for this feature.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-tests: stylistic amendments
Artem Bityutskiy [Fri, 25 Jan 2008 12:33:58 +0000 (14:33 +0200)]
ubi-tests: stylistic amendments

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-tests: improve io_update
Artem Bityutskiy [Fri, 25 Jan 2008 12:18:41 +0000 (14:18 +0200)]
ubi-tests: improve io_update

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: use macros not hardcoded constants
Artem Bityutskiy [Fri, 25 Jan 2008 09:32:40 +0000 (11:32 +0200)]
ubi-utils: use macros not hardcoded constants

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: remove unneeded include
Artem Bityutskiy [Fri, 25 Jan 2008 09:27:06 +0000 (11:27 +0200)]
ubi-utils: remove unneeded include

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-tools: fix compilation problems
Artem Bityutskiy [Fri, 25 Jan 2008 09:22:00 +0000 (11:22 +0200)]
ubi-tools: fix compilation problems

It appears that older system do not expose __be32 and friends
to userspace, so use uint32_t and friends.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-tools: fix Makefile
Artem Bityutskiy [Fri, 25 Jan 2008 09:04:08 +0000 (11:04 +0200)]
ubi-tools: fix Makefile

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubinize: remove dead code
Artem Bityutskiy [Thu, 24 Jan 2008 11:21:37 +0000 (13:21 +0200)]
ubinize: remove dead code

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubinize: add autoresize flag support
Artem Bityutskiy [Thu, 24 Jan 2008 11:17:24 +0000 (13:17 +0200)]
ubinize: add autoresize flag support

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: check image file size in ubinize
Artem Bityutskiy [Thu, 24 Jan 2008 10:00:02 +0000 (12:00 +0200)]
ubi-utils: check image file size in ubinize

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: add ubinize documentation
Artem Bityutskiy [Thu, 24 Jan 2008 09:52:41 +0000 (11:52 +0200)]
ubi-utils: add ubinize documentation

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: return old tools
Artem Bityutskiy [Wed, 23 Jan 2008 17:42:44 +0000 (19:42 +0200)]
ubi-utils: return old tools

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: remove all old tools
Artem Bityutskiy [Wed, 23 Jan 2008 17:34:52 +0000 (19:34 +0200)]
ubi-utils: remove all old tools

Remove all old tools because I cannot maintain them and the original
authors do not seem to have time for this. Some of the tools do not
work properly, some are just vague and undocumented and seem to be
oriented to the environment of the IBM guys. Nevertheless, I'll
return the tool as is in the next commit, becouse they are still
useful.

This commit also adds a ubinize utility to generate UBI images.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: massive changes
Artem Bityutskiy [Tue, 22 Jan 2008 14:02:52 +0000 (16:02 +0200)]
ubi-utils: massive changes

This commit basically removes most of the old ubi utilities
as they are barely maintainamble.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: save more files
Artem Bityutskiy [Tue, 22 Jan 2008 14:00:54 +0000 (16:00 +0200)]
ubi-utils: save more files

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: save original files in sort-me-out
Artem Bityutskiy [Mon, 21 Jan 2008 09:20:21 +0000 (11:20 +0200)]
ubi-utils: save original files in sort-me-out

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoubi-utils: tweak pfi2ubi
Artem Bityutskiy [Fri, 18 Jan 2008 18:05:00 +0000 (20:05 +0200)]
ubi-utils: tweak pfi2ubi

Make it not depend on pdd and pass flash-related parameters via
command line instead.

Make it look more like the other UBI utilities. It still needs some
more work.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
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>