SDP user's guide

From
Jump to navigation Jump to search

This page is intended to help you getting started using the Software Distribution Platform (SDP) within BerlinRoofNet (BRN).


Installation and Setup

This includes checking out and building all required components

First, create the directory to store everything belonging to SDP, BRN and click.

mkdir openwrt
cd openwrt

There you should create a script called env.sh adapting this content to your paths. This assumes the OpenWRT/WGT toolchain is located in /home/wrt/buildroot

#!/bin/sh
echo "Setting up Click environment!"

export BUILD_DIR=/home/bernhard/openwrt
export BASEDIR=/home/wrt/buildroot/build_mipsel/staging_dir
P=$BASEDIR/bin/mipsel-linux-uclibc-
export CC="${P}gcc"
export CPP=${P}cpp
export CXX="${P}g++"
export TARGET_CC="$CC"
export TARGET_CXX="$CXX"
export RANLIB=${P}ranlib
export STRIP=${P}strip
export CLICKPATH=$BUILD_DIR/staging_dir/lib

This script must then always be sourced before working with the software.

. env.sh

Note that the above step is very important and lack of proper environment variables can lead to strange behaviour. If you got it right this should work:

echo $CC
/home/wrt/buildroot/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-gcc

Then check out the main Makefiles

svn co svn://merkur.sardmn.informatik.hu-berlin.de/brn/platform/wgt634u/openwrt make

and build click

make -f make/click.mk click

install some missing header files for BRN

mkdir -p staging_dir/include/elements/wifi/{ap,sr}
cp -a click/elements/wifi/*.hh staging_dir/bin/include/elements/wifi/
cp -a click/elements/wifi/ap/*.hh staging_dir/bin/include/elements/wifi/ap/
cp -a click/elements/wifi/sr/*.hh staging_dir/bin/include/elements/wifi/sr/

and build the modules

make -f make/brn.mk brn
make -f make/sdp.mk sdp

Then, provided that no errors occurred, you are done setting SDP up and can follow on with reading sdp/README about building SDP packages.

New BRN

Since 2005-10-15 there is a working kernel-click with added BRN for the OpenWGT platform. It comes with a complete build environment / toolchain that is documented at BRN:Dev:Toolchain. I used the "Jens' method" to build it.

When the toolchain is complete, you start building the additional components in ~/projects/brn :

( cd madmax/mips/kernel ; sh build.sh )
( cd madmax/mips/madwifi.stripped ; sh build.sh )
( cd madmax/mips/click/linuxmodule ; sh build.sh )


For the kernel build you need to take care that the .config matches the kernel that is run on the system on which the click.ko loadable kernel module shall be used

The steps from the old installation section are only changed in one minimal thing: you omit "make -f make/brn.mk brn" because the BRN modules do not run in user-space anymore and are now included in the new click directory.

After all building is done, change your current directory to sdp/package . To build a version 0 SDP package without any BRN you do

make sdp sdppackage version=0

Then to build a new package for distributing a kernel BRN version (that is scheduled for activation in 300 seconds and to be immediately injected at the BRN node wgt27) do

make brn sdppackage activation=$(expr $(date +%s) + 300) && make sdpdeploy node=wgt27

Whenever you do not explicitly specify a version it is auto-incremented by 1.

The default injection node= value can be set in the sdp/package/Makefile

Now. That is it. Have fun with your new SDP.