* [PATCH 0/3] mkimage: modify show_valid_options for usability
@ 2020-10-07 2:20 Naoki Hayama
0 siblings, 0 replies; only message in thread
From: Naoki Hayama @ 2020-10-07 2:20 UTC (permalink / raw)
To: u-boot
Currently, show_valid_options() shows "Unknown ***" lines.
For example:
$ ./tools/mkimage -A hoge
Invalid architecture, supported are:
Unknown architecture Unknown architecture
Unknown architecture Unknown architecture
alpha Alpha
arc ARC
arm ARM
arm64 AArch64
...
It's because include/image.h must keep obsolete IDs for
backward compatibility (see comit ff87b0810753), and
show_valid_options() tries to find entry IDs which don't exist
in a category table defined in common/image.c
(in this case, uimage_arch[]).
To fix this problem, this patchset introduces checking whether
a category table has an entry ID. If an entry ID doesn't exist,
adding it to a list for output is skipped before calling qsort().
The output will be:
$ ./tools/mkimage -A hoge
Invalid architecture, supported are:
alpha Alpha
arc ARC
arm ARM
arm64 AArch64
...
This patchset will affect all kinds of image header categories
(-A, -C, -O and -T flags).
Naoki Hayama (3):
image: Add a function to modify category information
mkimage: Skip adding non-existent IDs to a list
cosmetic: image: Fix comments and the order of definitions
common/image.c | 38 ++++++++++++++++++++++++++++----------
include/image.h | 10 ++++++++++
tools/mkimage.c | 9 +++++++--
3 files changed, 45 insertions(+), 12 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-07 2:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07 2:20 [PATCH 0/3] mkimage: modify show_valid_options for usability Naoki Hayama
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.