| Preparation |
|---|
You will have to familiarize yourself with several common UNIX tools for this assignment. The first of these is tar, a utility originally devised to create tape archives for the purpose of backing files up onto computer tapes.
While tar is still used to create tape backups of filesystems, it has become far more common to use tar to group files and/or directories together into a single entity, typically called a "tar-ball". (So common is the use of tar that it has been verbed in computer science terminology: We speak of "tarring" files, or files that have been "tarred up".) Tar syntax is somewhat arcane, as tar came into existence before modern standards for command-line options.
For more information on tar, please see the UNIX man pages.
| Building |
|---|
While the gcc command-line options provide a great deal of flexibility when compiling programs, things quickly become unmanageable when the number of source files exceeds what you can conveniently type in a few seconds.
The make utility can be thought of as a companion to the compiler infrastructure (preprocessor, compiler, assembler, and linker,) that allows the build rules for large projects to be explicitly encoded in Makefiles. A Makefile typically consists of common definitions, (such as, which compiler to use,) and a set of rules. Each rule has a target, such as the file that is to be built, and can be followed by a list of dependencies and a sequence of steps to perform in order to build that target. In addition, make has quite a few common rules built into it.
You will not have to write your own Makefiles for this course, but you will have to use and possibly modify some for all of our remaining assignments. The Makefile is always human-readable, so feel free to open them up and look around.
To build the XINU operating system, perform the following steps:
For more information on make, please see the UNIX man pages.
| Running |
|---|
Your XINU image is now ready to be run on a backend machine. To transfer
it there, we have a special utility called xinu-console.
Execute xinu-console in the compile directory where your
xinu.boot file resides. Xinu-console will connect your
terminal to the first available backend machine, and you should see a message
like:
   connection 'sutekh', class 'ppc', host 'morbius.mscs.mu.edu'
depending on which backend you get.
The most important thing to remember about xinu-console is that it is modal, like vi. You start out in direct connection mode, in which (in theory) your terminal connects directly through special hardware to the serial console on your backend machine. We do not have that hardware hooked up yet, and your operating system is not far enough along to have a working serial console driver anyway, so this will be of surprisingly little use.
At this point, you are ready to reboot your backend machine with your new image. We don't have specialized rebooting hardware setup yet, so you must go to the front of the appropriate machine and hit the system reset button on the front panel. This is the smaller button marked with a triangle, just below and to the left of the power button. Please do not reboot other people's backends while they are working.
Under normal traffic loads, the backend should take less than 10 seconds to reset, load your image, and begin executing the operating system.
For more information on xinu-console and xinu-status, please see the UNIX man pages.
| Framebuffer Driver |
|---|
The source tar-ball we are starting with contains only two files for the operating system proper, in the subdirectory system. We will be adding files into this directory in every subsequent assignment.
The other files in the XINU subdirectories break down as follows:
Within the framebuffer directory there are three files that comprise the brunt of the driver:
Each of these files contains skeleton functions that must be filled in. The major locations are marked with "// TODO...". Test your framebuffer driver by adding code to system/initialize.c's nulluser() function, which begins using kprintf() to report on the operating system's successful startup.
When I test your driver, I will be putting different code into the nulluser() function to see if your driver follows the interface spelled out.