On Fri, 2014-06-06 at 19:48 +0800, Fu Wei wrote:
On 06/06/2014 07:10 PM, Ian Campbell wrote:
On Fri, 2014-06-06 at 17:00 +0800, Fu Wei wrote:
multiboot_fdt.c would be a better name than multiboot_xen.c, if that's what you intend the abstraction to be about, but TBH this seems like a premature refactoring to me. If/when someone invents up "multiboot over $SOMETHING_ELSE" then refactoring can be done then.
For multiboot_xen.c, it includes (1)the boot info injection into FDT for multi binaries(following xen specific boot binaries order) (2)the xen specific compatibility strings and other info
The intention with http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot was that nothing there was really Xen specific. I think this is the case.
Although it includes some FDT-related code, it is not for fdt. It is for Xen.
Well, Xen is a consumer of this interface but the interface itself is supposed to be more widely useful than that.
Remember that this multiboot stuff is intended to be generic, even if Xen people are involved in defining it and Xen is currently the only user. I really want to avoid defining something which cannot be used by someone else if they want.
For making this multiboot stuff to be generic(multiboot_fdt.c), I suggest that:
We avoid using xen specific boot binaries order, only use --type="multiboot,*" to define the compatibility strings of the module.
if the user did not provide --type="multiboot,*", we assume the compatibility string is "boot,module".
I think we should only go halfway to what you propose here.
We should avoid the "xen,*" strings for sure, and use the "multiboot,*" names instead. But I think it is still OK to define a useful set of default compat strings based on the common case, i.e. first module is "multiboot,kernel" by default and second is "multiboot,ramdisk" in addition to the "multiboot,module" which is common to everything.
Dropping this defaulting behaviour would require increasing the scope of this work to cause update-grub on ARM to inject the correct --type arguments when creating the multiboot entries.
Ian.