Esther Fuhrmann: Difference between revisions

From
Jump to navigation Jump to search
Line 100: Line 100:
ln -s /tmp/sdp/library/0 /tmp/sdp/current
ln -s /tmp/sdp/library/0 /tmp/sdp/current
/usr/sbin/rcclick start /tmp/sdp
/usr/sbin/rcclick start /tmp/sdp

For convenience we took all these steps using a (strange) script
<pre>
ssh -XT localhost "/bin/bash -c 'SSH_ASKPASS=/home/brn/brn/unserpassword.sh \
scp -r ~/brn/sdp/openwrt/sdp/package/library/0 root@wgt24:/tmp/sdp/library/'"

ssh -XT localhost "/bin/bash -c \"SSH_ASKPASS=/home/brn/brn/unserpassword.sh ssh -n root@wgt24 '\
killall S90sdp ;\
/usr/sbin/rcclick stop ;\
killall click; \
echo 0 > /tmp/sdp/current_id ;\
rm /tmp/sdp/current ;\
ln -s /tmp/sdp/library/0 /tmp/sdp/current; \
/usr/sbin/rcclick start /tmp/sdp '\""
</pre>
where unserpassword.sh is another script, that outputs the password for the WGT (for obvious reasons not recommended if anyone else has access to the script!) and returns 0.



Now the new SDP should be running and you should be able to deploy software on "your" nodes without affecting the other ones. To get rid of it and restore the original SDP (the SDP the rest of the testbed is running) just reboot the WGT.
Now the new SDP should be running and you should be able to deploy software on "your" nodes without affecting the other ones. To get rid of it and restore the original SDP (the SDP the rest of the testbed is running) just reboot the WGT.

Revision as of 17:09, 26 January 2006

Toolchain

Kernel

build.sh editieren
wichtig ist das "ccache\ "

#! /bin/sh

make CROSS_COMPILE=mipsel-linux- CC=ccache\ mipsel-linux-gcc

madwifi.stripped

  • build.sh
#!/bin/sh

make TARGET=mips-le-elf KERNELPATH=$HOME/projects/brn/madmax/mips/kernel CC=ccache\ mipsel-linux-gcc

Click Kernelmodul bauen

  • Kernel kompilieren (build.sh)
  • Click kompilieren (erst conf_mips.sh, Warning ignorieren, cd linuxmodule/, make)
  • im Verzeichnis linuxmodule: build.sh editieren
#! /bin/sh

make TARGET=mips-le-elf CROSS_COMPILE=mipsel-linux- CC=ccache\ mipsel-linux-gcc

Click Modular Router


Wer macht ähnliches?

checkout.sh

#!/bin/sh

path=$HOME

echo "Creating directories"
mkdir -p $path/projects/brn/openwrt
mkdir -p $path/projects/brn/madmax
mkdir -p $path/projects/brn/madmax/mips/click
mkdir -p $path/projects/brn/madmax/mips/kernel
mkdir -p $path/projects/brn/madmax/mips/madwifi
mkdir -p $path/projects/brn/madmax/mips/madwifi.stripped
mkdir -p $path/projects/brn/madmax/mips/brn
mkdir -p $path/projects/brn/madmax/x86

# checkout
echo "Checking out"
svn co svn://merkur/brn/archives/click-20051012/ $path/projects/brn/madmax/mips/click
svn co svn://merkur/brn/platform/wgt634u/brn/src $path/projects/brn/madmax/mips/click/elements/brn

svn co svn://merkur/brn/archives/madwifi-20051013/ $path/projects/brn/madmax/mips/madwifi

svn co svn://merkur/brn/archives/madwifi_stripped-20051015/ $path/projects/brn/madmax/mips/madwifi.stripped

svn co svn://merkur/brn/archives/linux-kernel-2.6.12-rc3/ $path/projects/brn/madmax/mips/kernel

svn co svn://merkur/brn/platform/wgt634u/brn/ $path/projects/brn/madmax/mips/brn

echo "Copying sources to x86 directory"
cp -a $path/projects/brn/madmax/mips/click/ $path/projects/brn/madmax/x86/
#cp -a $path/projects/brn/madmax/mips/kernel $path/projects/brn/madmax/x86/
cp -a $path/projects/brn/madmax/mips/madwifi/ $path/projects/brn/madmax/x86/
cp -a $path/projects/brn/madmax/mips/madwifi.stripped/ $path/projects/brn/madmax/x86/
cp -a $path/projects/brn/madmax/mips/brn/ $path/projects/brn/madmax/x86/

How to (temporarily) set up a SDP independent from the running one

  • First build everything for the new SDP. To do so, follow Bernhard's description, BUT there are two important differences:
    • Change BRN_NEIGHBOR_BEACON_MAGIC in <YOUR_BUILD_DIR>/click/include/clicknet/brn.h to a unique value. (Otherwise there will be problems with an existing SDP!)
    • Don't deploy your new package in the last step
  • Then the following has to be done for every node that is part of the new SDP infrastructure

Put the new software onto the WGT

scp -r <YOUR_BUILD_DIR>/sdp/package/library/0 root@<wgt_to_be_changed>:/tmp/sdp/library/

Then telnet to the WGT and execute the following commands

killall S90sdp
/usr/sbin/rcclick stop
killall click
echo 0 > /tmp/sdp/current_id
rm /tmp/sdp/current
ln -s /tmp/sdp/library/0 /tmp/sdp/current
/usr/sbin/rcclick start /tmp/sdp

For convenience we took all these steps using a (strange) script

ssh -XT localhost "/bin/bash -c 'SSH_ASKPASS=/home/brn/brn/unserpassword.sh \
  scp -r ~/brn/sdp/openwrt/sdp/package/library/0 root@wgt24:/tmp/sdp/library/'"

ssh -XT localhost "/bin/bash -c \"SSH_ASKPASS=/home/brn/brn/unserpassword.sh ssh -n root@wgt24 '\
killall S90sdp ;\
/usr/sbin/rcclick stop ;\
killall click; \
echo 0 > /tmp/sdp/current_id ;\
rm /tmp/sdp/current ;\
ln -s /tmp/sdp/library/0 /tmp/sdp/current; \
/usr/sbin/rcclick start /tmp/sdp '\""

where unserpassword.sh is another script, that outputs the password for the WGT (for obvious reasons not recommended if anyone else has access to the script!) and returns 0.


Now the new SDP should be running and you should be able to deploy software on "your" nodes without affecting the other ones. To get rid of it and restore the original SDP (the SDP the rest of the testbed is running) just reboot the WGT.