Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Complain and exit if max. count of LEBs was not specified.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Add -N option to ubirmvol to support deleting volumes
by name.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
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>
|
|
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>
|
|
-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>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
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>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Check that volume names and IDs are unique
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This adds support for allowing the specification of unique CPPFLAGS and
LDFLAGS for both LZO and ZLIB. In addition, it allows for independently
specifying both PREFIX and EXEC_PREFIX.
The former is useful in some cross-compilation environments where the
LZO and ZLIB versions being built against are not those installed in the
standard locations.
The latter is useful when installing mtd-utils in a multi-architecture
installation area.
Signed-off-by: Grant Erickson <gerickson@nuovations.com>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
|
|
Undo my weird change which slipped accidentally to the commit.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
1. Adds -s/--size switch;
2. Allows the image file to be specified as '-', meaning stdin; if used,
the size must be specified.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Users can pass the -O option to ubiformat to override the VID header
offset on the command-line. If for some reason, the new offset does
not match what is on flash, ubiformat currently prompts the user if
they'd rather use the *old* offsets. This means that calling
ubiformat with --yes will not do what was requested on the
command-line.
This patch reverses the question so --yes is actually useful for
running in batch-mode.
Signed-off-by: Bernard Blackham <bernard@largestprime.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Added support for symbolic links to the grammar of the device table file
such that links that already exist in the root working directory may
have their permissions and ownership changed. Creating symbolic links
anew is still unsupported.
Added a note to this effect in the manual reference page.
Print out the type character when encountering an unsupported file type
(e.g. symbolic links when created anew).
Signed-off-by: Grant Erickson <gerickson@nuovations.com>
Signed-off-by: Josh Boyer <jwboyer@vader.jdub.homelinux.org>
|
|
Remove performance optimization in find_filesystem_entry that prevented
the successful simultaneous use of --root and --devtable where the
latter is only used to fix-up permissions and ownership and to create
device nodes.
As it stood, the performance optimization prevented a successful find
where directory recursion was required or where the file being searched
for had any mode permission bits set.
See http://lists.infradead.org/pipermail/linux-mtd/2008-June/021997.html
for additional information.
Signed-off-by: Grant Erickson <gerickson@nuovations.com>
Signed-off-by: Josh Boyer <jwboyer@vader.jdub.homelinux.org>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|
|
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
|