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

Simon Glass sjg at chromium.org
Fri Feb 12 16:54:09 CET 2016


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.

> 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.

Regards,
Simon


More information about the U-Boot mailing list