Cette page appartient aux archives web de l'EPFL et n'est plus tenue à jour.
This page belongs to EPFL's web archive and is no longer updated.


Setting-up lca2-s1-pc4 from scratch
Since lca2-s1-pc4 crashed a few days ago, we had to reinstall everything.

Michal installed Ubuntu, but we still need to configure all the other applications
(tinyos, wasadmin, etc) needed.

In this article, I'm going to try to establish (finally) a step-by-step guide for
setting up a working environment for WASAL under ubuntu

0. Initial conditions
- Freshly installed Ubuntu distribution (Breezy Badger)
- Access to a bash terminal with root privileges

1. Add package repositories :
Edit /etc/apt/sources.list to include the following lines :

deb ftp://sunsite.cnlab-switch.ch/mirror/ubuntu breezy main restricted universe multiverse
deb-src ftp://sunsite.cnlab-switch.ch/mirror/ubuntu breezy main restricted universe multiverse

Then, run :

# apt-get update
(This should take approximately one minute)

2. Install make :
# apt-get install make

3. Install Blackdown java sdk
# apt-get install j2sdk1.4

4. Install a cvs client :
# apt-get install cvs

5. Download latest tinyOS snapshot in /opt
# touch ~/.cvspass
# cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
# cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-1.x

6. Install necessary AVR compiling tools
# apt-get install binutils-avr
# apt-get install gcc-avr

7. Install C compiler (gcc)
# apt-get install gcc
Will install gcc-4.0
# apt-get install linux-kernel-headers
# apt-get install g++
# apt-get install libc6-dev

8. Download nesc in /usr/src and build :
# wget http://switch.dl.sourceforge.net/sourceforge/nescc/nesc-1.2.4.tar.gz
# tar xzvf nesc-1.2.4.tar.gz
# cd nesc-1.2.4
# ./configure
# make
# make install

9. Install java Comm API
# cd /usr/src
# cp IBMjavaComm.tgz .
# tar xzf IBMjavaComm.tgz
# cp -r IBMJava2-142/jre/ /usr/lib/j2se/1.4/

10. Build tinyOS :
# cd /opt/tinyos-1.x
# make
# make install

Set up environment variables by adding in /etc/bash.bashrc :

export TOSROOT
export TOSDIR

Build java tools :

# bash
# cd $TOSROOT/tools/java
# make

11. Build Shockfish related tools (cf $TOSROOT/contrib/shockfish/README)

11a. Install gcc-3.4 (script fails with gcc-4.0)
# apt-get install gcc-3.4

11a. Build mspgcc toolchain :
#cd $TOSROOT/tools/src/mspgcc

Apply attached patch to correct mirrors and SourceForge cvs address in build-mspgcc script :
#patch build-mspgcc mirrosAndCVS.patch

# CC="gcc-3.4" ./build-mspgcc install

Add msp toolchain binaries to the PATH, by adding the following in /etc/bash.bashrc :

11b. Download MSP bootstrap loader
# apt-get install python-serial
# cd /opt/msp430/bin
# wget http://mspgcc.cvs.sourceforge.net/*checkout*/mspgcc/pybsl/bsl.py
# ln -s bsl.py msp430-bsl
# chmod a+x bsl.py

Add msp430 binaries to PATH by adding the following in /etc/bash.bashrc :
export PATH="$PATH:/opt/msp430/bin"

11c. Setup environnment for ShockFish
In /etc/bash.bashrc add :

export TOSMAKE_PATH="$TOSDIR/../contrib/shockfish/tools/make"
export MAKERULES="$TOSDIR/../tools/make/Makerules"

11d. Build Java Toolchain

We need ncc, so :
# apt-get install autoconf automake
# cd $TOSROOT/tools/src/ncc
# ./Bootstrap
# ./configure
# make install

Then, build Shockfish Java Toolchain :

# cd $TOSROOT/contrib/shockfish/tools/java
# make
Add it in the CLASSPATH, before tinyOS's classes, by modifying the line we entered earlier in /etc/bash.bashrc :


Build tinyOS Java Toolchain :
# cd $TOSROOT/tools/java
# make

12. Install RealPort drivers

Install kernel source :
# cd /usr/src
# apt-get install linux-source
# tar xjf linux-source-????.tar.bz2
# ln -s linux-source-???? linux-`uname -r`
# cp -v /boot/config-`uname -r` linux-`uname -r`/.config
# make -C linux-`uname -r`
(Feel free to interrupt with Ctrl-C after a few seconds)

Install ncurses (needed) :
# apt-get install libncurses-dev

Install digiConnect ME drivers :
# wget http://ftp1.digi.com/support/driver/40002086_M.tgz
# tar xzf 40002086_M.tgz
# cd dgrp-1.9/
# ./configure
# make all
# make install
# make postinstall
Posted by Aristidis Papaioannou at 17:45
Comments (1)
PicoTux Initialisation : Nothing happens after system flash
- It appears that the hardware problem we encountered while initializing our PicoTux (no activity after system flash) was indeed due to the fact that we were using a HUB (as suggested by Kleinhenz' support). However, the fact that it was a 10BaseT doesn't seem to be the source of the problem. I've tried several configurations, and got the following results so far :
- Picotux <=> PC : OK
- Picotux PC : OK
- Picotux <=> No Auto-sensing 10/100BaseT switch : OK
- Picotux No Auto-sensing 10/100BaseT switch : OK
- Picotux <=> 10BaseT HUB : NOT OK
- Picotux <=> 100BaseT HUB : NOT OK

So, basically, as long as we don't use a HUB, we're fine. Nevertheless, i'd like to try a 10/100BaseT swith with auto-sensing, in order to fuly understand how the physical link is established.
Posted by Aristidis Papaioannou at 23:08
Comments (2)