[PATCH 3/3] bootm: add initial FIT support
Yegor Yefremov
yegorslists at googlemail.com
Fri Jan 8 02:36:56 PST 2016
On Thu, Jan 7, 2016 at 6:09 PM, Jan Lübbe <jlu at pengutronix.de> wrote:
> On Di, 2016-01-05 at 14:50 +0100, Marc Kleine-Budde wrote:
>> >> > +static int fit_open_configuration(struct fit_handle *handle, int
>> num)
>> >> > +{
>> >> > + struct device_node *conf_node = NULL, *sig_node;
>> >> > + char unit_name[10];
>> >> > + const char *unit, *desc;
>> >> > + int ret, level;
>> >> > +
>> >> > + conf_node = of_get_child_by_name(handle->root,
>> "configurations");
>> >> > + if (!conf_node)
>> >> > + return -ENOENT;
>> >> > +
>> >> > + if (num) {
>> >> > + snprintf(unit_name, sizeof(unit_name), "conf@%d",
>> num);
>> >
>> > This is not working for my *.its file:
>> >
>> https://github.com/visionsystemsgmbh/onrisc_br_bsp/blob/master/board/vscom/baltos/kernel-fit.its
>> > U-Boot is working with bootm ${loadaddr}#conf${board_name}
>> >
>> > For Barebox I've changed this line to
>> >
>> > snprintf(unit_name, sizeof(unit_name), "conf%d at 1", num)
>> >
>> > This is how I start Linux: bootm /boot/kernel-fit.itb@
>> $global.board.id
>> >
>> > What is the standard for providing FIT configuration?
>>
>> Don't know. Is there a spec in the u-boot sources, otherwise use the
>> code.
>
> I used the u-boot example ITS for reference (doc/uImage.FIT/multi.its).
> The have the number after the @, so I used the same. Barebox's bootm
> currently only supports a number to select between different "subimages"
> as a legacy from uImages.
But to be compatible with U-Boot Barebox should also accept strings
after bootm. See Joel's slides.
> Your ITS has a @1 for every config/fdt. Why?
I used http://elinux.org/images/f/f4/Elc2013_Fernandes.pdf creating my
*.its file. I don't know why, but Joel used @1 everywhere. I've
removed '@1' and it is working. As far as I understand you need this
really only to create unique nodes of the same "type".
> For selecting between different configurations depending on the board,
> it would be nice to be able to reuse the DT board compatibles.
>
> Regards,
> Jan
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
More information about the barebox
mailing list