summaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubinize.c
AgeCommit message (Collapse)Author
2009-09-28ubiformat/ubinize: Don't randomize 0xFFFFFFFF sequence numberMichael Roth
args.image_seq is of type uint32_t and was initialized to -1 which becomes 0xFFFFFFFF in this case. Later the value -1 was used as a flag that args.image_seq should be replaced with a randomized value. With the option --image-seq (-Q) a user could provide any sequence number at will. But when the user provided sequence number was 0xFFFFFFFF this was understood effectivly as -1 and got overridden by a randomized sequence number. So this patch change the programm flow to respect the principle of least surprise and never use a randomized sequence number when the user provide one at own will. Signed-off-by: Michael Roth <mroth@nessie.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-09-28ubiformat/ubinize: fix more 64-bit image sequence number confusionMichael Roth
The sequence number is only 32 bit as the strtoul() function. Signed-off-by: Michael Roth <mroth@nessie.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-08-24ubinize: fix 64-bit image sequence number confusionArtem Bityutskiy
UBI image sequence number which we store in EC headers is 32 bits, not 64-bits. I was confused when noticed that the 'image_seq' variable had type 'unsigned long long'. Turn it into a 'uint32_t' type. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-08-24ubiformat: fix typo in the help outputArtem Bityutskiy
The UBI image sequence number is a 64-bit integer, not 32-bit integer. 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-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>
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-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-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-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>