Skip to content

Tutorials

Aditya Vaidyam edited this page Jul 28, 2016 · 1 revision

##Using Xinu on Purdue's network.

Anyone can clone a copy of the Xinu source code from the Github page. However, running Xinu is slightly more complicated. The Xinu lab at Purdue University has created an environment that makes running Xinu easy for developers. The following is a step-by-step tutorial on how to set up your Xinu development environment.

Note: This tutorial assumes that you are affiliated with Purdue University and that you have a valid computer account within the Purdue Computer Science department.

  1. First, you must add the /p/xinu/bin path to your PATH environment variable. To do so, open your ~/.bashrc file in any editor you choose and add the following line to the end of the file: export PATH=${PATH}:/p/xinu/bin. This change will not take effect until your next login. To force the change to take effect immediately, run source ~/.bashrc.

  2. Once you have made changes to the Xinu code that you would like to test, you must compile Xinu. To do this, navigate to the compile directory within the Xinu project directory and run make. If there are no errors, Make will produce a file called xinu. This is your Xinu image.

  3. From the Xinu compile directory, run the command cs-console -c quark. This command will automatically locate the first available Galileo machine on the network and connect to it.

  4. Once you are connected to an available Galileo machine, type (control-spacebar). This will escape to a simple command prompt.

  5. In the command prompt, type d. You will be prompted for a filename. Type xinu and press enter. The backend machine will download your Xinu image. It should take less than 5 seconds to download.

  6. Once your Xinu image has been downloaded, escape to the command prompt again by typing (control-space). From there, type p. This will powercycle the machine.

  7. Wait for the backend machine to reboot. Do not press any keys during this process. Once the backend machine reboots, it will begin running your Xinu image.

  8. When you have finished running Xinu, type (control-spacebar) to escape to the console, and then type q to quit. This is an important step because it frees up the backend machine for others to use in the future.

##How To Setup Xinu on VirtualBox

  1. Create a new VM named Xinu, with type and version set to "other," 256 MB of memory, and a VMDK fixed state virtual hard drive of size 1 GB.

  2. Create a serial device in the created VM by navigating to VM -> Settings -> Serial Port -> Port1.

VM -> Settings ­-> Serial Port -> Port1

Enable Serial Port

Port Mode: Host Pipe

Create Pipe(check)

Port/File Path: Path to a pipe file(file doesn’t need to be existing, it’ll be created)

Clone this wiki locally