Giter Club home page Giter Club logo

mirage-solo5's Introduction

mirage-solo5 -- Solo5 core platform libraries for MirageOS

Do not install this package manually. If you came here from a search engine looking for information on MirageOS/Solo5, start here.

This package provides the MirageOS OS library for Solo5 targets, which handles the main loop and timers. It also provides the low level C startup code and C stubs required by MirageOS on Solo5 targets.

The OCaml runtime and C runtime required to support it are provided separately by the ocaml-solo5 package.

Development

$ git clone https://github.com/mirage/mirage-solo5
$ cd mirage-solo5
$ opam monorepo lock
$ opam monorepo pull
$ opam install ocaml-solo5 dune
$ dune build

mirage-solo5's People

Contributors

adamsteen avatar amirmc avatar avsm avatar balrajsingh avatar bonkf avatar crotsos avatar dinosaure avatar djs55 avatar djwillia avatar ehmry avatar hannesm avatar kit-ty-kate avatar lnmx avatar mato avatar palainp avatar pascutto avatar paurkedal avatar pgj avatar pqwy avatar samoht avatar talex5 avatar thelortex avatar timbertson avatar vbmithr avatar yomimono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mirage-solo5's Issues

licensing

The opam file advertises ISC as license, but some files - e.g. main.ml - include a LGPL 2.1 with static linking exception header.

In the meantime (June 2018, lwt 4.1.0, ocsigen/lwt#560) lwt was relicensed to MIT. I'd propose the folliowing:

  • update the copyright statement in main.ml to reflect lwt 4.1.0 license
  • figure out how compatible ISC and MIT are -- eventually it makes sense to relicense mirage-solo5 as MIT?

Command-line inputs: bad parsing?

While checking the documentation of MirageOS, more precisely the tutorial Hello MirageOS World, at the end of Step 1, I encountered an unexpected behaviour of the command-line parsing for the Solo5 backend.
Namely, if I do:
mirage configure -t hvt
make depend
make
./solo5-hvt -- hello.hvt --hello="simple test",
then I get the following error message:
[...]
hello: too many arguments, don't know what to do with "test"
[...].
It seems to be the cases for all inputs containing at least one white space.
However, it is not the case when I execute the equivalent commands for a Unix backend.
Moreover, it is not the case if the input is set as default value:
mirage configure -t hvt --hello="simple test",
then everything works fine.
I am using opam 2.0.0, mirage 3.2.0, mirage-solo5 0.4.0.

Port Mirage/Solo5 packages to Dune

This concerns the following packages:

  • mirage-block-solo5
  • mirage-bootvar-solo5
  • mirage-console-solo5
  • mirage-net-solo5
  • mirage-solo5 (@hannesm #58)

Notably, ocaml-freestanding and Solo5 itself (solo5-bindings-*) are not in scope here as these use a Makefile-based build system and Solo5 itself should not depend on any OCaml tooling.


This will allow easier iteration (starting with vendoring) on barriers and discard which Wodan needs.

@pascutto has already ported mirage-block-solo5.
As @mato points out, we should keep a single build system for Solo5, so port the other device packages as well as mirage-solo5 itself.

mprotect: EACCES

Running the speaking_clock example from mirage-skeleton fails on my freshly-installed alpine-3.6.1 machine with mprotect:...EACCES according to strace.

The binary successfully

  • opens /dev/kvm
  • opens speaking_clock.ukvm
  • reads the ELF contents from speaking_clock.ukvm
  • fails the mprotect

This is with v0.2.1 of mirage-solo5 if that's relevant.

{block, net} stubs: Cstruct.buffer.off is ignored

Cstruct buffers may be slices of larger buffers and in this case it is not sufficient to pass just the pointer to the buffer and length to a C stub, but the internal offset into the buffer must also be passed.

The following C stubs which accept a Cstruct buffer all suffer from the same issue, initially discovered during the Marrakesh retreat:

  • mirage_solo5_block_read, mirage_solo5_block_write
  • mirage_solo5_net_read, mirage_solo5_net_write

This has not been a problem until now, since the network stack (mirage-tcpip) does not use slices, and no one has exercised the block code beyond the simple test in mirage-skeleton which does not do this either. With the availability of Wodan this changes, so at least the block stubs and mirage-block-solo5 need to be updated. Given that this requires an incompatible interface change, I will also update the network stubs and mirage-net-solo5 for consistency and future-proofing.

/cc @hannesm @g2p

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.