Experimenting With Xinu
There are several recent versions of Xinu available for an x86 architecture
hardware board, an ARM architecture hardware board, and Oracle's (free) VirtualBox
hypervisor.
In our lab, we use two computers for Xinu: a conventional computer used to compile a Xinu image, and second,, otherwise idle, back-end computer, into which we download and run the image. The second edition of the text contains code for both the Intel x86 (Galileo) and ARM Cortex 8 (BeagleBone Black), and the code is freely available. Either of the platforms is relatively inexpensive and available from commercial web sites.
There are several ways to experiment. For the BeagleBone Black, the quickest was to get started involves using a serial cable. Connect the serial cable from the BBB to a PC, download a Xinu image over the serial cable, and then enter a command that causes the BBB to run the image. You can download a instructions that explain the above in detail for the BeagleBone Black; there are two sets:
- A github repository with instructions by Jamie Arrocha.
- A text document with instructions from students at Purdue.
For the Galileo, the quickest way to get started involves using an SD memory card and a serial cable. Connect the serial cable from the board to a PC (inexpensive cables are all that one needs). Run a terminal emulator, such as minicom to display the serial output in a window on the PC. Plug the SD card into the PC, compile Xinu and load the image onto the SD card. Unplug the SD card from the PC and plug it into the experimenter board. Boot the board, and use the console serial connection to boot the image from the SD card. Output from Xinu will be displayed over the serial line.
The second way to experiment takes more time to set up, but allows one to
recompile and download quickly once the pieces are in place.
As described above, a serial line must be connected from the experimenter
board to a PC.
In addition, one must: connect a board to an Ethernet switch, connect a PC
to the same switch, configure the board to boot over the network,
and configure the PC to run DHCP and TFTP server processes that supply
the information needed to boot.
Once all the above has been set up, it is possible to compile Xinu, place
the image in a file on the PC, and then power-cycle the experimenter
board to boot the Xinu image automatically.
We use this approach in the lab to enable a rapid edit-compile-download-test
cycle.
You can download a
document that explains the above in detail for the Galileo board (both Generations 1 and 2).
We enthusiastically endorse the two approaches above because they allow Xinu to
run on real hardware and provide users with the best experience in designing
systems.
For situations in which users cannot afford an experimenter board or prefer
not to touch real hardware, we have a version of Xinu that runs in a Virtual
Machine (VM) environment, which means it can run on a conventional computer
with no extra hardware.
The Virtual Box version is based on code from the second edition of the text,
but has a few differences.
For example, because the emulated console uses port-mapped I/O instead of memory
mapped I/O, the fetch and store operations on CSRs in the Xinu tty driver have
been replaced by calls to macros that either generate port-mapped or memory
mapped refernces (the macros are defined in io.h).
Because the emulated Ethernet differs from the Galileo Ethernet, the Ethernet
driver has been replaced.
Finally, references to other memory-mapped functions have been replaced (e.g.,
the low-level PCI bus functions have been reverted to use the generic x86
version).
Xinu Code Available For Download:
Versions For The Second Edition Of The Text (the second edition was published
in 2015).
Note: the interrupt mechanisms in the x86 versions has been upgraded from the text to
use a newer x86 interrupt controller.
that contains helpful installation hints.
Older versions of Xinu (especilaly those for other architectures) can be found
.png)
![Rockstar fired developers looks like "union busting" [video]](https://www.youtube.com/img/desktop/supported_browsers/edgium.png)