[U-Boot] [PATCH v1 0/4] Add FIT support for falcon boot

york sun york.sun at nxp.com
Fri Jun 9 18:48:40 UTC 2017


On 05/19/2017 02:56 AM, Andre Przywara wrote:
> Hi York,
> 
> On 16/05/17 16:54, york sun wrote:
>> On 05/15/2017 10:42 PM, Lokesh Vutla wrote:
>>> + Andre
>>>
>>>
>>> On Monday 15 May 2017 09:31 PM, York Sun wrote:
>>>> This patch set adds FIT support for falcon boot. GZIP is enabled
>>>> to supported compressed image.
>>>
>>> Did you get a chance to look at Andre's "SPL: extend FIT loading
>>> support"[1] patch series? This series addresses similar problem in a
>>> more generic way.
>>>
>>> [1] https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mail-archive.com%2Fu-boot%40lists.denx.de%2Fmsg246692.html&data=01%7C01%7Cyork.sun%40nxp.com%7C63ec3a7e245445e2253d08d49c1e542b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=XrCyv6JBg02fwP7MEMo1hg8rVCOGnEQ741Hs0oLwZVg%3D&reserved=0
>>
>> I only received partial patches from Andre's set. Looks like that set
>> should cover my changes by supporting multiple images. I was focusing on
>> a fast boot path for the past two months. I can rebase my patch once
>> Andre's set is merged.
> 
> FYI: My patches have been merged into u-boot-sunxi/master[1], which is
> based on origin/master as of earlier this week.
> I take it they get merged into origin before -rc1, but meanwhile you
> could base on u-boot-sunxi/master.
> 

Andre,

Reading through your commits, I am glad to see you can support multiple 
images. My understanding is you use "loadables" to indicate extra images 
to load after loading U-Boot. The spl_image->entry_point is set to 
either the last image's entry point (if set), or to the 
spl_image->load_addr. Do I get it right?

When you process the images, if there is a "firmware" image, you presume 
it is U-Boot and load it. If no such image, you take the first image in 
"loadables", presuming it is U-Boot. Do I understand you correctly? In 
your example its file, you demonstrated multiple "firmware" images, and 
U-Boot has type of "standalone". Since you didn't put "firmware" in the 
config node, I presume you would hit the "loadables". Correct?

While I try to rebase my patch on top of yours, I realize you still 
presume U-Boot image always exists. This is what I am trying to change 
for falcon boot. I think the easiest way is to leave "firmware" node 
absent in config node, and check the image type before setting 
spl_image->os. After that I can follow the code flow to load ramdisk, 
etc. I just have to add the "loadables" into my its. How about this flow 
with pseudo code

node = spl_fit_get_image_node(fit, images, "firmware", 0);
if (node < 0) {
	node = spl_fit_get_image_node(fit, images, "loadables", 0);
	index = 1;
}
if (node < 0)
	return -1;

if (image_type(node) == IH_TYPE_KERNEL) {
	index = 0;	/* reset to first image */
} else {
	/* presuming U-Boot */
	spl_image->os = IH_OS_U_BOOT;
	continue_to_read_device_tree();
}

/* check if there are more images to load */
for (; ; index++) {
	/* keep existing code */
}

What do you think?

I will need to modify spl_load_fit_image() a little bit to support 
compressed kernel image.

York


More information about the U-Boot mailing list