diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-23 08:55:51 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-03-15 02:18:28 +0300 |
commit | 8e35bb07eb68e524804f2ef53dd18c7cec0b06fc (patch) | |
tree | 6e4b4062aad571ec3b94243d06723bfc09fe74b6 /tools/mkimage.c | |
parent | cef2e51489567260857984c3e95d98eb03c97fe9 (diff) | |
download | u-boot-8e35bb07eb68e524804f2ef53dd18c7cec0b06fc.tar.xz |
mkimage: Support automatic creating of a FIT without a .its
At present, when generating a FIT, mkimage requires a .its file containing
the structure of the FIT and referring to the images to be included.
Creating the .its file is a separate step that makes it harder to use FIT.
This is not required for creating legacy images.
Often the FIT is pretty standard, consisting of an OS image, some device
tree files and a single configuration. We can handle this case automatically
and avoid needing a .its file at all.
To start with, support automatically generate the FIT using a new '-f auto'
option. Initially this only supports adding a single image (e.g. a linux
kernel) and a single configuration.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/mkimage.c')
-rw-r--r-- | tools/mkimage.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c index 4526da20b5..7add86c13d 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -85,7 +85,7 @@ static void usage(const char *msg) " -x ==> set XIP (execute in place)\n", params.cmdname); fprintf(stderr, - " %s [-D dtc_options] [-f fit-image.its|-F] fit-image\n", + " %s [-D dtc_options] [-f fit-image.its|-f auto|-F] fit-image\n", params.cmdname); fprintf(stderr, " -D => set all options for device tree compiler\n" @@ -159,7 +159,8 @@ static void process_args(int argc, char **argv) params.eflag = 1; break; case 'f': - params.datafile = optarg; + datafile = optarg; + params.auto_its = !strcmp(datafile, "auto"); /* no break */ case 'F': /* @@ -235,7 +236,8 @@ static void process_args(int argc, char **argv) */ if (params.type == IH_TYPE_FLATDT) { params.fit_image_type = type; - params.datafile = datafile; + if (!params.auto_its) + params.datafile = datafile; } else if (type != IH_TYPE_INVALID) { params.type = type; } |