7 Commits

Author SHA1 Message Date
Bernhard Nortmann
4564e7822b Fix some issues that showed up as compiler warnings with mingw64
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-10-26 21:37:29 +02:00
Bernhard Nortmann
569f189693 Have programs display version information in their usage help
This way we don't have to introduce new options for retrieving
version info. For those programs that do not output their usage
by default (e.g. because they would process stdin), you may pass
a "-?" option to get help - and thus version information.

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-10-24 14:53:02 +02:00
Boris Brezillon
fe299a32ab nand-image-builder: Fix --help/-h option
--help/-h is not working correctly (it's printing the help context on
stderr instead of stdout).
Adding a valid shortcut for --help solves the problem.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-06-06 20:57:52 +02:00
Boris Brezillon
35fb99c095 nand-image-builder: Rework the help context
Add explanations on where the options to pass to the tool should be
extracted from, and add two examples to illustrate this explanation.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Bernhard Nortmann <bernhard.nortmann@web.de>
---
Changes since v3:
- cosmetic changes to the help context

Changes since v2:
- limit line width in the help context

Changes since v1:
- use shorter option names
- rework the help context
2016-06-06 20:57:52 +02:00
Boris Brezillon
7758d96dfb nand-image-builder: Add error messages to check_image_info()
Add error messages explaining what is wrong or missing in the arguments
passed by to the sunxi-nand-image-builder tool.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Bernhard Nortmann <bernhard.nortmann@web.de>
---
Changes since v1:
- Drop uneeded braces
2016-06-06 20:57:52 +02:00
Boris Brezillon
8140dfc454 nand-image-builder: Fix the copyright header
Add NextThing Co. and Free Electrons copyrights and add myself as the
author of the randomizer and image builder implementation.

Remove the lengthy description explaining how the BCH implementation works,
since this is the purpose of this tool is not to expose a BCH library
(which was the case of the original source code I copied from the kernel).

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Bernhard Nortmann <bernhard.nortmann@web.de>
---
Changes since v1:
- Add a link to the original bch.c source file
2016-06-06 20:57:42 +02:00
Boris Brezillon
e25f6e9024 Add a tool to generate raw NAND images
Generating raw NAND images is particularly useful for boot0 images
creation since the mainline driver is not supporting the funky layout
used by Allwinner's ROM code to load the boot0 binary from NAND.

This tools also allows one to generate raw images for 'normal' partitions
so that they can be flashed before soldering on the NAND on the board
(using a regular NAND programmer).

The tool takes care of generating ECC bytes and randomizing data as
expected by the NAND controller, and re-arranging the ECC/data sections
correctly.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2016-05-31 09:26:05 +02:00