On Friday, 27.11.2015 at 16:48, Justin Cormack wrote: > > Can anyone think of a better way of passing the JSON configuration to a > > rumprun/hw unikernel that: > > Use the initrd protocol? Pass the json file as the "inird"?
Good idea, but ... using an initrd requires implementing the entire Linux/x86 boot protocol [1] which is quite a lot of work (not to mention crufty as hell). Having said that, you got me thinking along the right lines -- multiboot does support loading additional modules, and if I'm reading the spec [2] right those are just arbitrary blobs i.e. not ELF or otherwise interpreted by the boot loader. This is what we want as it doesn't require keeping a toolchain around for deployment. Also, AFAICT QEMU/KVM also support module loading (overloaded on the -initrd command line option since *of course* it's the same thing). I'll have a crack at implementing config loading via a multiboot module and see how it goes. [1] https://www.kernel.org/doc/Documentation/x86/boot.txt [2] https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
