This document covers how users can checkout PlatX projects from a given CVS repository.

The PlatX CVS system uses a two-tier model, where the platx module acts as an administrative umbrella that in turn contains the other PlatX modules. The entire system is not kept in one CVS modules to manage size, complexity, and different administrative domains.  For example, the Linux kernel is quite large, and is fed updates from an external source -- so, a modular approach allows one to not include the kernel if not desired, and also makes it easier to update the kernel with external changes. Although platx and (e.g.) kernel are both top-level CVS modules, the kernel module is typically instantiated *inside* of a platx sandbox. Because of the way that CVS works, once the modules are checked out the underlying structure becomes transparent -- the underlying model is only really exposed during the checkout process.

A set of shell functions are used to aid with the checkout process. These support functions are typically sourced from ~/.platxrc or ~/.platxrc.local, and are installed with the procedure described in the next section. With a simple one-module system, one would be able to just type "cvs -d $CVSR co platx", which would check out everything that is necessary. However, this process becomes more complex with a multi-module system, and so a sequence like "cvs co platx; cd platx; cvs co kernel" is necessary to structure the tree appropriately. These support functions simply automate this process and can be configured to instantiate commonly used build trees.

Throughout this document, the shell variable CVSR is assumed to be already set-up with the appropriate CVS repository. Alternately, you could set the environment variable CVSROOT, although this causes problems if you are working with multiple repositories. The complete usage of CVS is beyond the scope of this document, so a basic working knowledge of CVS is assumed.


To install the local support functions, first check out the base platx module and then run the setup target. Then, you need to modify your local shell startup script. This process typically only needs to be done once, when first configuring your system, or if the configuration information has changed. Alternately, this could be done at a system level, for all users, if desired.

cvs [-d $CVSR] co platx
cd platx; make setup
<modify local shell setup>
<exit shell to re-init>

All told, this sequence of events should look something like:

tpering@krumlov:tpering/ >ls -d platx
ls: platx: No such file or directory
tpering@krumlov:tpering/ >echo $CVSR
tpering@krumlov:tpering/ >cvs -d $CVSR co platx > /dev/null
tpering@krumlov:tpering/ >cd platx
tpering@krumlov:platx/ >make setup
Installing /home/tpering/.platxrc...
PLATXRCVER is not defined, are you sourcing .platxrc?
For bash, you should do something like:
echo source ~/.platxrc >> ~/.bashrc
make: *** [setup] Error 5
tpering@krumlov:platx/ >echo source ~/.platxrc >> ~/.bashrc
tpering@krumlov:platx/ >make setup
Installing /home/tpering/.platxrc...
You may need to re-start existing shells for changes to take effect.
tpering@krumlov:platx/ >exit

If you attempt to repeat this process it will re-install the support file unless it has been modified. You can also run the install from any platx checkout, so you don't necessarily need to do a new checkout of platx to update the file. Furthermore, this install only needs to be done once per user, and once installed not associated with a particular CVS repository or project. Other steps are necessary to install system-wide tools, such as the cross complier, which are covered in another document.


Now, in order to check out a project, you can use one of the pre-defined functions, such as platx-generic. The arguments to this are passed directly to the initial cvs checkout of the root platx module, so they can be used to specify the CVS repository, if necessary.

platx-generic [-d $CVSR]

After this, you should end up with a complete PlatX cvs checkout:

tpering@silver:tpering/ >platx-generic -d $CVSR
U platx/.cvsfeedversion
U platx/.cvsignore
U platx/.cvsmodules
U packages/tools/arm-linux-libz-2.95.tar.gz
U packages/tools/cross-2.95.3.tar.bz2
tpering@silver:tpering/ >ls platx
CVS TODO corefs exports kernel util
Makefile config docs generic packages