Project:
Home page
Sourceforge project page
Downloads
Documents:
Compiling GeekOS
GCC Cross Compiler Notes
GeekOS in Education
Running GeekOS:
Hardware support
Screen shots

Building GeekOS

This document describes how to compile and run GeekOS on various platforms.  GeekOS is currently known to compile on the following platforms:
  • Linux/i386 and FreeBSD
  • Windows 2000 using cygwin.  Other Windows versions may also work.  (Windows NT 4 is known to work.)
  • Solaris/SPARC, using gcc-2.95.2 compiled for i386-elf target using this patch for gcc

The following sections describe how to compile GeekOS on each of these platforms.

Linux/i386 and FreeBSD

On Linux/i386 and FreeBSD, you can use the native compiler and binutils to build GeekOS.  Note that your distribution must be ELF-based (all recent versions of Linux and FreeBSD are).  I have compiled GeekOS on Debian version 2.2 and FreeBSD version 4.3-RELEASE.

Besides the compiler, linker, and binutils, you need to have the following software installed:

  • Perl.  Any recent version (Perl 5 and higher) should work.
  • Nasm.  I use version 0.98.  I suggest downloading nasm from this ftp site.

Once you have installed gcc, binutils, perl, and nasm, and have added them to your PATH, compiling GeekOS is a simple matter of running the command make from within the "geekos" directory.  Note: the GeekOS Makefile requires GNU Make, which may be called "gmake" on a FreeBSD system.

Windows 2000 with cygwin

First, you will need to install the cygwin software.

  1. Go to http://cygwin.com/.
  2. Click on the link that says "Install cygwin now"
  3. Run the setup.exe program
  4. When prompted for packages to install, choose at least the following:
    ash bash binutils cygwin fileutils gawk gcc grep make perl sh-utils textutils
    If you have plenty of disk space and a fast internet connection, you may wish to simply install all of the packages.

Once cygwin is installed and its bin directory added to your PATH, you can build GeekOS by going into the geekos directory and running the command make.  If you are not running Windows NT or Windows 2000, you should run the command "make OS=Windows", or modify the part of the Makefile that detects the operating system to ensure that the OS macro is set to "Windows".

Solaris (and other non-i386 Unix variants)

To compile GeekOS on a non-i386 Unix variant, you need to build a cross compiler and binutils targeting i386 and ELF.  This gcc patch adds support for the "i386-elf" target to gcc 2.95.2.  This document describes how to build binutils and gcc for this target.  Once the cross compiler and binutils are installed, uncomment the lines containing the text "CC_PREFIX := i386-elf-" from the Makefiles in the "geekos" and "geekos/test" directories.  Then, you can use the command make from the "geekos" directory to build GeekOS.

SourceForge Logo Valid HTML 4.01! Viewable With Any Browser Made with VIM