Difference between revisions of "Automatic installation"
Tim Bormann (talk | contribs) |
m (/tinyprod.net/debian-dev is deprecated. use the right path tinyprod.net/repos/debian) |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
==Installation== | ==Installation== | ||
− | + | <ol> | |
− | + | <li>Follow the [http://tinyprod.net/repos/debian/ guide by Eric Decker] to install the toolchain from the tinyprod repository. You will need to have gpg installed (which is quite likely already included in your distribution).</li> | |
− | < | + | <li>Get the code from the TinyOS release repository: |
− | + | <pre> | |
− | + | wget http://github.com/tinyos/tinyos-release/archive/tinyos-2_1_2.tar.gz | |
− | This will | + | tar xf tinyos-2_1_2.tar.gz |
− | < | + | </pre> |
− | + | This will extract the actual TinyOS code in a folder named <code>tinyos-release-tinyos-2_1_2</code> inside the directory the command was iussed. Feel free to rename this folder to <code>tinyos-main</code>. | |
+ | </li> | ||
+ | <li>You will need to add some enviroment variables to your shell. The following file includes the necessary ones. Substitute the placeholder <code><local-tinyos-path></code> with the path where you chose to place the code in the previous section (full path recommended). | ||
<pre> | <pre> | ||
# Here we setup the environment | # Here we setup the environment | ||
Line 25: | Line 27: | ||
</pre> | </pre> | ||
− | Suppose you named this file <code>tinyos.env</code>. There are now at least two possibilites to have these variables accessible in your shell:< | + | Suppose you named this file <code>tinyos.env</code>. There are now at least two possibilites to have these variables accessible in your shell: |
− | + | <ol> | |
− | + | <li>Place it as root user in <code>/etc/profile.d/</code></li> | |
− | + | <li>Place it in <code><local-tinyos-path></code> and add the following line to your <code>.bashrc</code><br> | |
+ | <pre>source <local-tinyos-path>/tinyos.env</pre> | ||
+ | </li> | ||
+ | </ol> | ||
You can also add the contents of the file directly to the .bashrc.<br> | You can also add the contents of the file directly to the .bashrc.<br> | ||
To make the changes work, the easiest way is to open a new terminal window.<br> | To make the changes work, the easiest way is to open a new terminal window.<br> | ||
− | < | + | </li> |
− | + | <li>In order to program motes you will need to access the serial ports. This can be done by joining the group that grants this privilege. | |
sudo gpasswd -a <your-user> dialout | sudo gpasswd -a <your-user> dialout | ||
This change only takes effect when log out and log in again. | This change only takes effect when log out and log in again. | ||
+ | </li> | ||
+ | </ol> | ||
Now you should have everything needed to get started. This guide should work on | Now you should have everything needed to get started. This guide should work on | ||
all systems based on Debian Squeeze. It has been tested on Ubuntu and Mint Linux. | all systems based on Debian Squeeze. It has been tested on Ubuntu and Mint Linux. |
Latest revision as of 21:45, 16 June 2014
With Debian based systems (like Ubuntu and Mint Linux) you have the possibility for a relative hassle-free installation by using the repository from the tinyprod project for the toolchain installation. The TinyOS code ifself is obtained from the official github.
You can also use this guide to install TinyOS on a virtual machine of your choice, as long as the installed system is compatible with the toolchain packages.
Installation
- Follow the guide by Eric Decker to install the toolchain from the tinyprod repository. You will need to have gpg installed (which is quite likely already included in your distribution).
- Get the code from the TinyOS release repository:
wget http://github.com/tinyos/tinyos-release/archive/tinyos-2_1_2.tar.gz tar xf tinyos-2_1_2.tar.gz
This will extract the actual TinyOS code in a folder named
tinyos-release-tinyos-2_1_2
inside the directory the command was iussed. Feel free to rename this folder totinyos-main
. - You will need to add some enviroment variables to your shell. The following file includes the necessary ones. Substitute the placeholder
<local-tinyos-path>
with the path where you chose to place the code in the previous section (full path recommended).# Here we setup the environment # variables needed by the tinyos # make system export TOSROOT="<local-tinyos-path>" export TOSDIR="$TOSROOT/tos" export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java export MAKERULES="$TOSROOT/support/make/Makerules" export PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python echo "setting up TinyOS on source path $TOSROOT"
Suppose you named this file
tinyos.env
. There are now at least two possibilites to have these variables accessible in your shell:- Place it as root user in
/etc/profile.d/
- Place it in
<local-tinyos-path>
and add the following line to your.bashrc
source <local-tinyos-path>/tinyos.env
You can also add the contents of the file directly to the .bashrc.
To make the changes work, the easiest way is to open a new terminal window.
- Place it as root user in
- In order to program motes you will need to access the serial ports. This can be done by joining the group that grants this privilege. sudo gpasswd -a <your-user> dialout This change only takes effect when log out and log in again.
Now you should have everything needed to get started. This guide should work on all systems based on Debian Squeeze. It has been tested on Ubuntu and Mint Linux.