Getting and Building CapROS

1. Obtaining CapROS

If you just want to have a look at the code, you can simply go to the Project page and click on "Browse CVS". SourceForge also has instructions for getting anonymous access to CVS.

2. Building CapROS

These instructions are for building for the Intel architecture. A port also exists for the ARM architecture; see below.

2.1. Package Requirements

CapROS is built using Linux. If your system doesn't have the following packages, you may need to obtain and install them. You must also have GRUB installed, because CapROS is loaded by GRUB using the Multiboot specification.

2.1.2. For Fedora Core

2.1.3. For Debian Sarge

2.2. Building the Cross Compilation Tools

CapROS uses its own cross-compilation tools for stability. We acknowledge and thank the Coyotos project for hosting these tools.

2.2.1 Setting up on Linux/YUM Systems

If you are running Fedora Core, you can add the YUM repository to your yum and up2date configurations by executing:

su -c 'rpm -ivh http://www.coyotos.org/YUM/coyotos/6/i386/Coyotos-Repository-3.2-2.fc6.noarch.rpm'

You can then install the cross compilation tools by running:

su -c 'yum install capros-i386-xenv'

And you can then update the cross compilation tools by running:

su -c 'yum update capros-i386-xenv'

(If the above fails, see email of 5/16/06.)

The capros-i386-xenv package is a "virtual" package - it simply supplies the necessary dependencies so that YUM will find all of the pieces you need. All of the CapROS cross environment tools install into the top-level directory /capros/.

For more information, refer to the Coyotos build instructions, substituting "capros" where appropriate.

2.2.2 Setting up on Fedora core 8 using the GUI

If you are running on Fedora Core 8, you can add the build tools to your automatic software update list with the following procedure.

Under "Applications", open the "Add/Remove Software" and enter your root password when prompted.

Open up the "Edit" menu and select "Repositories".

Click the "Add" button to add the Coyotos repository

Fill in the fields:

Name:         Coyotos RPMs
Description:  Development tools for Coyotos/CapROS
Location:     http://www.coyotos.org/YUM/coyotos/6/i386/
	  

and click "OK".

Close the Repository Manager.

Select the "Search" tab, and enter "Coyotos-Repository" in the search. When the search completes, check the check box for:

Coyotos-Repository-3.2-2.fc6.noarch
	  

Click "Apply". Click "Continue" on the popup.

Select the "Search" tab, and enter "capros-i386-xenv" in the search. When the search completes, check the check box for:

capros-i386-xenv - 0.1.6.4fc6.i386
	  

Click "Apply". Click "Continue" on the popup.

2.2.3 Setting up on Other UNIX's

If you are building on some other UNIX derivative that does not support YUM, you may find that nothing will do but to build the cross environment for yourself. For instructions, go to the Coyotos build instructions for guidance. You may need to set COYOTOS_XENV to /capros/host and substitute "capros" where appropriate elsewhere.

2.3. Building CapROS

Follow the instructions on SourceForge for accessing and downloading the CapROS CVS repository. The projectname is capros, and the module name is eros (we haven't yet changed the name of the module). After setting CVSROOT appropriately, use the command

At the moment there is no tarball for the CapROS sources. We will add this when the system becomes stable enough for non-developers.

Now you can build CapROS by

Some make targets that may be useful:

2.4. Running a test program

To run CapROS, you must have a boot partition with a file system where GRUB will find the files to load. Define CAPROS_BOOT_PARTITION as the name of this partition. For example:

export CAPROS_BOOT_PARTITION=/boot

To run the persistent version (not yet implemented), you must also have a hard disk partition formatted for CapROS. Use your handy fdisk equivalent to create a partition, and give it type 0x95. Define the shell variable EROS_HD as the device name for this partition. For example:

export EROS_HD=/dev/hda1

Before using the CapROS partition for the first time, you must format it:

Then to compile and load the test program into the CapROS system:

To run the test program, boot the computer, and type the following commands to GRUB:

root (hd0,1)     # or the appropriate value for your boot partition
kernel --type=multiboot /CapROS-kernimg

You may wish to add an item to your GRUB menu.lst file with these commands.

3. Run-Time Requirements

CapROS has been tested on a Pentium II, a Mobile AMD Athlon, and Vmware. The following notes give an idea of what we expect will be needed.

3.1 Disk Space

CapROS can run in as little as 20 Mbytes. Doing anything interesting with it will certainly require more. At the moment we are suggesting a 100 Mbyte partition if you just want to fiddle with it, or a 250 Mbyte partition if you have something more serious in mind.

To boot from the hard disk, the CapROS partition must fall within the bootable range of your machine. It is also possible (even straightforward) to boot CapROS from a floppy, which allows non-bootable partitions to be used. The kernel theoretically groks extended partitions, but we have never tested this.

3.2 Hardware

CapROS will support the following hardware (all trademarks belong to their respective owners):

Processor 486, Pentium, Pentium Pro. There's nothing we're aware of that would prevent clone processors from working, but we have no way to test them and they are not a priority for us. If you have them, we would be glad to hear what luck you have. Up to a point, we'll try to help get them working.

CapROS runs on all of the multiprocessor boards we have tried, but the first research release will not provide SMP support.

BIOS We are not aware of any BIOS-specific dependencies. We have not tested large drives on BIOS's that do not support extended drive size information.
Motherboard We are not aware of specific dependencies. We use the TYAN family of motherboards, but have also run successfully on a number of clone boards.
Memory We have run CapROS successfully (albeit unintentionally) on a machine with only 640K of memory. This is not a recommended configuration. 8M should be fine for now, but 16M is better.
Disk The first research release will not support SCSI disks. There are a great many SCSI controllers, and we have found that the sustainable throughput for IDE is as good or better than we see from SCSI. We are aware that many people want to run SCSI devices.

When we do get to SCSI (which should be soon -- it's necessary for the MIPS port we are doing), our first attention will go to the Adaptec 2940 family, because that is what we have. Support for other adaptors will be guided by demand and availability. Your chances of getting us to support a card are greatly improved if you have one to loan us.

Video The kernel assumes a VGA or better adaptor, but the system does not (yet) provide a bitmapped graphics interface.

We hope to change this in the near future, but are still debating the proper graphics model for this class of system. The Mach32, Mach64, and Diamond cards are high on our priority list. Our group favors the Toshiba portables, so we'll probably get the C&T chipset family working early as well.

Network The current implementation includes drivers for the 3COM 3c509 and 3c590XL network cards. Regrettably, these drivers have been well hacked over, so it is not clear that the current implementations actually work.

4. Building for ARM

CapROS can run on the ARMv4 architecture. First, get the ARM cross-tools:

su -c 'yum install capros-arm-xenv'

To build for ARM, you need to:

export EROS_TARGET=arm

The system has been tested on a Cirrus EDB9315 development board, which uses the Cirrus EP9315, which is based on the ARM920T microprocessor.

To run on the EDB9315:

  1. Build the system for ARM.
  2. Go to the directory containing the test case you want to run, for example src/base/tests/perf/nc. The kernel text, kernel data, and initial system state are loaded into the system's memory from three separate files in /tftpboot (kerneltext, kerneldata, and imgdata respectively). Build them:
    make np
    
  3. Set up Redboot according to the instructions that came with the EDB9315. To install tftp, you will need to:
    su -c 'yum install tftp tftp-server'
    
    and then use the application at System->Administration->Services to enable tftp and restart xinetd. I also had to enable UDP port 69 in my firewall, and change the SELinux setting to Permissive.
  4. Boot the EDB9315 to execute Redboot. Give Redboot the commands:
    load -v -r -b 0x00300000 imgdata
    load -v -r -b 0x00100000 kerneldata
    load -v -r -b 0x00200000 kerneltext
    go
    
    kerneltext is loaded last because that sets the default start address for the go command. Consider using Redboot aliases for these commands.

SourceForge.net Logo Copyright 2005, 2006, 2007, 2008 by Strawberry Development Group. All rights reserved. For terms of redistribution, see the GNU General Public License This material is based upon work supported by the US Defense Advanced Research Projects Agency under Contract No. W31P4Q-07-C-0070. Approved for public release, distribution unlimited.