mirage/mirage-www — pull request #38 by djs55 (2013-10-12 21:17:00+00:00)
Title: Support reading static data from block devices

The webserver now has a list of 'resources' which are
threads which, if they return, are objects supporting
a 'read' method. The resources are interrogated in order
when looking up URI paths.

By default we have a 'disk' resource thread which
unblocks if a block frontend is connected. Next we have
a 'static' resource which represents the kv_ro built-in
crunched filesystem.

The disk data is assumed to be in a simple tar format.
You can create the disk by:

cd files
tar -cf $HOME/www.tar .
sudo losetup /dev/loop0 $HOME/www.tar

and then adding '/dev/loop0' to the VM via an xl config
file entry:

disk=[ 'phy:/dev/loop0,xvda,w' ]

Signed-off-by: David Scott

NB this won't work without
* mirage/ocaml-xen-block-driver#4
* mirage/mirage-platform#51
* djs55/ocaml-tar#3