Difference between revisions of "Installing from SCM"

From TinyOS Wiki
Jump to: navigation, search
m (fix tinyos-2.x-contrib gitweb url)
(mention github)
 
(17 intermediate revisions by 6 users not shown)
Line 1: Line 1:
NOTE: It is highly recommended to remove the system-wide tinyos-tools package when using the TinyOS from CVS/GIT.
+
NOTE: It is highly recommended to remove the system-wide tinyos-tools package when using the TinyOS from a SCM such as GIT.
 
Git repositories mirroring the TinyOS CVS repository can be found at:
 
Git repositories mirroring the TinyOS CVS repository can be found at:
* <code>git clone git://hinrg.cs.jhu.edu/git/tinyos-2.x.git</code> [http://hinrg.cs.jhu.edu/git/?p=tinyos-2.x.git TinyOS 2.x gitweb]
+
* <code>git clone https://github.com/tinyos/tinyos-main.git</code> [https://github.com/tinyos/tinyos-main official github]
* <code>git clone git://hinrg.cs.jhu.edu/git/tinyos-2.x-contrib.git</code> [http://hinrg.cs.jhu.edu/git/?p=tinyos-2.x-contrib.git TinyOS 2.x contrib gitweb]
+
* <code>git clone git://github.com/tyll/tinyos-2.x-contrib.git</code> [http://github.com/tyll/tinyos-2.x-contrib TinyOS 2.x contrib github]
 +
 +
  
You can use it instead of the [https://sourceforge.net/scm/?type=cvs&group_id=28656 CVS-repository], that is by default used in this installation guide for Ubuntu:
+
== Enable the tinyos tools repository ==
== Step 0: Enable the Stanford tinyos repository ==
 
  
sudo echo "deb http://tinyos.stanford.edu/tinyos/dists/ubuntu hardy main" >> /etc/apt/sources.list
+
Stanford hosts the primary Debian/Ubuntu tools repository.
sudo apt-get update
 
  
== Step 1: Install the nesc compiler ==
+
The TinyOS Ubuntu pool is the same across all current distributions.  So specifing "lucid" works as the distribution specifier.
  
sudo apt-get install nesc
+
  sudo echo "deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main" >> /etc/apt/sources.list
 +
  # or sudo apt-add-repository "deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main"
  
The Stanford repository contains the 1.3.0 which has a required dependency on sun-java5-jdk/sun-java6-jdk. If you are using a newer version of Ubuntu or Debian that doesn't provide this, you can install the nesc 1.3.1:
 
  
wget http://cs.jhu.edu/~razvanm/wsn/debian/nesc-1.3.1.deb
+
  sudo apt-get update
sudo dpkg -i nesc-1.3.1.deb
 
  
If you need the 64-bit of nesc 1.3.1 you can get it like this:
 
  
wget http://cs.jhu.edu/~razvanm/wsn/debian/64/nesc-1.3.1.deb
+
== Install the nesc compiler ==
sudo dpkg -i negc-1.3.1.deb
 
  
== Step 2: Install the crosstools ==
+
sudo apt-get install nesc
 +
 
 +
 
 +
== Install the crosstools ==
  
 
Debian MSP430:
 
Debian MSP430:
  
  sudo apt-get install msp430-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos
+
  sudo apt-get install msp430-tinyos
  
 
Debian AVR:
 
Debian AVR:
Line 34: Line 34:
 
  sudo apt-get install avr-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos
 
  sudo apt-get install avr-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos
  
== Step 3: Checkout the TinyOS 2.x source tree ==
+
== Checkout the TinyOS 2.x source tree ==
 +
Checkouts from TinyOS GIT repository are read-only.
  
 
  cd ~
 
  cd ~
 
  mkdir -p local/src
 
  mkdir -p local/src
 
  cd local/src
 
  cd local/src
  cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x
+
  git clone https://github.com/tinyos/tinyos-main.git tinyos-2.x
 
 
If you want to use git then instead of the last command you can do:
 
 
 
git clone git://hinrg.cs.jhu.edu/git/tinyos-2.x.git
 
 
 
== Step 4: Compile the TinyOS tools ==
 
  
 +
== Compile the TinyOS tools ==
 +
  sudo apt-get install automake
 
   cd tinyos-2.x/tools
 
   cd tinyos-2.x/tools
 
   ./Bootstrap
 
   ./Bootstrap
Line 55: Line 52:
 
A few ENTERs will be required by the last two commands.
 
A few ENTERs will be required by the last two commands.
  
== Step 5: Set the environment variables ==
+
== Set the environment variables ==
  
 
Add the following to .profile (or .bash_profile or .bashrc depending on your system):
 
Add the following to .profile (or .bash_profile or .bashrc depending on your system):
Line 65: Line 62:
 
  export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
 
  export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
 
  export PYTHONPATH=.:$TOSROOT/support/sdk/python:$PYTHONPATH
 
  export PYTHONPATH=.:$TOSROOT/support/sdk/python:$PYTHONPATH
  export PATH=$HOME/local/src/tinyos-2.x/support/sdk/c:$PATH
+
  export PATH=$TOSROOT/support/sdk/c:$PATH
 
 
== See also ==
 
 
 
*[[TinyOS CVS access]]
 
  
  
 
[[Category:Installation]]
 
[[Category:Installation]]

Latest revision as of 11:36, 15 March 2013

NOTE: It is highly recommended to remove the system-wide tinyos-tools package when using the TinyOS from a SCM such as GIT. Git repositories mirroring the TinyOS CVS repository can be found at:


Enable the tinyos tools repository

Stanford hosts the primary Debian/Ubuntu tools repository.

The TinyOS Ubuntu pool is the same across all current distributions. So specifing "lucid" works as the distribution specifier.

 sudo echo "deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main" >> /etc/apt/sources.list
 # or sudo apt-add-repository "deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main"


 sudo apt-get update


Install the nesc compiler

sudo apt-get install nesc


Install the crosstools

Debian MSP430:

sudo apt-get install msp430-tinyos

Debian AVR:

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

Checkout the TinyOS 2.x source tree

Checkouts from TinyOS GIT repository are read-only.

cd ~
mkdir -p local/src
cd local/src
git clone https://github.com/tinyos/tinyos-main.git tinyos-2.x

Compile the TinyOS tools

 sudo apt-get install automake
 cd tinyos-2.x/tools
 ./Bootstrap
 ./configure --prefix=$HOME/local
 make all
 make install

A few ENTERs will be required by the last two commands.

Set the environment variables

Add the following to .profile (or .bash_profile or .bashrc depending on your system):

export PATH=$HOME/local/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:$PYTHONPATH
export PATH=$TOSROOT/support/sdk/c:$PATH