device tree passing feature

Samuel Mendoza-Jonas sam at mendozajonas.com
Fri Jul 1 11:46:21 AEST 2016


On Thu, 2016-06-30 at 11:27 -0300, Thiago Jung Bauermann wrote:
> Hello,
> 
> I have a question about the petitboot feature which allows the user to 
> specify a device tree blob to pass to the target OS being loaded. What is 
> the use case for it? Is it a debugging and development aid, or do you expect 
> it be useful in a production environment?

Hi Thiago,

Passing the dtb isn't really a Petitboot feature, rather part of how
kexec works for PowerPC and ARM. Petitboot may make modifications to, or
replace the dtb, but the method via with the target kernel obtains its
device-tree is kexec. So I suspect you would have to say it is mandatory
for production.

> 
> I ask this because I'm implementing the kexec_file_load system call for 
> powerpc, and given its prototype:
> 
> long kexec_file_load(int kernel_fd, int initrd_fd, unsigned long 
> cmdline_len, const char *cmdline_ptr, unsigned long flags)
> 
> It wouldn't be very straightforward to allow the caller to specify a device 
> tree blob, so I have to ask how necessary such a feature is.

Yep, I think the problem is kexec_file_load was first implemented with a
focus on x86 where this isn't an issue, and now we need to consider what
to do :)

We are definitely going to need a way to pass the device-tree to the
target kernel - whether we do that by changing the prototype for
kexec_file_load() PowerPC and ARM, or by dealing with it some other way
I'm not sure. Sounds like the start of a interesting conversation on the
linuxppc-dev list :)

Cheers,
Sam

> 
> 
> []'s
> Thiago Jung Bauermann
> IBM Linux Technology Center
> 
> _______________________________________________
> Petitboot mailing list
> Petitboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/petitboot



More information about the Petitboot mailing list