| Age | Commit message (Collapse) | Author | 
 | 
The ubi-utils/src/ subdir is tossed as it just complicates things for no
real gain.  The dictionary.h header is relocated to the ubi-utils/include/
since other headers in there need it.
The top level clean is replaced with a `find -delete` on objects, so it
might prune more than necessary, but many projects now do this sort of
thing and no one complained there.
A "mkdep" helper generates the actual rule, and the variables are used
with "foreach" to expand these automatically.
The tests subdir is updated only to reflect the ubi-utils source move.
Otherwise, it is left untouched as making that non-recursive isn't really
worth the effort.
While we're gutting things, also through in kbuild style output while
building to make things more legible.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
 | 
 | 
The utilities are unmaintained for long time, and many of them
do not even work, just compile, and no on complains about this.
This suggests they are unused and we can now safely kill them.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Now include/common.h contains things that really everyone can use.
And all the stuff specific to ubi-utils is in ubi-utils/include/ubiutils-common.h
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Source files for libmtd, crc32, and fec are scattered throughout the
tree.  Move them to a central location so they can be built into a
common "libmtd.a" library used by all mtd-utils programs.
This patch only renames/deletes files and does not change the content.
Also modify the build system and source code so that libmtd.a can be built
from a "common" location (lib/).  Statically link all utilities at the top
level with libmtd.a . Minor changes to mkfs.ubifs to allow using the common
crc32 implementation.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
This is nearly a copy/paste from ubirmvol.
Signed-off-by: Arnaud Mouiche <arnaud.mouiche@thomson.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
This large commit makes several things.
1. Switches libmtd to use the new sysfs interface
2. Implements new handy 'mtdinfo' utility
3. Does minore amendmends in libubi and some ubi-tools.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Remove -g -O0 which I accidentally introduce. Sorry
for that.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
The previous patch fixed a nasty bug, so it is nice to increase
program version to reflect that.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Building out of tree currently fails with ubi-utils because make gets
confused and can't figure out the vpathed .c files.  Using VPATH rather
than vpath seems to work around it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
 | 
 | 
Move new-utils to ubi-utils and old ones to ubi-utils/old-utils.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Rather than duplicating the same thing over and over in every Makefile,
move it all to common.mk.
Other things fixed here:
 - doing subdirs in parallel
 - fix src!=build compiling in subdirs
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Some 'install' versions (e.g. this of OpenEmbedded) require the mode
to be a separate argument and don't understand the '-m0755' syntax:
  .../staging/x86_64-linux/usr/bin/install-sh: ./-m0755 does not exist.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
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>
 | 
 | 
-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: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
 | 
 | 
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
LSB says manpages belong to /usr/share/man, adjust makefile
defaults accordingly.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
 | 
 | 
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>
 | 
 | 
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>
 | 
 | 
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>
 | 
 | 
This commit basically removes most of the old ubi utilities
as they are barely maintainamble.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Also remove error messages stuff from pfi2bin
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>
 | 
 | 
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
This tool is not really needed and is unused.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Make ubigen consistent with other UBI utilities
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
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>
 | 
 | 
Add 2 new utilities to attach and detach UBI devices.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
... to tests/ubi-tests/
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
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>
 | 
 | 
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>
 | 
 | 
Plus some more ubimkvol clean-ups
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
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>
 | 
 | 
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
 | 
 | 
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
 | 
 | 
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
 | 
 | 
The new version can create a gnuplot graph of the erase count statistics.
It can also extract UBI volumes and single blocks with a preanalysis of 
the EC as well as the VID header. It has a manual page too ;-).
Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
 | 
 | 
Flashing of raw partitions should be possible now.
CRC checking of pfi files before flashing the content was added.
Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
 | 
 | 
Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
 | 
 | 
Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
 | 
 | 
UBI (Latin: "where?") manages multiple logical volumes on a single
flash device, specifically supporting NAND flash devices. UBI provides
a flexible partitioning concept which still allows for wear-levelling
across the whole flash device.
In a sense, UBI may be compared to the Logical Volume Manager
(LVM). Whereas LVM maps logical sector numbers to physical HDD sector
numbers, UBI maps logical eraseblocks to physical eraseblocks.
More information may be found in the UBI design documentation:
ubidesign.pdf. Which can be found here:
http://www.linux-mtd.infradead.org/doc/ubi.html
Partitioning/Re-partitioning
  An UBI volume occupies a certain number of erase blocks. This is
  limited by a configured maximum volume size, which could also be
  viewed as the partition size. Each individual UBI volume's size can
  be changed independently of the other UBI volumes, provided that the
  sum of all volume sizes doesn't exceed a certain limit.
  UBI supports dynamic volumes and static volumes. Static volumes are
  read-only and their contents are protected by CRC check sums.
Bad eraseblocks handling
  UBI transparently handles bad eraseblocks. When a physical
  eraseblock becomes bad, it is substituted by a good physical
  eraseblock, and the user does not even notice this.
Scrubbing
  On a NAND flash bit flips can occur on any write operation,
  sometimes also on read. If bit flips persist on the device, at first
  they can still be corrected by ECC, but once they accumulate,
  correction will become impossible. Thus it is best to actively scrub
  the affected eraseblock, by first copying it to a free eraseblock
  and then erasing the original. The UBI layer performs this type of
  scrubbing under the covers, transparently to the UBI volume users.
Erase Counts
  UBI maintains an erase count header per eraseblock. This frees
  higher-level layers (like file systems) from doing this and allows
  for centralized erase count management instead. The erase counts are
  used by the wear-levelling algorithm in the UBI layer. The algorithm
  itself is exchangeable.
Booting from NAND
  For booting directly from NAND flash the hardware must at least be
  capable of fetching and executing a small portion of the NAND
  flash. Some NAND flash controllers have this kind of support. They
  usually limit the window to a few kilobytes in erase block 0. This
  "initial program loader" (IPL) must then contain sufficient logic to
  load and execute the next boot phase.
  Due to bad eraseblocks, which may be randomly scattered over the
  flash device, it is problematic to store the "secondary program
  loader" (SPL) statically. Also, due to bit-flips it may become
  corrupted over time. UBI allows to solve this problem gracefully by
  storing the SPL in a small static UBI volume.
UBI volumes vs. static partitions
  UBI volumes are still very similar to static MTD partitions:
    * both consist of eraseblocks (logical eraseblocks in case of UBI
      volumes, and physical eraseblocks in case of static partitions;
    * both support three basic operations - read, write, erase.
  But UBI volumes have the following advantages over traditional
  static MTD partitions:
    * there are no eraseblock wear-leveling constraints in case of UBI
      volumes, so the user should not care about this;
    * there are no bit-flips and bad eraseblocks in case of UBI volumes.
  So, UBI volumes may be considered as flash devices with relaxed
  restrictions.
Where can it be found?
  Documentation, kernel code and applications can be found in the MTD
  gits.
What are the applications for?
  The applications help to create binary flash images for two
  purposes: pfi files (partial flash images) for in-system update of
  UBI volumes, and plain binary images, with or without OOB data in
  case of NAND, for a manufacturing step. Furthermore some tools
  are/and will be created that allow flash content analysis after a
  system has crashed.
Who did UBI?
  The original ideas, where UBI is based on, were developed by Andreas
  Arnez, Frank Haverkamp and Thomas Gleixner. Josh W. Boyer and
  some others were involved too. The implementation of the kernel
  layer was done by Artem B. Bityutskiy. The user-space applications
  and tools were written by Oliver Lohmann with contributions from
  Frank Haverkamp, Andreas Arnez, and Artem. Joern Engel contributed a
  patch which modifies JFFS2 so that it can be run on a UBI
  volume. Thomas Gleixner did modifications to the NAND layer and also
  some to JFFS2 to make it work.
Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
 |