jondavidford / weever-snapshot

A snapshot of the current working version of weever, along with boot scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

---------------
WEEVER SNAPSHOT
---------------
This repository stores a snapshot of our modified Weever bootloader that successfully loads and jumps into the Nautilus kernel on the Intel Phi Coprocessor

-----------------
OUR MODIFICATIONS
-----------------
In order to get Weever to load Nautilus, we had to remove several checks from Weever that were only relevant for a Barrelfish boot process. This included checking the Phi ID and checking that location in memory of various structs did not overlap with their copy destinations. In addition, we removed the call to elf64_relocator() in loader.c because Nautilus does not have any modules that need to be relocated as barrelfish does.


-------------------------------
INSTRUCTIONS TO USE BOOT SCRIPT
-------------------------------
These instructions show how to load the Xeon Phi with a custom
OS image, be it a Linux-like one or a general ELF format. 

first reset the Xeon Phi, so that it appears in the 'ready' state:
$> micctrl --reset mic0

to make sure it is really shut down and in the 'ready' state, run:
$> micctrl -s

to see the status. It should read as 'ready'.

when it is shut down and in the 'ready' state, we can then load our own
OS image onto the Phi:

for the mics you care about, it's as easy as:

$> echo boot:linux:<linux_path>:<initrd_path> >  /sys/class/mic/micN/state

for Linux. Or for ELF:

$> echo boot:elf:<elf_path> >  /sys/class/mic/micN/state

I've written a utility to do this for you, and then wait for a doorbell
that I've added from a modified version of the Weever bootloader

$> ./boot_phi_and_wait -t 60 

where the '-t' flag is the timeout. Default is 60 seconds.

The code is decently commented, and should be mostly self-explanatory. 

About

A snapshot of the current working version of weever, along with boot scripts


Languages

Language:C 80.2%Language:Assembly 13.6%Language:Shell 5.8%Language:Makefile 0.4%