[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] MirageOS fortnightly call - Wednesday 29th at 4pm BST (GMT+1)

On 29 July 2015 at 17:12, Geoffroy Couprie <contact@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Jul 29, 2015 at 5:52 PM, Thomas Leonard <talex5@xxxxxxxxx> wrote:
>> To follow up on the Mini-OS testing, as the audio kept breaking up:
>> You can install Xen in Debian inside VirtualBox and use that for testing.
> I installed XenServer in a VirtualBox, it seems to work. I'll have to
> look at the options to cross compile from OSX, though, because right
> now, I'm building the image on a server, putting it on a HTTP server,
> downloading to the Xen machine and starting it from there.

Well, if you're running VirtualBox anyway, I guess you might as well
use a Linux guest (or dom0) for building...

>> You can run "make" in the Mini-OS directory to build a "mini-os"
>> kernel image, which can be run directly. There are various options
>> that can be used, e.g.
>>   make CONFIG_TEST=y
>> To test a modified Mini-OS with Mirage:
>> 1. First, follow the Mirage guide to check you can run with the
>> existing version:
>>   https://mirage.io/wiki/install
>> 2. Run "opam pin add minios-xen ." in your mini-os Git checkout.
>> 3. In a mirage-skeleton example, do a "make clean && make".
>> Reinstalling the minios-xen opam package will recompile everything
>> that depends on it, which is a bit slow. Unless you're changing the
>> header files or pkg-config metadata, you can do a quick test with:
>>   make && make install PREFIX=`opam config var prefix`
>> Then just "make" in your unikernel directory (e.g.
>> mirage-skeleton/console) to link with the new libminios.a.
> Ok, I'll do this next. Right now this is what I have:
> - for the test, I renamed init_mm to init_mm_real
> - I made a Rust project built without libstd, exporting init_mm and
> fini_mm, importing printk and init_mm_real
> - my version of fini_mm does not do anything, init_mm prints "Hello
> from Rust, world!\n\0", calls init_mm_real, then prints "Good bye from
> Rust, world!\n\0". It is not much, but at least, we see they can
> interact
> The image can be downloaded at http://dev.unhandledexpression.com/mini-os.gz
> Now that I have a proof of concept, I'll make a better integration in
> the build system.

The Mini-OS build system is pretty bad, and I hope we can replace it
completely at some point for the Rust version. Previously, we've tried
to keep things similar to upstream so we can merge our changes back,
but it adds a lot of complexity (especially because some other bits of
Xen - the "stubdoms" - hook into it in some unclean and
impossible-to-debug way).

For the Rust version, I guess we can make a minimal base package, and
have the optional bits in separate crates, right?

Dr Thomas Leonard        http://roscidus.com/blog/
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.