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

Re: [MirageOS-devel] Mirage on Xen/ARM status



On 11 June 2014 17:27, Thomas Leonard <talex5@xxxxxxxxx> wrote:
> On 5 June 2014 21:29, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
>> On 4 Jun 2014, at 13:33, Thomas Leonard <talex5@xxxxxxxxx> wrote:
>>
>>> An update on the Mirage/ARM port:
>>>
>>> I have mirage-platform upgraded to the new Mini-OS (plus openlibm and
>>> no libc). Networking is working again on x86_64 (I can telnet to the
>>> mirage-skeleton/network service and send it a message), but not on ARM
>>> yet.
>>
>> Good to have x86_64 back!  It's probably a good idea to CC me and Dave
>> on the patchbombs to xen-devel, as I only sample the list these days
>> due to mail volume.
>>
>>> This required some changes to Mini-OS to expose the grant table
>>> details and to stop Mini-OS's xenbus from stealing the event
>>> notifications. I need this clean this up.
>>
>> To be clear, this is networking using lwIP on ARM isnt it?  For Mirage,
>> the MiniOS Xenbus should be disabled entirely since our own OCaml
>> Xenstore will handle everything.
>
> By default, minios's event handler calls do_event on each event, and
> loops until they're all handled, so I had to disable that code.
>
>>> OCaml's Random currently tries to open /dev/urandom, which fails.
>>> Looks like it falls back to using gettimeofday in that case. It logs a
>>> message to the console ("Attempt to open(/dev/urandom)!"), so
>>> hopefully we'll remember to fix it eventually.
>>
>> Is this initialised forcibly anywhere, or only when someone calls
>> a Random.self_init()?  We need to deprecate this module in Mirage and
>> ensure that we have a randomfront/back model, or risk introducing
>> poor entropy.  This hasn't mattered so far, but will be critical when
>> we activate the OCaml TLS library that Hannes and David are working on.
>
> The TCP/IP stack seems to want it.
>
>>> Networking doesn't work on ARM as the code wants to use start_info,
>>> which doesn't exist. I might try making a fake start_info page on ARM
>>> rather than modifying everything else.
>>
>> Yep, sounds like a good plan to ease x86/ARM transition.
>
> Here are some instructions for testing the current version of
> everything (hacks and all!):
>
> To test Mirage on Xen/ARM:
>
> These instructions are for building on a soft-float ARM machine (or
> VM), running on the board itself. If you prefer, you can cross-compile
> Mini-OS and openlibm and copy the files across (the cross compiler
> can be hard-float or soft-float; use DESTDIR=... to stage the files):
>
>   make XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf-
>
> However, it doesn't save much time and you still need to build the
> OCaml code on the machine itself.
>
>
> 1. Install libminios.a
>
> git clone -b arm-preview https://github.com/talex5/xen.git mini-os
> cd mini-os
> ./configure
> cd extras/mini-os
>
> make CONFIG_TEST=n CONFIG_XENBUS=n CONFIG_START_NETWORK=n
> CONFIG_BLKFRONT=n CONFIG_NETFRONT=n CONFIG_FBFRONT=n CONFIG_KBDFRONT=n
> CONFIG_CONSFRONT=n CONFIG_XC=n -j4 install
>
> 3. Get openlibm and install
>
> git clone https://github.com/JuliaLang/openlibm.git
> cd openlibm
> make install
>
> 4. Pin mirage-platform
>
> git clone -b arm-preview https://github.com/talex5/mirage-platform.git
> opam pin mirage-xen ./mirage-platform
>
> 5. Pin mirage-console
>
> git clone -b arm-preview https://github.com/talex5/mirage-console.git
> opam pin mirage-console-xen ./mirage-console
>
> 6. Pin mirage
>
> git clone -b arm-preview https://github.com/talex5/mirage.git
> opam pin mirage mirage
>
> 7. Build mirage-skeleton/console
>
> git clone git://github.com/mirage/mirage-skeleton.git
> cd mirage-skeleton/console
> opam install mirage
> mirage configure --xen
> make
>
>
> The next step is to get networking working on ARM.

This seems to be working now (I can telnet to port 80 and send it a
message), which it displays on the console.

The main problem turned out to be ones_complement_checksum_bigarray,
which was doing unaligned double-word (64-bit) memory access. This
faults on ARM. For testing, I replaced it with the version in the unix
directory.


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

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