Experimenting With Xinu

There are several versions of Xinu available for platforms such as an x86, ARM, and MIPS.



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 short list of instructions that explain the above in detail for the BeagleBone Black.

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. In fact, there are two VM versions: one for VMWare and one for Virtual Box. The Xinu code for the VMWare version is from the first edition of the text (porting the Virtual Box version from the second edition of the text to VMWare may be straightforward; so far, no one has volunteered to try). 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.



X86 version (Galileo board from Intel)



ARM version (BeagleBone Black board from TI)



Xboot code (Used to boot over a network on the Galileo)



A tar file of two appliances that consititute a Virtual Box version (works on Vbox 5.2.18





Versions For The Previous Edition Of The Text (the previous edition was published in 2009)



MIPS version (Linksys router)



x86 version



x86 forwarding version that implements NAT



Remote file server



Remote disk server



Xinu code that runs in a VM along with instructions





Very Old Versions



An FTP directory contains Xinu code for older architectures Notes From Tom Trebisky: Tom Trebisky joined the Xinu project in 2016. Tom has been working with embedded hardware, including BeagleBone and Galileo boards. He created his own operating system, but we won't talk about that here. Tom has prepared some notes on booting Xinu on the BeagleBone Black and the use of uboot as well as notes on the Galileo and its performance. Tom's notes may be helpful in understanding how to set up Xinu and what to expect from the hardware. Click here to read Tom's notes on the BBB, and click here to read Tom's notes on the Galileo (note the link about performance). Xinu in Industry If your company has used Xinu in the past or is using Xinu at present, send a note to xinu-info@cs.purdue.edu and we will include your company in the list below. 2011 Michael M Minor writes that Xinu has been ported to the Atmel AVR-series, 8-bit microprocessor. The project is in the process of being documented at http://sites.google.com/site/avrxinu/

2010 Barnard Software writes that they are using Xinu as a part of a product.



Dave Peterson of Woodward.com writes that they have Xinu running on Engine control systems that control the large fuel on Gas/Steam Turbine and Gas/Diesel Engines. See the webpage woodward.com to appreciate that size of the turbines.

2009 Carolyn Scherrer of IBM writes that the design of IP, ARP and UDP code for Xinu has become a defacto industry standard, and requests permission to use it in a commercial product.



Mantissa Corporation writes to say that they have ported Xinu to an IBM z9 (that's the current high-end mainframe)

2002 Douglas Beattie Jr. of ICONIX Research writes that they are developing an embedded system that uses SPI and Serial ports, with an ADC to read battery levels, an E2PROM for data logging, and a 2MB Atmel Serial DataFlash for program storage. Their chip vendor supplied a third-party TCP/IP protocol stack from a "software vendor", and the entire system was Xinu code. They need information on how to write additional device drivers. He says, ''I also want to tell you that in the meantime I ordered a copy of "Operating System Design -- The XINU Approach", which arrived today. There looks like a lot of useful information in this book. (I can't seem to put it down -- in fact, it could save my job.)''



Nilson Minoru Siguimura writes that he working for a company in Brazil that designs, implements and commercializes physical access control systems. His task is to port Xinu to a Zilog eZ80 microprocessor platform. The board will work as a server for validation terminals used in access points of buildings, stadiums, bus and train stations, and other places that require high security. He says, ''I would like to congratulate you on your very powerful and elegant operating system.''

2000 Jean Labrosse reports that he created an operating system, MicroCOS, based on Xinu and the Xinu books.



Frank Zimnik from MicroniK Multimedia in Germany) writes that they are using the Xinu TCP/IP stack in a digital TV set top box.



Tom Uban writes that Williams Electronics Games has released a new generation of pinball machines in which a CRT is reflected onto the glass (partially mirrored) to give the illusion that the ball is interacting with the video image. The games run Xinu as the core. The first game "Revenge From Mars" was shown at the ATEI trade show in London, January 1999. The second game "Star Wars Episode I", was finished in time for the release of the movie. The system includes a complete TCP/IP stack as well as a telnet server and HTTP server, which when connected to a network allows the machine to be diagnosed and surfed for high scores, etc.

The breakdown for lines of code were as follows:

System 199675 XINU 50321 Revenge 177757 The final system is loaded into a custom PCI board which contains 72 Mbytes of ROM space (code, image, and sound data) and 5Mbytes of FLASH for updates. Over 12,000 (combined) copies of the two game titles were produced at the time Tom wrote. Xinu is also used in "Pinball 2000" a multi-game platform developed by Williams.

The breakdown for lines of code were as follows: The final system is loaded into a custom PCI board which contains 72 Mbytes of ROM space (code, image, and sound data) and 5Mbytes of FLASH for updates. Over 12,000 (combined) copies of the two game titles were produced at the time Tom wrote. Xinu is also used in "Pinball 2000" a multi-game platform developed by Williams.

Tom McDermott writes that they are using Xinu in a spread-spectrum radio project. They ported Xinu to a homegrown Motorola 68360 processor.



Metrolink, Inc. ported Xinu to the z80 and the M16c micro control uints. It was called IP works, and included a full UPnP stack.

1999 Raj Yavatkar writes that when Intel acquired Shiva Systems, he found that Shiva's OS is based on Xinu.

1998 Tom Uban of Williams Electronics Games, Inc. heads the operating system development team for electronic pinball machines. and decides to use Xinu.



John Small reports that the City of Dallas has a homegrown operating system on their mainframe computer and has decided to use code from Xinu to support TCP/IP.



Hugh Anderson working in Fiji develops a network 'sniffer' tool based on an SNMP agent developed from your original sources.



Sheffer Clark of Novell writes to describe use of the Xinu protocol software to create a small IP stack used for sending dumps over a network to a file server.



Shekhar at netscout.com write that that have been using the Xinu UDP/IP protocol stack in their SNMP Agent Devices for the previous three years.

1997 Rob Daniel of Hewlett-Packard writes to describe the use of Xinu TCP/IP code in an HP product. The product, called TCP/email, runs in user space on HP-UX 9000 series 700 and 800 workstations.



Tom Evans of tennyson.com.au reports porting ''the whole of Xinu'' to a Modem that the company manufactures. He says ''That surprised a few people.'' Tom adds ''Thanks for the books. Likewise for the small (but perfectly formed) Xinu Operating System.''

1990 Michael M Minor writes that Xinu was used at Los Alamos National Laboratory to implement a distributed data acquisition and control system (Minor [1990]). The project began in 1983, but did not take off until 1984 when we discovered Xinu. The application required the implementation of numerous laboratory multi-channel analyzers used to collect gamma-ray data at an 8-MW research reactor facility. Several of the gamma-ray detectors and their corresponding multi-channel analyzers were used in an automated neutron activation analysis system requiring samples to be irradiated, transported, and counted under control of microprocessors running Xinu. We used Motorola 68000-series microprocessors in a VME-based environment on a local network shared with Sun Microsystems workstations. The project remained active for 10 years.

Minor [1990] Minor, Michael M. and Denton, Michael M., A Distributed Data Acquisition and Control System, Los Alamos National Laboratory Report, LA-UR-90-1496, Los Alamos, New Mexico, 1990.

1990s Lexmark corporation uses Xinu in all their printers until 1999; the last Xinu-based printer is manufactured in 2006. (Lexmark switched to Linux because they could hire a trained workforce.)

1987 According to Stuart Anderson, the NCR Towerview X-Station (one of the first thin clients) ran Xinu on a Motorola 68000. NCR added a STREAMS subsystem and over the course of its lifetime, the system ran XNS, TCP/IP, and DECnet (the last two could be run concurrently). The system even had a full-featured NFS client, and the ability to download local apps, such as a window manager, to run on the device.

1980s Digital Equipment Corporation incorporated Xinu into a MIPS-based X windows terminal. Xinu in Universities If your university has used Xinu in the past or is using Xinu at present, send a note to xinu-info@cs.purdue.edu and we will include your university and the year you started using Xinu in the list below. 2019 Prof. Beau M. Christ from the Department of Computer Science at Wofford College, Spartanburg, SC, reports that they have been using Xinu in their Operating Systems course, COSC 360, since 2017



2018 Dr. Mahendran from the Department of CSE, IIT Tirupati, India, reports that they used use Xinu in CS3510



2017 Mayur Phadte, a student in CSC 501, the Operating Systems class at NC State University reports that the course uses Xinu



2016 Professor David Chiu Department of Mathematics and Computer Science, University of Puget Sound (http://cs.pugetsound.edu/~dchiu/CS475/)



Professor Computer Science, Eastern Illinois University



2015 Professor Sumi Helal University of Florida, Gainesville, Florida



Professor Steve Chapin Syracuse University, Syracuse New York



2013 Professor Martin Swany School of Informatics and Computing, Indiana University, Bloomington, IN



2012 Professor Donald Kim Information and Communication Engineering Department, Dongguk University, Seoul, South Korea See the class. See a note of thanks.



2011 Professor Dennis Brylow Marquette University



Professor Paul Ruth University of Mississippi



Professor Bina Ramamurthy University of Buffalo



Professor Moloney University of Massachusetts at Lowell



2010 Professor Betty O'Neill UMass Boston



2008 Professor Prasun Dewan University of North Carolina



2006 Chris Chlap writes that he teaches "Wireless and Embedded Systems" at the University of Canberra in Australia in which he discusses small Operating Systems like Xinu. He hopes that we will be able to continue publishing excellent books.



2002 Professor Dorothy Deremer Montclair State University



1996 Richard Foss, at Rhodes University in South Africa writes that he has a distributed music system running under Xinu. He published an article in the Journal of the Audio Engineering Society in May 1996.

What Others Are Saying

"The Xinu book is the best operating systems book on the market because it removes the black magic and explains how to build an OS from the ground up. It's not like other books I tried to read -- they gave me a headache. I have already started telling friends how great it is."

-- David Bafumba-Lokilo, Ecole Polytechnique

de Montreal