aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src/libubigen.c
AgeCommit message (Collapse)Author
2010-09-01rename crc32 to mtd_crc32Artem Bityutskiy
Because of namespace collisions mkfs.ubifs uses crc32() implementation from /lib/libz.so.1, which generates incompatible CRC and later on the kernel reports many CRC errors. Fix this by re-naming mtd-utils' crc32 function to mtd_crc32. Reported-by: Jon Povey <Jon.Povey@racelogic.co.uk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-07-13mtd-utils: move libmtd source files to lib/ subdirectoryKevin Cernekee
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>
2010-06-14libubigen: make init_vid_hdr externally visibleArtem Bityutskiy
ubi-tests need it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-06-14libubigen: move header commentsArtem Bityutskiy
To be consistent with other ubi libraries, move header comments to the .h file. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-06-14libubigen: do not create huge arrays on stackArtem Bityutskiy
Stop creating 128KiB and larger arrays on stack - allocate RAM using malloc() instead. This patch also teaches libubigen to always set errno. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-07-26ubinize: add sequence number supportArtem Bityutskiy
UBI now supports the image sequence number feature which prevents UBI from mistakingly accepting half-written images, if the image was written on top of an older image. Support this feature in ubinize and make it pick a random number for the UBI image sequence number. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-05-11ubi-utils: fix memory corruptionsArtem Bityutskiy
This patch contains changes similar to the ones in the previous patch. Also, it changes all invocations of memset and makes sure the argument is 0, not '\0', because memset expects int, not char. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-03-30libubigen: don't define large array on stacksonic zhang
On nommu arch, local stack size is very limited and can't be enlarged on demand. So, don't define large array on local stack. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
2009-03-17ubi-utils: re-arrange directory layoutArtem Bityutskiy
Move new-utils to ubi-utils and old ones to ubi-utils/old-utils. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-02-18UBI: update ubi-header.hArtem Bityutskiy
Take the latest version from the kernel, where it was renamed to ubi-media.h. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-02-19Revert ubi-tools changesArtem Bityutskiy
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>
2008-02-06ubi-tools: improve printing macrosArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-25ubi-utils: use mtd_swab.hArtem Bityutskiy
Do not relay on asm/byteorder and use mtd_swab.h instead Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-25ubi-utils: use macros not hardcoded constantsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-25ubi-tools: fix compilation problemsArtem Bityutskiy
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>
2008-01-24ubinize: add autoresize flag supportArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-23ubi-utils: remove all old toolsArtem Bityutskiy
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>
2008-01-22ubi-utils: massive changesArtem Bityutskiy
This commit basically removes most of the old ubi utilities as they are barely maintainamble. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-utils: tweak pfi2ubiArtem Bityutskiy
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>
2008-01-17ubi-utils: update headersArtem Bityutskiy
Update UBI headers which requires some renameing changes. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-22ubi-utils: some renamesArtem Bityutskiy
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>
2007-08-29ubi-utils: do not interfer with system namespaceArtem Bityutskiy
Rename __unused to ubi_unused to avoid clashes with system namespace Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2006-10-31[MTD] UBI: Removed automake, autoconf, added ubi userspace headers.Frank Haverkamp
Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>