Setting up Xinu Development and Back-end in VirtualBox

Posting this for anyone unlucky enough to have to set this up, and for anyone desperate enough to be searching the blogosphere for help…

Setting up XINU in VirtualBox

XINU is a teaching tool, as such, users will want to make changes to it quickly and frequently. Using VirtualBox, and open-source virtual machine sandbox program, development and back-end environments can be created and linked on an internal network. The development machine will act as a standardized programming machine. It is a basic Debian install that contains the XINU source code. The back-end machine will boot from VirtualBox’s internal network and run the compiled version of the code.

Installing VirtualBox (Linux / OSX )

  • VirtualBox can be freely downloaded from https://www.virtualbox.org/wiki/Downloads be sure to download the correct version for the distribution you are using.

  • Alternatively, VirtualBox can be downloaded using a software package manager such as aptitude or apt-get. (sudo apt-get install virtualbox)

Installing VirtualBox (Windows)

Obtaining XINU

XINU is available for many different systems and architectures. The current focus of development is to bring it to even more. This guide focuses on the Virtual Machine implementation.

The VM implementation of XINU is available as two “virtual appliances”, essentially pre configured virtual machine settings, in the public FTP of the University of Purdue.

  1. Connect using FTP to ftp.cs.purdue.edu

  2. Use anonymous login when prompted

  3. execute the ‘bin’ command, for binary transfer

  4. get ‘xinu-appliance.tar.gz’ this contains the two VirtualBox appliances

  5. untar the package

Importing and Configuring XINU

Once the XINU package have been downloaded and extracted, there should be two appliances, develop-end.ova and back-end.ova . Import these two appliances into the newly installed VirtualBox.

Leave all the settings as their defaults, and repeat the import for the second appliance.

In settings, under serial ports, you will want to set BOTH appliances to the same settings, with the addition of checking “Create pipe” for the development machine.

The path setting will vary depending on the operating system you are using. For instance,

in windows, use “\\. \pipe\xinu_com1”. Linux/OSX users will enter something like “/tmp/xinu_com” . This is the link between the two machines. The back-end machine is by default set to boot from the network. Once these settings are edited, you are ready to compile and run XINU!

Running XINU in VirtualBox

XINU is run by first compiling and “uploading” the resulting binary file to a location that the back-end can boot from.

  1. Start the develop-end VM

  2. When prompted, enter ‘xinu’ for the username, and ‘xinurocks’ for the password

  3. Once the system has completed loading, there will be a folder titled xinu-x86-vm

  4. cd xinu-x86-vm/compile

  5. make clean

  6. make

  7. run the upload script with sudo ./upload.sh

  8. XINU has now been placed in the proper location for the back-end to boot when started. However, in order to see the CONSOLE of XINU, you will have to connect using minicom.

  9. sudo minicom

  10. back in the VirtualBox menu, start the backend appliance. XINU will start, and run it’s main process, which by default will start the shell module. Congratulations, XINU is now running!

 

glhf

Comment