The tools had a mixture of different version numbers. This is changed now.
The internal change to move to remove glibc dependencies should be reflected
by an increase of the version number, so that we can react if trouble is
seen with the new code.
Singed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
* Create a flashable NAND image from a binary image
*
* History:
- * 1.0: Initial release (tglx)
- * 1.1: Understands hex and dec input parameters (tglx)
- * 1.2: Generates separated OOB data, if needed. (oloh)
- * 1.3: Padds data/oob to a given size. (oloh)
+ * 1.0 Initial release (tglx)
+ * 1.1 Understands hex and dec input parameters (tglx)
+ * 1.2 Generates separated OOB data, if needed. (oloh)
+ * 1.3 Padds data/oob to a given size. (oloh)
+ * 1.4 Removed argp because we want to use uClibc.
*/
#include <unistd.h>
#include "config.h"
#include "nandecc.h"
+#define PROGRAM_VERSION "1.4"
+
#define CHECK_ENDP(option, endp) do { \
if (*endp) { \
fprintf(stderr, \
extern char *optarg;
extern int optind;
-static char doc[] = "\nVersion: " PACKAGE_VERSION "\n\tBuilt on "
+static char doc[] = "\nVersion: " PROGRAM_VERSION "\n\tBuilt on "
BUILD_CPU" "BUILD_OS" at "__DATE__" "__TIME__"\n"
"\n"
"bin2nand - a tool for adding OOB information to a "
switch (key) {
case 'p': /* pagesize */
- args->pagesize = (size_t) ustrtoull(optarg, &endp, 0);
+ args->pagesize = (size_t)
+ ustrtoull(optarg, &endp, 0);
CHECK_ENDP("p", endp);
break;
case 'j': /* padding */
- args->padding = (size_t) ustrtoull(optarg, &endp, 0);
+ args->padding = (size_t)
+ ustrtoull(optarg, &endp, 0);
CHECK_ENDP("j", endp);
break;
case 'o': /* output */
exit(0);
break;
case 'V':
- printf("%s\n", PACKAGE_VERSION);
+ printf("%s\n", PROGRAM_VERSION);
exit(0);
break;
case 'c':
if (optind < argc) {
args->fp_in = fopen(argv[optind++], "rb");
if ((args->fp_in) == NULL) {
- err_quit("Cannot open file %s for input\n", argv[optind++]);
+ err_quit("Cannot open file %s for input\n",
+ argv[optind++]);
}
}
* Author: Frank Haverkamp
*/
-#define PACKAGE_VERSION "1.1"
-#define PACKAGE_BUGREPORT "haver@vnet.ibm.com, dedekind@linutronix.de, or tglx@linutronix.de"
+#define PACKAGE_BUGREPORT \
+ "haver@vnet.ibm.com, dedekind@linutronix.de, or tglx@linutronix.de"
#define __unused __attribute__((unused))
* Author: Oliver Lohmann
*
* Create boot-parameter/pdd data from an ASCII-text input file.
+ *
+ * 1.2 Removed argp because we want to use uClibc.
*/
#include <stdio.h>
#include "bootenv.h"
#include "error.h"
+#define PROGRAM_VERSION "1.2"
+
extern char *optarg;
extern int optind;
-static char doc[] = "\nVersion: " PACKAGE_VERSION "\n\tBuilt on "
+static char doc[] = "\nVersion: " PROGRAM_VERSION "\n\tBuilt on "
BUILD_CPU" "BUILD_OS" at "__DATE__" "__TIME__"\n"
"\n"
"mkbootenv - processes bootenv text files and convertes "
case 'o':
args->fp_out = fopen(optarg, "wb");
if ((args->fp_out) == NULL) {
- fprintf(stderr,
- "Cannot open file %s for output\n", optarg);
+ fprintf(stderr, "Cannot open file %s "
+ "for output\n", optarg);
exit(1);
}
break;
case '?': /* help */
printf("%s", doc);
printf("%s", optionsstr);
- printf("\nReport bugs to %s\n", PACKAGE_BUGREPORT);
+ printf("\nReport bugs to %s\n",
+ PACKAGE_BUGREPORT);
exit(0);
break;
case 'V':
- printf("%s\n", PACKAGE_VERSION);
+ printf("%s\n", PROGRAM_VERSION);
exit(0);
break;
default:
if (optind < argc) {
args->fp_in = fopen(argv[optind++], "rb");
if ((args->fp_in) == NULL) {
- fprintf(stderr,
- "Cannot open file %s for input\n", argv[optind]);
+ fprintf(stderr, "Cannot open file %s for input\n",
+ argv[optind]);
exit(1);
}
}
* Author: Frank Haverkamp
*
* An utility to decompose NAND images and strip OOB off. Not yet finished ...
+ *
+ * 1.2 Removed argp because we want to use uClibc.
*/
+
#include <config.h>
#include <errno.h>
#include <fcntl.h>
#include "config.h"
#include "nandecc.h"
+#define PROGRAM_VERSION "1.2"
+
#define MAXPATH 1024
#define MIN(x,y) ((x)<(y)?(x):(y))
.options = NULL,
};
-static char doc[] = "\nVersion: " PACKAGE_VERSION "\n\t"
+static char doc[] = "\nVersion: " PROGRAM_VERSION "\n\t"
BUILD_OS" "BUILD_CPU" at "__DATE__" "__TIME__"\n"
"\nSplit data and OOB.\n";
printf("Usage: nand2bin [OPTION...] input.mif\n");
printf("%s", doc);
printf("%s", optionsstr);
- printf("\nReport bugs to %s\n", PACKAGE_BUGREPORT);
+ printf("\nReport bugs to %s\n",
+ PACKAGE_BUGREPORT);
exit(0);
break;
case 'V':
- printf("%s\n", PACKAGE_VERSION);
+ printf("%s\n", PROGRAM_VERSION);
exit(0);
break;
* if the system is updated and one must be able to modify them when
* the system has booted the first time. This tool is intended to do
* PDD modification.
+ *
+ * 1.3 Removed argp because we want to use uClibc.
*/
#include <stdio.h>
#include "libubi.h"
#include "ubimirror.h"
+#define PROGRAM_VERSION "1.3"
+
typedef enum action_t {
ACT_NORMAL = 0,
ACT_LIST,
extern char *optarg;
extern int optind;
-static char doc[] = "\nVersion: " PACKAGE_VERSION "\n\tBuilt on "
+static char doc[] = "\nVersion: " PROGRAM_VERSION "\n\tBuilt on "
BUILD_CPU" "BUILD_OS" at "__DATE__" "__TIME__"\n"
"\n"
"pddcustomize - customize bootenv and pdd values.\n";
while (1) {
int key;
- key = getopt_long(argc, argv, "clbxs:i:o:?V", long_options, NULL);
+ key = getopt_long(argc, argv, "clbxs:i:o:?V",
+ long_options, NULL);
if (key == -1)
break;
args->side = get_update_side(optarg);
if (args->side < 0) {
err_msg("Unsupported seqnum: %d.\n"
- "Supported seqnums are '0' and '1'\n",
- args->side, optarg);
+ "Supported seqnums are "
+ "'0' and '1'\n",
+ args->side, optarg);
ERR_ARGP;
}
break;
args->file_out = optarg;
break;
case '?': /* help */
- err_msg("Usage: pddcustomize.orig [OPTION...] [key=value] [...]");
+ err_msg("Usage: pddcustomize.orig [OPTION...] "
+ "[key=value] [...]");
err_msg("%s", doc);
err_msg("%s", optionsstr);
- err_msg("\nReport bugs to %s", PACKAGE_BUGREPORT);
+ err_msg("\nReport bugs to %s",
+ PACKAGE_BUGREPORT);
exit(0);
break;
case 'V':
- err_msg("%s", PACKAGE_VERSION);
+ err_msg("%s", PROGRAM_VERSION);
exit(0);
break;
default:
* chips in a manufacturing step where the flashes are written before
* being soldered onto the hardware. For NAND images another step is
* required to add the right OOB data to the binary image.
+ *
+ * 1.3 Removed argp because we want to use uClibc.
*/
#include <stdlib.h>
#include "peb.h"
#include "crc32.h"
-#define PROGRAM_VERSION "1.2"
+#define PROGRAM_VERSION "1.3"
#define MAX_FNAME 255
#define DEFAULT_ERASE_COUNT 0 /* Hmmm.... Perhaps */
printf("pfi2bin [OPTION...] pfifile\n");
printf("%s", doc);
printf("%s", optionsstr);
- printf("\nReport bugs to %s\n", PACKAGE_BUGREPORT);
+ printf("\nReport bugs to %s\n",
+ PACKAGE_BUGREPORT);
exit(0);
break;
case 'V':
- printf("%s\n", PACKAGE_VERSION);
+ printf("%s\n", PROGRAM_VERSION);
exit(0);
break;
exit(0);
break;
case 'V':
- err_msg("%s", PACKAGE_VERSION);
+ err_msg("%s", PROGRAM_VERSION);
exit(0);
break;
default:
*
* 1.0 Initial version
* 1.1 Different CRC32 start value
+ * 1.2 Removed argp because we want to use uClibc.
*/
#include <stdlib.h>
#include "ubigen.h"
#include "config.h"
+#define PROGRAM_VERSION "1.2"
+
typedef enum action_t {
ACT_NORMAL = 0x00000001,
ACT_BROKEN_UPDATE = 0x00000002,
extern char *optarg;
extern int optind;
-static char doc[] = "\nVersion: " PACKAGE_VERSION "\n\tBuilt on "
+static char doc[] = "\nVersion: " PROGRAM_VERSION "\n\tBuilt on "
BUILD_CPU" "BUILD_OS" at "__DATE__" "__TIME__"\n"
"\n"
"ubigen - a tool for adding UBI information to a binary input file.\n";
case 'o': /* output */
args->fp_out = fopen(optarg, "wb");
if ((args->fp_out) == NULL) {
- fprintf(stderr, "Cannot open file %s for output\n",
- optarg);
+ fprintf(stderr, "Cannot open file %s "
+ "for output\n", optarg);
exit(1);
}
break;
case 'i': /* input */
args->fp_in = fopen(optarg, "rb");
if ((args->fp_in) == NULL) {
- fprintf(stderr, "Cannot open file %s for input\n",
- optarg);
+ fprintf(stderr, "Cannot open file %s "
+ "for input\n", optarg);
exit(1);
}
break;
break;
case 'B': /* eb_size */
- args->eb_size = (uint32_t) ustrtoul(optarg, &endp, 0);
+ args->eb_size =
+ (uint32_t)ustrtoul(optarg, &endp, 0);
CHECK_ENDP("B", endp);
break;
case 'E': /* erasecount */
- args->ec = (uint64_t) strtoul(optarg, &endp, 0);
+ args->ec = (uint64_t)strtoul(optarg, &endp, 0);
CHECK_ENDP("E", endp);
break;
case 'I': /* id */
- args->id = (uint16_t) strtoul(optarg, &endp, 0);
+ args->id = (uint16_t)strtoul(optarg, &endp, 0);
CHECK_ENDP("I", endp);
break;
case 'T': /* type */
- args->type = (uint16_t) strtoul(optarg, &endp, 0);
+ args->type =
+ (uint16_t)strtoul(optarg, &endp, 0);
CHECK_ENDP("T", endp);
break;
case 'X': /* versionnr */
- args->version = (uint8_t) strtoul(optarg, &endp, 0);
+ args->version =
+ (uint8_t)strtoul(optarg, &endp, 0);
CHECK_ENDP("X", endp);
break;
case 'O': /* offset for volume hdr */
fprintf(stderr, "Usage: ubigen [OPTION...]\n");
fprintf(stderr, "%s", doc);
fprintf(stderr, "%s", optionsstr);
- fprintf(stderr, "\nReport bugs to %s\n", PACKAGE_BUGREPORT);
+ fprintf(stderr, "\nReport bugs to %s\n",
+ PACKAGE_BUGREPORT);
exit(0);
break;
case 'V':
- fprintf(stderr, "%s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", PROGRAM_VERSION);
exit(0);
break;
if (!args->fp_in) {
args->fp_in = fopen(argv[optind++], "rb");
if ((args->fp_in) == NULL) {
- fprintf(stderr,
- "Cannot open file %s for input\n", argv[optind]);
+ fprintf(stderr, "Cannot open file %s for "
+ "input\n", argv[optind]);
exit(1);
}
}
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Author: Oliver Lohmann
+ *
+ * 1.2 Removed argp because we want to use uClibc.
*/
#include <stdio.h>
#include "example_ubi.h"
#include "ubimirror.h"
+#define PROGRAM_VERSION "1.2"
+
typedef enum action_t {
ACT_NORMAL = 0,
ACT_ARGP_ABORT,
extern char *optarg;
extern int optind;
-static char doc[] = "\nVersion: " PACKAGE_VERSION "\n\tBuilt on "
+static char doc[] = "\nVersion: " PROGRAM_VERSION "\n\tBuilt on "
BUILD_CPU" "BUILD_OS" at "__DATE__" "__TIME__"\n"
"\n"
"ubimirror - mirrors ubi volumes.\n";
args->side = get_update_side(optarg);
if (args->side < 0) {
err_msg("Unsupported seqnum: %s.\n"
- "Supported seqnums are '0' and '1'\n", optarg);
+ "Supported seqnums are '0' "
+ "and '1'\n", optarg);
ERR_ARGP;
}
break;
case '?': /* help */
- err_msg("Usage: ubimirror [OPTION...] <source> <destination>\n");
+ err_msg("Usage: ubimirror [OPTION...] "
+ "<source> <destination>\n");
err_msg("%s", doc);
err_msg("%s", optionsstr);
- err_msg("\nReport bugs to %s\n", PACKAGE_BUGREPORT);
+ err_msg("\nReport bugs to %s\n",
+ PACKAGE_BUGREPORT);
exit(0);
break;
case 'V':
- err_msg("%s", PACKAGE_VERSION);
+ err_msg("%s", PROGRAM_VERSION);
exit(0);
break;
default:
* 1.1 Does not support erase blocks anymore. This is replaced by
* the number of bytes.
* 1.2 Reworked the user-interface to use argp.
+ * 1.3 Removed argp because we want to use uClibc.
*/
#include <stdio.h>
#include <config.h>
#include <libubi.h>
-#define PROGRAM_VERSION "1.2"
+#define PROGRAM_VERSION "1.3"
extern char *optarg;
extern int optind;
break;
case 'n': /* --volid=<volume id> */
args->vol_id = strtoul(optarg, &endp, 0);
- if (*endp != '\0' || endp == optarg ||
- (args->vol_id < 0 && args->vol_id != UBI_DYNAMIC_VOLUME)) {
+ if (*endp != '\0' ||
+ endp == optarg ||
+ (args->vol_id < 0 &&
+ args->vol_id != UBI_DYNAMIC_VOLUME)) {
fprintf(stderr, "Bad volume ID: "
- "\"%s\"\n", optarg);
+ "\"%s\"\n", optarg);
goto out;
}
break;
fprintf(stderr, "Usage: ubimkvol [OPTION...]\n");
fprintf(stderr, "%s", doc);
fprintf(stderr, "%s", optionsstr);
- fprintf(stderr, "\nReport bugs to %s\n", PACKAGE_BUGREPORT);
+ fprintf(stderr, "\nReport bugs to %s\n",
+ PACKAGE_BUGREPORT);
exit(0);
break;
case 'V':
- fprintf(stderr, "%s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", PROGRAM_VERSION);
exit(0);
break;
* Frank Haverkamp <haver@vnet.ibm.com>
*
* 1.1 Reworked the userinterface to use argp.
+ * 1.2 Removed argp because we want to use uClibc.
*/
#include <stdio.h>
#include <config.h>
#include <libubi.h>
-#define PROGRAM_VERSION "1.1"
+#define PROGRAM_VERSION "1.2"
extern char *optarg;
extern int optind;
case 'n': /* --volid=<volume id> */
args->vol_id = strtoul(optarg, &endp, 0);
if (*endp != '\0' || endp == optarg ||
- (args->vol_id < 0 && args->vol_id != UBI_DYNAMIC_VOLUME)) {
+ (args->vol_id < 0 &&
+ args->vol_id != UBI_DYNAMIC_VOLUME)) {
fprintf(stderr, "Bad volume ID: "
"\"%s\"\n", optarg);
goto out;
fprintf(stderr, "Usage: ubirmvol [OPTION...]\n");
fprintf(stderr, "%s", doc);
fprintf(stderr, "%s", optionsstr);
- fprintf(stderr, "\nReport bugs to %s\n", PACKAGE_BUGREPORT);
+ fprintf(stderr, "\nReport bugs to %s\n",
+ PACKAGE_BUGREPORT);
exit(0);
break;
case 'V':
- fprintf(stderr, "%s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", PROGRAM_VERSION);
exit(0);
break;
default:
break;
case 'V':
- fprintf(stderr, "%s\n", PACKAGE_VERSION);
+ fprintf(stderr, "%s\n", PROGRAM_VERSION);
exit(0);
break;
/*
* Authors: Frank Haverkamp, haver@vnet.ibm.com
* Drake Dowsett, dowsett@de.ibm.com
+ *
+ * 1.2 Removed argp because we want to use uClibc.
*/
/*
#define EXEC "unubi"
#define CONTACT "haver@vnet.ibm.com"
-#define VERSION "0.9"
+#define VERSION "1.0"
extern char *optarg;
extern int optind;