Commit bd6e14209445853f9024574b756bba3184bc215c

Authored by Simon Glass
Committed by Tom Rini
1 parent 8df81e17f8

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>

Showing 3 changed files with 7 additions and 2 deletions Side-by-side Diff

... ... @@ -51,7 +51,8 @@
51 51 * successful
52 52 */
53 53 if ((*curr)->print_header) {
54   - (*curr)->print_header(ptr);
  54 + if (!params->quiet)
  55 + (*curr)->print_header(ptr);
55 56 } else {
56 57 fprintf(stderr,
57 58 "%s: print_header undefined for %s\n",
... ... @@ -73,6 +73,7 @@
73 73 struct content_info *content_head; /* List of files to include */
74 74 struct content_info *content_tail;
75 75 bool external_data; /* Store data outside the FIT */
  76 + bool quiet; /* Don't output text in normal operation */
76 77 };
77 78  
78 79 /*
... ... @@ -136,7 +136,7 @@
136 136 int opt;
137 137  
138 138 while ((opt = getopt(argc, argv,
139   - "a:A:b:cC:d:D:e:Ef:Fk:K:ln:O:rR:sT:vVx")) != -1) {
  139 + "a:A:b:cC:d:D:e:Ef:Fk:K:ln:O:rR:qsT:vVx")) != -1) {
140 140 switch (opt) {
141 141 case 'a':
142 142 params.addr = strtoull(optarg, &ptr, 16);
... ... @@ -215,6 +215,9 @@
215 215 params.os = genimg_get_os_id(optarg);
216 216 if (params.os < 0)
217 217 usage("Invalid operating system");
  218 + break;
  219 + case 'q':
  220 + params.quiet = 1;
218 221 break;
219 222 case 'r':
220 223 params.require_keys = 1;