The Acme Systems shipping office will be closed for holidays from 14 august to 22 august
PLEASE NOTE: This article is obsolete or related to a discontinued product.

How to duplicate the SDK environment

This tutorial explain how to have more than one development tree for the Axis SDK on the same Linux workstation.

This facility is needed in all the cases when you are maintaining more than one project based on the Axis SDK 2.01 or you want to have ready more than one configuration with different options (different kernels, different packages or applications installed).

We start from an existing (and working) SDK 2.01 dev tree present on your workstation and will duplicate it so to have a second dev tree.

You must have installed correctly the SDK 2.01 as reported here:

Install new SDK 2.01

and have generated the first fimage in order to continue with this tutorial. If you made modifications after having correctly installed the Axis SDK2.01 it could be possible these instruction will fail. In case revert to a fresh Axis SDK2.01 installation.

We suppose you are the user WilCoyote and your home directory is /home/WilCoyote and inside this directory you have installed the SDK 2.01 so you have the /home/WilCoyote/devboard-R2_01 directory containing your working SDK 2.01 development tree .

To duplicate an existing SDK 2.01 development tree in another directory we provide a simple script file to be put in your home directory. This is the sample script we'll use for this example:

#! /bin/bash
echo "This script will copy an entire working Axis SDK2.01 tree on another one."
if [ "$1" = "" -o "$2" = "" ]; then
echo "Usage: cpsdk201 source_dir destination_dir."
else 
echo "Now the tree $1 will be copied on $2. Is this correct? (y/n)"
read ans
if [ "$ans" = "y" ]; then
echo "Copying ...."
cp -r -d $1 $2
cd $2
WRKDIR=$(pwd)
echo "pwd = $WRKDIR"
echo "Press a key to continue .."
read ans
. ./init_env
./configure
echo "Press a key to continue .."
read ans
make clean
echo "Press a key to continue .."
read ans
cd $WRKDIR/apps/iptables
make clean
echo "Press a key to continue .."
read ans
cd $WRKDIR/apps
rm -rfd crypto
echo "Press a key to continue .."
read ans
cd ..
cd $WRKDIR/os/linux
make clean
echo "Press a key to continue .."
read ans
cd $WRKDIR/os/linux-2.6
make clean
echo "Press a key to continue .."
read ans
cd $WRKDIR/tools
rm -rfd build*
echo "Press a key to continue .."
read ans
cd $WRKDIR
./configure
echo "Press a key to continue .."
read ans
make
else
echo "Nothing done: exit."
fi
fi
exit 0

Save this cpsdk201 script under your /home/WilCoyote home directory, just one level higher of the devboard-R2_01 directory.

Suppose you want to duplicate the existing devboard-R2_01 tree in another tree called my_devboard, you have to run the following command:

cd /home/WilCoyote
./cpsdk201 devboard-R2_01 my_devboard

The script is interactive in the sense that it asks to continue after any action.
You can answer yes to all the steps and when asked to setuid the process etrax100boot say 'y'.

After a few minutes of work you will have a second tree recompiled and the image generated.
All the link and filename dependendies should have resolved if starting from a standard SDK 2.01 installation.

This process has been tested on default installation and on Fedora core 4 distribution. If the source SDK 2.01 development tree has been modified heavily, with addition of packages and applications not present in the default installation of the SDK 2.01, the duplication process could possibly require additional work on the script for the correct reconstruction of all the environment. In case of such a situation, please report it to the foxgroup.