Difference between revisions of "Building From Source"

From NST Wiki
Jump to navigationJump to search
(Preparing The Build Machine)
(Installing Packages)
Line 60: Line 60:
 
export CVSROOT;
 
export CVSROOT;
 
</div>
 
</div>
 +
 +
= Configuring The System =
 +
 +
After downloading the source code, you will need to run the: ''configure'' command from the top level directory. Before doing so, here are a couple of things to note:
 +
 +
* While Sun's Java Run Time Environment (JRE) can be redistributed, at the time of this writing, we were unable to automate the installation of it onto the development system. Go to [http://java.sun.com/ Sun's Java Web Site] and download the appropriate '''JRE''' (get the '''RPM''' packaged version) for your Fedora Core 6 development system and install it. At the time this page was last updated, the file to download was named: "'''jdk-6u2-linux-i586-rpm.bin'''".
 +
 +
* You will probably need to run: ''configure'' multiple times the first time you setup your development system.
 +
 +
* If ''configure'' determines that there are missing packages, it will indicate the ''yum'' command which you need to run in order to add the necessary packages to your system.
  
 
= Installing Packages =
 
= Installing Packages =

Revision as of 10:03, 3 August 2007

Preparing The Build Machine

You will need to install Fedora Core 6 (the i386 variant) onto your development system.

If you want to build a 64 bit variant (x86_64) of the NST, you will need to download the x86_64 variant of Fedora Core 6. While the i386 variant will run on both 32 bit and 64 bit machines, the x86_64 variant will only run on 64 bit machines. Most, if not all, 64 bit AMD processors and the Intel Core 2 series should be compatible with the x86_64 variant.

If you don't want to use physical hardware, you can use a Virtual Machine (even running under Windows) to do your NST development under. We have found that either VMWare Server (our preference) or VMWare Player from VMware can be used (even if you want to build a x86_64 version of the NST). We have also found that Virtual PC can be used.

Getting the NST Source Code

There are several ways to acquire the source code for NST developement (one can find an entire section related to this in the NST FAQ).

For our purposes we will choose the anonymous CVS approach. This permits one to build a current snapshot of the NST distribution as it is being developed.

The following demonstrates how one can create a: nst sub-directory on a Fedora Core 6 based system, and then populate it with the current NST source code (NOTE: Just press the Enter key when prompted for the password as there is no password required for anonymous access):

Checking Out The Current Source Code
[root@localhost ~]# mkdir $HOME/nst
[root@localhost ~]# cd $HOME/nst
[root@localhost nst]# CVSROOT=":pserver:anonymous@nst.cvs.sourceforge.net:/cvsroot/nst"
[root@localhost nst]# export CVSROOT
[root@localhost nst]# cvs login
Logging in to :pserver:anonymous@nst.cvs.sourceforge.net:2401/cvsroot/nst
CVS password:
[root@localhost nst]# cvs co .

   ... You should see file names streaming by in your
       console window - it may take several moments to
       download all of the source files ...

[root@localhost nst]#

As time goes on, you may want to update your source files (the NST developers check in new code quite frequently). Use the following commands:

Updating The Source Code
[root@localhost ~]# cd $HOME/nst
[root@localhost nst]# CVSROOT=":pserver:anonymous@nst.cvs.sourceforge.net:/cvsroot/nst"
[root@localhost nst]# export CVSROOT
[root@localhost nst]# cvs update -Pd

   ... You should see directory names streaming by in your
       console window as CVS searches for updated files ...

[root@localhost nst]#

As setting the CVSROOT variable can be quite tedious, it is recommended that you include its definition in your: "~/.bashrc" file. Add the following lines to the end of: "~/.bashrc".

CVSROOT=":pserver:anonymous@nst.cvs.sourceforge.net:/cvsroot/nst"; export CVSROOT;

Configuring The System

After downloading the source code, you will need to run the: configure command from the top level directory. Before doing so, here are a couple of things to note:

  • While Sun's Java Run Time Environment (JRE) can be redistributed, at the time of this writing, we were unable to automate the installation of it onto the development system. Go to Sun's Java Web Site and download the appropriate JRE (get the RPM packaged version) for your Fedora Core 6 development system and install it. At the time this page was last updated, the file to download was named: "jdk-6u2-linux-i586-rpm.bin".
  • You will probably need to run: configure multiple times the first time you setup your development system.
  • If configure determines that there are missing packages, it will indicate the yum command which you need to run in order to add the necessary packages to your system.

Installing Packages

Building a ISO Image

Tweaking The Configure/Build Process

The Magic "${HOME}/.nst" Directory

"${HOME}/.nst/configure.sh"

"${HOME}/.nst/disable.txt"

"${HOME}/.nst/post_install.sh"