2010年3月29日星期一

Install TinyOS 2 on Ubuntu (ZZ)

You might need to remove brltty:

sudo apt-get remove brltty



The steps for Debian/Ubuntu are:

1. Add the following to the apt repository list (/etc/apt/sources.list):

deb http://tinyos.stanford.edu/tinyos/dists/ubuntu feisty main


2. Update your apt repository cache:

# sudo apt-get update


3. Install the support for MSP430:

# sudo apt-get install msp430tools-base-tinyos msp430tools-binutils-tinyos msp430tools-gcc-tinyos msp430tools-libc-tinyos

4. Install the support for AVR:

# sudo apt-get install avr-binutils-tinyos avr-gcc-tinyos avr-libc-tinyos


5. Install the nesC compiler:

# sudo apt-get install nesC

or download it from http://sourceforge.net/projects/nescc -

~/local/src/nesc-1.3.0$ ./configure --prefix=$HOME/local

~/local/src/nesc-1.3.0$ make

~/local/src/nesc-1.3.0$ make install



6. Install GIT:

# sudo apt-get install git-core


7. Install CURL:

# sudo apt-get install curl


8. Install Automake and so on:

# sudo apt-get install automake


9. Install GCC and so on:

# sudo apt-get install libc6-dev g++ gcc


10. Install Sun Java.
11. Checkout and compile the latest version of TinyOS2 (you can also use the official TinyOS CVS):

~/local/src$ git clone http://hinrg.cs.jhu.edu/git/tinyos-2.x.git

~/local/src$ cd tinyos-2.x/tools

~/local/src/tinyos-2.x/tools$ ./Bootstrap

~/local/src/tinyos-2.x/tools$ ./configure --prefix=$HOME/local

~/local/src/tinyos-2.x/tools$ make all (a bunch of ENTERs will be required)

~/local/src/tinyos-2.x/tools$ make install (some more ENTERs will be required)


12. Set the environment variables (add this to ~/.bashrc or ~/.bash_profile):

export PATH=$HOME/local/bin:/opt/msp430/bin:$PATH

export TOSROOT=$HOME/local/src/tinyos-2.x

export TOSDIR=$TOSROOT/tos

export MAKERULES=$TOSROOT/support/make/Makerules

export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.

export PYTHONPATH=$TOSROOT/support/sdk/python:$HOME/local/lib/tinyos:$PYTHONPATH

export PATH=$HOME/local/src/tinyos-2.x/support/sdk/c:$PATH

没有评论:

发表评论