mkimage: Add a quiet mode
Some build systems want to be quiet unless there is a problem. At present mkimage displays quite a bit of information when generating a FIT file. Add a '-q' flag to silence this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
8df81e17f8
commit
bd6e142094
|
@ -51,7 +51,8 @@ int imagetool_verify_print_header(
|
||||||
* successful
|
* successful
|
||||||
*/
|
*/
|
||||||
if ((*curr)->print_header) {
|
if ((*curr)->print_header) {
|
||||||
(*curr)->print_header(ptr);
|
if (!params->quiet)
|
||||||
|
(*curr)->print_header(ptr);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s: print_header undefined for %s\n",
|
"%s: print_header undefined for %s\n",
|
||||||
|
|
|
@ -73,6 +73,7 @@ struct image_tool_params {
|
||||||
struct content_info *content_head; /* List of files to include */
|
struct content_info *content_head; /* List of files to include */
|
||||||
struct content_info *content_tail;
|
struct content_info *content_tail;
|
||||||
bool external_data; /* Store data outside the FIT */
|
bool external_data; /* Store data outside the FIT */
|
||||||
|
bool quiet; /* Don't output text in normal operation */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -136,7 +136,7 @@ static void process_args(int argc, char **argv)
|
||||||
int opt;
|
int opt;
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv,
|
while ((opt = getopt(argc, argv,
|
||||||
"a:A:b:cC:d:D:e:Ef:Fk:K:ln:O:rR:sT:vVx")) != -1) {
|
"a:A:b:cC:d:D:e:Ef:Fk:K:ln:O:rR:qsT:vVx")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'a':
|
case 'a':
|
||||||
params.addr = strtoull(optarg, &ptr, 16);
|
params.addr = strtoull(optarg, &ptr, 16);
|
||||||
|
@ -216,6 +216,9 @@ static void process_args(int argc, char **argv)
|
||||||
if (params.os < 0)
|
if (params.os < 0)
|
||||||
usage("Invalid operating system");
|
usage("Invalid operating system");
|
||||||
break;
|
break;
|
||||||
|
case 'q':
|
||||||
|
params.quiet = 1;
|
||||||
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
params.require_keys = 1;
|
params.require_keys = 1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue