[U-Boot] [PATCH 19/26] mkimage: Support adding device tree files to a FIT

Tom Rini trini at konsulko.com
Fri Feb 12 17:03:24 CET 2016


On Fri, Feb 12, 2016 at 08:54:09AM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On 11 February 2016 at 09:36, Tom Rini <trini at konsulko.com> wrote:
> > On Thu, Jan 28, 2016 at 09:39:39AM -0700, Simon Glass wrote:
> >
> >> To make the auto-FIT feature useful we need to be able to provide a list of
> >> device tree files on the command line for mkimage to add into the FIT. Add
> >> support for this feature.
> > [snip]
> >> +.BI "\-b
> >> +Specifies that the following arguments are device tree binary files (.dtb).
> >> +
> >> +.TP
> >>  .BI "\-c [" "comment" "]"
> >>  Specifies a comment to be added when signing. This is typically a useful
> >>  message which describes how the image was signed or some other useful
> >> @@ -125,6 +129,10 @@ This can be used to sign images with additional keys after initial image
> >>  creation.
> >>
> >>  .TP
> >> +.BI "\-i
> >> +Specifies that the following arguments are image files.
> >> +
> >> +.TP
> >>  .BI "\-k [" "key_directory" "]"
> >>  Specifies the directory containing keys to use for signing. This directory
> >>  should contain a private key file <name>.key for use with signing and a
> >> @@ -191,6 +199,15 @@ is required.
> >>  .br
> >>  .B -c """Kernel 4.4 image for production devices""" -d vmlinuz kernel.itb
> >>  .fi
> >> +.P
> >> +Create a FIT image containing a kernel and some device tree files, using
> >> +automatic mode. No .its file is required.
> >> +.nf
> >> +.B mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \\\\
> >> +.br
> >> +.B -c """Kernel 4.4 image for production devices""" -d vmlinuz \\\\
> >> +.B -b rk3288-firefly.dts rk3288-jerry.dts -i kernel.itb
> >> +.fi
> >
> > OK, I'm confused in a few ways here.  First, we don't need quotes around
> > the space separated list of dts files?
> 
> No, the -b option introduces the list, which can be as long as needed.
> I want to make it possible to specify a list easily.

OK.  I don't see how that works in the code, but if that's the intent
and it works, OK :)

> > Second, we need dts not dtb?
> 
> Eek, no, it should be dtb.
> 
> > Third, I think this would be a better example if (as I suspect we need
> > really) it was a full path to the output rather than assuming that we've
> > copied the files to $PWD.
> 
> OK
> 
> > Fourth, -i is inputs or outputs?  The help
> > reads like inputs and is where I assume we would say vmlinuz here and
> > not use -d and then end with our output of kernel.itb.  Thanks!
> 
> -i introduces the image file, whic his an output. The -d provides the
> datafile, which is the file that is is put inside the FIT.
> 
> Maybe we can change things to make this a bit clearer. We could
> perhaps have an option to end the list of dtb files, instead of the
> option to signal the output file is next? Or maybe we can avoid -i
> altogether since the last arg should be the output file.

Yes, I don't think we need -i at all.  The last argument is the output,
always, and -f auto instead of -f some-file.its is all we need to know
it's a FIT output.  And, ah, so I guess this is how -b is implemented
then.  Yes, this seems rather awkward.  Maybe we instead implement a
sometimes optional (ie previous use cases) -o flag to say output file is
... and also make sure it's clear in the man page at least that -b
consumes following arguments as the DT list until another flag is
passed?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160212/b1740b3a/attachment.sig>


More information about the U-Boot mailing list