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

Re: [MirageOS-devel] libminios/openlibm support ready for testing



On 6 July 2014 18:51, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
> On 4 Jul 2014, at 13:50, Thomas Leonard <talex5@xxxxxxxxx> wrote:
>>
>> You can install libminios elsewhere with e.g.
>>
>>  $ make install LIBDIR=/tmp/foo/lib INCLUDEDIR=/tmp/foo/include
>>
>> Just remember to set PKG_CONFIG_PATH to find it again:
>>
>>  $ PKG_CONFIG_PATH=/tmp/foo/lib/pkgconfig pkg-config --libs libminios
>>  -L/tmp/foo/usr/lib/pkgconfig/../../lib/mini-os -lminios -T
>> /tmp/foo/usr/lib/pkgconfig/../../lib/mini-os/libminios.lds -m
>> elf_x86_64 -lx86_64
>>
>> (note: it does assume that LIBDIR and INCLUDEDIR have a common parent)
>>
>> For openlibm, use:
>>
>>  $ make install prefix=/tmp/foo
>>
>> I guess someone with OPAM skills could do this pretty easily...
>
> Done.  I put a small package called 'xen-minios' into:
>
> https://github.com/mirage/opam-repository in the external-minios branch.
>
> It just runs the `install.sh` in this repository:
>
> https://github.com/mirage/mirage-xen-libs
>
> which downloads and installs our openlibm/minios forks into the
> ~/.opam dirspace (or optionally into some other PREFIX if specified).
>
> I think it might be a good idea to maintain this library (perhaps with
> a better name, like mirage-xen-minios) in the future, since it's a
> convenient place to apply distribution-specific patches to MiniOS
> (like cleaning up the startup text to be prettier), and also to
> control which versions of libm go in.   How about I rename the
> repository to mirage-xen-minios, and cut a release tarball that bundles
> the upstream .tar.gz files (so `make install` can run without any
> external downloads)?

That would be great!

> Once that's done, I just needed a few minor patches to your
> mirage-platform pull request:
>
> - The symlink handling in OPAM is annoying right now, since it
>   destroys them from the source repository.  On the other hand,
>   the only reason we have symlinks in mirage-platform is to support
>   two concurrent revisions of OCaml (4.00.1 and 4.01.0).  I think
>   it's time to retire 4.00.1 (especially with the ARM code gen
>   fixes in 4.01.0), so I've removed it entirely and made the only
>   supported runtime 4.01.0.
>
> - I exported PKG_CONFIG_PATH from the xen/Makefile. ThomasG and I
>   had a quick chat about how best to support this from OPAM, but the
>   easiest way right now is to run `opam config var prefix` to
>   determine the active compiler switch, and set the variable based
>   off that.

Seems fine. I guess it's OK to override the user's $PKG_CONFIG_PATH
here (rather than prepending to it), since all dependencies should be
in OPAM anyway.

> I've put these patches into:
> https://github.com/mirage/mirage-platform/pull/94
>
> And it boots on x86_64! A little more verbose as expected:
>
> Mapping memory range 0x400000 - 0x10000000
> setting 0000000000000000-00000000000de000 readonly
> skipped 0000000000001000
> MM: Initialise page allocator for 28e000(28e000)-10000000(10000000)
> MM: done
> Demand map pfns at 10001000-2010001000.
> Initialising timer interface
> Initialising console ... done.
> gnttab_table mapped at 0000000010001000.
> xencaml: app_main_thread
> getenv(OCAMLRUNPARAM) -> null
> getenv(CAMLRUNPARAM) -> null
> Unsupported function lseek called in Mini-OS kernel
> Unsupported function lseek called in Mini-OS kernel
> Unsupported function lseek called in Mini-OS kernel
> getenv(OCAMLRUNPARAM) -> null
> getenv(CAMLRUNPARAM) -> null
> getenv(TMPDIR) -> null
> getenv(TEMP) -> null
> hello
> world
> hello
> world
> hello
> world
> hello
> world
> hello
> world
> main returned 0
>
> And static_website worked too, so networking is fine too:
>
> $ curl -v 10.11.12.76
> * Rebuilt URL to: 10.11.12.76/
> * Hostname was NOT found in DNS cache
> *   Trying 10.11.12.76...
> * Connected to 10.11.12.76 (10.11.12.76) port 80 (#0)
>> GET / HTTP/1.1
>> User-Agent: curl/7.37.0
>> Host: 10.11.12.76
>> Accept: */*
>>
> < HTTP/1.1 200 OK
> < content-length: 59
> <
> <html>
> <body>
> <h1>Hello Mirage World!</h1>
> </body>
> </html>
> * Connection #0 to host 10.11.12.76 left intact
>
> Now resurrecting a Cubieboard2 to try it on ARM :-)

Cool :-) Don't forget you'll need the arm-preview branch of
mirage-platform for that (it works, but isn't ready for merging).


-- 
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®.