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

Re: [MirageOS-devel] Xen/Mirage on a Cubieboard 2 [REPORT]



Hi Nicolas,

I believe you need more recent versions of mirage, mirage-xen and tcpip than those that are currently available in opam.

Take a look at Thomas Leonard's blog post here: http://openmirage.org/blog/introducing-xen-minios-arm - in particular the 'opam pin' commands.

Good luck!

Jon


On 15/09/14 23:23, Nicolas Ojeda Bar wrote:
Dear list,

Recently I came into possession of a Cubieboard 2 (Thanks Anil!) and set out to
install Xen/Mirage guided by the following sets of instructions:


TL;DR: The link to the pre-built binaries in [1] is broken, but building from
source I was able to successfully install mirage on the Cubieboard and run the
UNIX version of the Hello, World! unikernel.  However, the Xen version did not
work because the opam package mirage-xen 1.1.1 did not compile (some command
line options were not recognized by cc).  The full build log is at

It seems that this problem should be quite easy to solve by someone more
knowledgeable than me.

I am also sharing the exact steps I took to set up the Cubieboard in case they
are of use to someone else.

Best wishes,
Nicolas

How to install Xen/Mirage on a Cubieboard 2
-------------------------------------------

This is a record of what I had to do to install Xen on a Cubieboard 2.  I am
sending it to the list in case it is of use to someone else.

Before we start, ingredients:

        - MacBook Pro, Early 2011, OS X 10.9.4, 8GB RAM.
   
        - Cubieboard 2.
          See pic here: http://s28.postimg.org/xdou7ajvx/image.jpg

So, let's get started.


        Click on the link that advertises a pre-built binary for the cubieboard2
        and realize that it is not working.  We have to build from source.

Step 2: Get VirtualBox for OS X from https://www.virtualbox.org (Downloads >
        VirtualBox 4.3.16 for OS X hosts). Run the provided installer.

Step 3: Get Ubuntu Server 14.04.1 LTS from www.ubuntu.com/download/server.

        Save the image ubuntu-14.04.1-server-amd64.iso somewhere where you can
        find it.

Step 4: In VirtualBox, create a new vm (OS Type: Ubuntu 64-bit).

        I assigned 2GB RAM (out of a total of 8GB) and 8GB Hard drive (this
        turned out to be extremely tight to build xen-arm-builder, so I
        recommend making it at least 9GB to give yourself some more room).
        
        When prompted for an installation CD, locate the ISO file that you
        downloaded in Step 3.

Step 5: Follow the prompts and install Ubuntu.

        Make sure to install sshd when prompted (we want to avoid having to use
        the VirtualBox UI at all costs).

Step 6: (Optional?) Fix the Wi-Fi in VirtualBox.

        For some reason the network speeds in VirtualBox would start up ok and
        then suddendly slow down to a crawl.  After some googling and some blind
        guessing I could solve it for my setup.

        Simply go to Settings > Network and change the drop-down menu 'Attached
        to:' from 'NAT' to 'en1: Wi-Fi (AirPort)'. Click OK and restart the VM.
        Log in and type 'ifconfig'. Note the 'inet addr' of the 'eth0' interface.

Step 7: SSH into the VM from your normal (OS X) terminal.

        Open a terminal and type 'ssh <user>@<ip>' where <ip> is the address
        from the previous step. Log in.

Step 8: Install git and clone xen-arm-builder from github.

        sudo apt-get install git
        cd xen-arm-builder

Step 9: Follow the instructions in the xen-arm-builder README.

        export BOARD=cubieboard2
        make clone
        make build
        make cubieboard2.img
        # Exit the ssh session
        exit
        # Get the cubieboard2.img file over to the OS X side
        scp <user>@<ip>:xen-arm-builder/cubieboard2.img .

        # Insert SDcard into your computer and copy the .img file into it

        # Find the disk device of the card you inserted, say diskN
        sudo diskutil list
        # Unmount the disk images
        sudo diskutil unmountDisk /dev/diskN
        # Copy the image - This automatically remounts the disk
        sudo dd if=cubieboard2.img of=/dev/rdiskN bs=64k
        # Unmount the image and eject
        sudo diskutil unmountDisk /dev/diskN

        # Insert SDcard into Cubieboard, connect the Cubieboard power & network.

        # The cubieboard will obtain an IP address via DHCP and will also
        # broadcast itself on Bonjour (Zeroconf) under the name
        # 'cubieboard2.local.' (note the dot at the end).  So you should be able
        # to connect the cubieboard to your local network with an ethernet cable
        # and then do

        ssh mirage@xxxxxxxxxxxxxxxxx.

        # (password is 'mirage') and voila! you're connected.

Step 10: Install Mirage.

         # We follow the instructions at http://openmirage.org/wiki/install,
         # except that we can skip the first section, 'Requirements'.

         opam init
         eval `opam config env`
         opam install mirage

Step 11: Build Hello, World! example, UNIX version.

         cd mirage-skeleton
         cd console
         mirage configure --unix
         make depend
         make
         ./mir-console

Step 12: Build Hello, World! example, Xen version [FAILED!].

         mirage configure --xen

         Fails while compiling mirage-xen 1.1.1 with the C compiler cc
         complaining about some unrecognized command line options

         cc: error: unrecognized command line option ‘-m64’
         cc: error: unrecognized command line option ‘-mno-red-zone’
         cc: error: unrecognized command line option ‘-momit-leaf-frame-pointer’
         cc: error: unrecognized command line option ‘-mfancy-math-387’

         The full log is at <https://gist.github.com/nojb/b7972e42e317160771c5>.



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

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