aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-11-21ubi-utils: fix CFLAGS handling wrt cross compilationNicolas Pitre
Let's have the "new ubi-utils" makefile handle CFLAGS like the other makefiles. This is important when cross compiling and CFLAGS is externally provided. Without this, local include files are not found due to the various -I arguments which are then lost. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-11-21flash_eraseall reports incorrect percentageLadislav Michl
Fix flash_eraseall percentage reporting: # flash_eraseall /dev/mtd4 Erasing 128 Kibyte @ 2800000 -- 100 % complete. flash_eraseall * fix percentage reporting * exit()ing from main() is overkill, just return Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-11-06ubinize: correct subpage_size print and initialise vol_info to zeroAdrian Hunter
J. Scott Merritt wrote: > Dear list, > > I believe that I have stumbled upon two problems with the latest version > of ubinize.c in mtd-utils - one serious, and one not so serious. > > - First, the easy one: At line 457, I believe that we should be printing > args.subpage_size rather than ui.min_io_size. > > - More seriously, I believe that the "flags" field in the ubigen_vol_info > structures is not being properly initialized. Line 494 allocates memory > for these structures with malloc, so they are not cleared to zero. The > read_section function updates the flag field if the AUTO-RESIZE flag is > specified, but does not otherwise initialize or clear it. > > I reckon the latter problem could be repaired either with calloc, or by > modifying read_section to more directly set/clear the flag. > > Thanks, Scott. Reported-by: J. Scott Merritt <merrij3@rpi.edu> Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-10-23mkfs.ubifs: make program version 1.1.Artem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-10-22Fix favor LZO implementationArtem Bityutskiy
Use c->favor_percent, not c->favor_lzo. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-10-22Implement favor LZO methodArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-10-22Introduce favor_lzo compressor optionsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-10-22Make "c" globalArtem Bityutskiy
We need to have access to "c" from various files. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-10-22Define the worst case compression constantArtem Bityutskiy
It will be used in the next patches. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-10-22UBIFS: rename crc32 functionArtem Bityutskiy
Zlib headers also declare crc32 symbol and it confilicts with our crc32 fuction. So rename it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-10-08[PATCH] [MTD] mtd-utils: fec.c: bzero->memset, bcopy->memcpy, bcmp->memcmpMitch Davis
This patch alters fec.c so it does not use the deprecated bzero, bcopy and bcmp functions. This can help on platforms that do not have these functions. Signed-off-by: Mitch Davis <mitch.davis@symstream.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-24ubinize: allow an absent 'image' in the ubinize configuration.Richard Titmuss
Some recent changes to ubinize prevent the 'image' parameter from being absent in the configuration file. The following patch fixes that. Signed-off-by: Richard Titmuss <richard.titmuss@logitech.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-08nanddump: Add Support for Quiet OptionGrant Erickson
Added support for the '-q,--quiet' option to suppress diagnostic output. Made the new option mutually-exclusive with the pretty print option. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nanddump: Clean-up Usage OutputGrant Erickson
Realign help usage output to make it more explict when a description needs to be wrapped. Use sentence case for the help usage output option short descriptions. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nanddump: Use Boolean Mnemonics from stdbool.hGrant Erickson
Added include directive for stdbool.h and leveraged where appropriate to improve code readability by making variable intent and usage more explicit. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nanddump: Pass Real Names as Arguments to perrorGrant Erickson
Pass the MTD device node and dump file name as arguments to perror rather than more ambigous, static messages on open failures. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nanddump: Utilize Standard Exit MnemonicsGrant Erickson
Replace main exit and return status codes with equivalent mnemonics. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nanddump: Qualifier Clean-upGrant Erickson
Static-qualified all globals except 'main' because they have no use beyond file scope. Constant-qualified MTD device and input positional parameter globals. Constant-qualified argv array. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nandwrite: Add Support for Reading from Standard InputGrant Erickson
Added suppport for reading in band data from standard input based on a patch originally generated by Richard Titmuss <titmuss@slimdevices.com> at <http://lists.slimdevices.com/pipermail/jive-checkins/2008-May/001918.html>. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nandwrite: Clean-up Usage OutputGrant Erickson
Realign help usage output to make it more explict when a description needs to be wrapped. Use sentence case for the help usage output option short descriptions. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nandwrite: Use Boolean Mnemonics from stdbool.hGrant Erickson
Added include directive for stdbool.h and leveraged where appropriate to improve code readability by making variable intent and usage more explicit. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nandwrite: Pass Real Names as Arguments to perrorGrant Erickson
Pass the MTD device node and input file name as arguments to perror rather than more ambigous, static messages on open failures. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nandwrite: Utilize Standard Exit MnemonicsGrant Erickson
Replace main exit and return status codes with equivalent mnemonics. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08nandwrite: Qualifier Clean-upGrant Erickson
Static-qualified all globals except 'main' because they have no use beyond file scope. Constant-qualified MTD device and input positional parameter globals. Constant-qualified argv array. Signed-off-by: Grant Erickson <gerickson@nuovations.com> Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2008-09-08fs-tests: also preserve mount options when mounting againAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-07mkfs.ubifs: amend help printArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-07mkfs.ubifs: update ubifs-media.hArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-05ubiupdatevol: remove non-existing option from help messageArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-05mkfs.ubifs: check max_leb_countArtem Bityutskiy
Complain and exit if max. count of LEBs was not specified. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-03ubirmvol: learn to remove volume by nameArtem Bityutskiy
Add -N option to ubirmvol to support deleting volumes by name. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-02ubi-utils: minor renameArtem Bityutskiy
We use term "volume ID", not "volume number". So change few vol_num variables to vol_id to be consistent. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-02ubimkvol: check for free LEBsArtem Bityutskiy
Check for free LEBs before trying to create a volume. This fixes the following issue: $ ubimkvol /dev/ubi0 -n 0 -N test_fs -m ubimkvol: error!: cannot UBI create volume error 22 (Invalid argument) Error: cannot create UBI volume "Invalid argument" ? Not understandable. But the thing is that -m makes ubimkvol use available space, which is zero, then it passes zero to the ioctl, which fails in request validation code, because 0 invalid volume size. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-09-02ubiattach: minor help text fixArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-26ubi-utils: added missing linefeed in 'ubinfo'Enrico Scholz
Trivial patch to add a missing linefeed in static volume info: | Data bytes: 113112 bytes (110.5 KiB)State: OK Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-26ubi-utils: allow 'ubiformat' to read from stdinEnrico Scholz
This patch allows to read the image from stdin and adds an '--image-size' option to specify its size. 'upiupdatevol' has this feature already and it is useful for 'ubiformat' too. It adds a read_all() function which reads a block of data. Plain 'read(2)' can fail on nc -l -p 1234 | ubiformat -f - -S 25427968 else. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-26ubi-utils: fixed and enhanced '--flash-image' optionEnrico Scholz
The '--flash-image' option of 'ubiformat' requires an argument and '.has_arg' must not be 0 hence. The patch adds this option to the commandline synopsis too. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-25ubi-utils: use 'stat(2)' instead of 'lstat(2)'Enrico Scholz
The UBI tools refuse to work with symlinks like '/dev/ubi/bootloader -> ../ubi0_2' because they use 'lstat(2)' and get information about the symlink but not about the device. This is unwanted and fixed by this patch. This patch renames 'struct stat stat' variables to 'st' to avoid compilation errors. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-21mtd-utils: add support for 4k pages.Thomas Gleixner
Add support for 4K pages in nanddump & nandwrite. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-21mkfs.ubifs: remove debugging leftovers from MakefileArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-21use $(MAKE) rather than makeMike Frysinger
If you execute straight `make`, this prevents the active make env from being passed on to sub children. This prevents parallel building as well as build flag passing. I also dropped the recursive make in ubi-utils/Makefile for the all target as this causes problems when building in parallel. All of the targets that we actually care about are handled by the $(NTARGETS) target anyways. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-21mkfs.ubifs: set CFLAGS/LDLIBS properlyMike Frysinger
CFLAGS should only be set as a default instead of overriding the user's choices. LDLIBS is for adding libraries, not LDFLAGS. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-20mtd-utils: enable parallel build processSebastian Siewior
-j 2 build was not possible without this patch. Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-19mkfs.ubifs: set program version as 1.0Artem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-19Add mkfs.ubifsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-13fs-tests: allow for symlink name too long in integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-13fs-tests: fix max file name length in integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-13fs-tests: fix symlink bug in integrity testAdrian Hunter
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-07-28ubinize: fix static volumes generationArtem Bityutskiy
When static volumes is generated, the 'used_ebs' field of VID header has to be calculated based on image file size, not on the volume size. Fix this. This patch also improves error reporting a little and re-arrages the code so that all the validation is done in 'read_section()' Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-07-14ubi-tests: fix run scriptArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-07-14ubi-tests: fix makefileArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>