WiP - Eye of Mirage
This aims to be a portable image viewer based on MirageOS, using mirage-framebuffer solely using pure image rendering code - (no image libraries written in C).
The goal is to be able to use the same unikernel code to
- be able to display an image, or a a directory containing images, on Linux/FreeBSD/MacOSX.
- implement a QRExec-based Qubes AppVM that will display images transferred to it from other VMs.
PNG rendering of rainbow.png, with text and calibration pixel (different set of pixels) overlays on Qubes (yellow window) and SDL/Linux (blue window).
Current limitations / feature list
This is very much a work-in-progress, so there's a lot of things that do not work. Off the top of my head:
It only displays one image, and there is no way to change.
Pixel color blending is not implemented; all you get is shades of red.
- Transparency is not implemented.
- Only PNG images are supported.
- No scaling of the image is done.
- Configurable zoom
The only target supported so far is Qubes (hardcoded).-t unix now supported
- On which receiving images via QRexec is not implemented.
On which images are rendered upside-down.
-t unixit should be able to open a file or directory passed on the command-line instead of having to compile them in
- instead of
ocaml-crunchfor compiled-in things it should probably use the ppx_literal or whatever that ppx is called.
This is a bit of a mess since it relies on a bunch of patches that have not been upstreamed yet, working on that.
opam pin add mirage --dev -k git 'https://github.com/cfcs/mirage#fix_qubes' opam pin add mirage-xen --dev -k git \ 'https://github.com/cfcs/mirage-platform#virt_to_mfn' opam pin add mirage-qubes --dev -k git \ 'https://github.com/cfcs/mirage-qubes#guid_mvar' opam pin add mirage-framebuffer --dev -k git \ 'https://github.com/cfcs/mirage-framebuffer#master' opam pin add mirage-framebuffer-qubes --dev -k git \ 'https://github.com/cfcs/mirage-framebuffer#master' opam pin add mirage-framebuffer-imagelib --dev -k git \ 'https://github.com/cfcs/mirage-framebuffer#master' opam install lwt ocaml-crunch mirage-clock-freestanding mirage-logs \ mirage-runtime mirage-types-lwt ocamlbuild vchan cstruct \ 'imagelib>=20171028'
Setup for Qubes
- Compile image to an OCaml module
mkdir images/ cp image-to-display images/image.png ocaml-crunch -m plain -o myfiles.ml images/
- Follow the instructions at https://github.com/talex5/qubes-test-mirage
Building and running
make clean mirage configure -t xen && make ../qubes-test-mirage/test-mirage eye_of_mirage.xen mirage-test