summaryrefslogtreecommitdiff
path: root/ubi-utils/src
AgeCommit message (Collapse)Author
2009-04-20ubi-utils: rename ubi_node_typeArtem Bityutskiy
Re-name the 'ubi_node_type()' function to a more meaningful name: 'ubi_probe_node()'. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-20ubinfo: handle -d correctlyArtem Bityutskiy
Fix ubinfo utility and make it handle -d parameter correctly. Without this patch it simple refuses working with -d. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18ubiformat: increase version to 1.2Artem Bityutskiy
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>
2009-04-18ubiformat: fix segfault and messagesArtem Bityutskiy
ubiformat segfaults like this: ubiformat: mtd0 (NAND), size 134217728 bytes (128.0 MiB), 16384 eraseblocks of 16384 bytes (16.0 KiB), min. I/O size 512 bytes libscan: scanning eraseblock 8191 -- 100 % complete ubiformat: 8190 eraseblocks have valid erase counter, mean value is 9 ubiformat: 2 eraseblocks are supposedly empty ubiformat: warning!: VID header and data offsets on flash are 512 and 1024, which is different to calculated offsets 256 and 512 ubiformat: use new offsets 512 and 1024? (yes/no) no Segmentation fault The reason is that volume table size is calculated for 256/512 layout, and when user chooses 512/1024 - it is not re-calculated which leads to segfault in 'ubigen_write_layout_vol()'. This patch also fixes the message - in the above output new offsets are 256/512, not 512/1024. Also, this patch adds explicit printing of the selected positions. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18libmtd: amend interfaceArtem Bityutskiy
Remove the fd field from the mtd information data structure, because libmtd does not really know the device node file name, and serves only as a place to save the descriptor. The callers should find a better place. This patch improves code readability and prepares for further changes. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18libubi: remove unnecessary header filesArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18libubi: amend included header filesArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18libubi: remove useless variableArtem Bityutskiy
We know that sysfs is always at /sys, so we do not have to store it in lib->sysfs. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18libubi: remove incorrect commentArtem Bityutskiy
sysfs if guaranteed to be in /sys. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18libmtd: move comments to headersArtem Bityutskiy
Just for the sake of being consistent with libubi, move the comments for API functions to the header file. 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-27libmtd: fix mtd_is_bad return codeRoger Quadros
Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-03-26ubiformat: mark faulty blocks as badRoger Quadros
Few minor amendments by Artem. And increase the utility version number. Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.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>
2009-01-13ubi-utils: fix warning in fprintf() codeMike Frysinger
When building with gcc security warnings enabled, the ubimirror.c code triggers this warning: ./src/ubimirror.c: In function 'main': ./src/ubimirror.c:206: error: format not a string literal and no format arguments Since the buffer in question should be a straight string anyways, avoid ugly printf exploits by outputting the string indirectly: printf("%s", buffer) Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-08ubi-utils: various fixesTom Rini
gcc-4.3.x introduces a number of new warnings (and we use -Werror) for things like not checking scanf return values and not using explicit formatting. Finally, it caught that we were overflowing our own buffer in unubi.c, so increate the variable size as we want to declare and clear PATH_MAX + 1, then use only PATH_MAX of the variable. Signed-off-by: Tom Rini <trini@embeddedalley.com> 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-02-23ubi-utils: fix compilation warnings in eb_chain.c when using gcc 4.2.3Otavio Salvador
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2008-02-23ubi-utils: fix compilation warnings in unubi_analyze.c when using gcc 4.2.3Otavio Salvador
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2008-02-23ubi-utils: fix compilation warnings in unubi.c when using gcc 4.2.3Otavio Salvador
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2008-02-22ubi-utils: pddcustomize fixup update volumeFrank Haverkamp
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>
2008-02-20ubi-tools: sanify old and new tools a bitArtem Bityutskiy
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>
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-16Fix error message printingArtem Bityutskiy
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>
2008-02-16ubinize: bugfix in parsing image size stringArtem Bityutskiy
This is a copy-paste problem: copied, but forgot to change the argument. 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-02-06ubimkvol: slightly amend printingArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-02-01libubi: fix sysfs direntries scanningArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-02-01ubi-tools: fix ubinizeAdrian Hunter
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>
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-25libubi: support atomic LEB change ioctlArtem Bityutskiy
And add testing for this feature. 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: remove dead codeArtem Bityutskiy
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-24ubi-utils: check image file size in ubinizeArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-24ubi-utils: add ubinize documentationArtem 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-18ubi-utils: move ecclayouts.h to sort-me-outArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-utils: move more stuff to sort-me-outArtem Bityutskiy
Also remove error messages stuff from pfi2bin Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-utils: move pddcustomize to sort-me-outArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-utils: move pfiflash to sort-me-outArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-utils: move mkbootenv to sort-me-outArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-utils: move various stuff to sort-me-outArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-tools: move ubigen to sort-me-outArtem Bityutskiy
This tool is not really needed and is unused. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-utils: tweak ubigenArtem Bityutskiy
Make ubigen consistent with other UBI utilities Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-utils: minor amendmentsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>