Jetos

From TinyOS Wiki
Revision as of 15:08, 30 April 2008 by Ingenieroariel (talk | contribs)
Jump to: navigation, search

  1. JETOS VM - Just Enough Tiny OS Virtual Machine
  2. Based on Xubuntos reconstructor script and a tutorial on kegel.com
  3. Recipe
  1. -------------- On the host (Linux Mint Daryna in my case)

#

  1. Started with a Ubuntu 7.10 jeos VM with VMware tools installed
  2. http://www.vmware.com/appliances/directory/1164

wget http://kegel.com/linux/jeos-vmware-player/ubuntu-7.10-jeos-vmware.7z

  1. Installed 7zip to decompress the image

sudo apt-get install p7zip; 7zip -d *.7z

  1. Created a jetos folder with this README and copied the VM

mkdir jetos mv gutsy.vm* jetos

  1. Opened the virtual machine with VMware Server
  2. Edited the VM settings, to add the USB controller.
  1. -------------- On the JETOS guest --------------------------#
  2. Logged on the VM with notroot, notpass
  3. Updated the machine

sudo apt-get update; sudo apt-get upgrade

  1. Add ssh server, so the rest can be done from ssh on another system

(There is no copy paste on the VM :( ) sudo apt-get install ssh

  1. Find the ip of the server, for the remote login

ifconfig eth0

  1. Congrats, now you know the ip, let's go to the host.
  2. --------------- On the host --------------------------------#

ssh <JETOSVM_IP> -l notroot

  1. Become root, for the rest of the operations

sudo su

  1. Backup sources.list before adding the tinyos stanford repo.

cp /etc/apt/sources.list /etc/apt/sources.list.bak vim /etc/apt/sources.list

  1. Add the line: deb http://tinyos.stanford.edu/tinyos/dists/ubuntu feisty main
  1. Using Xubuntos Reconstructor module as a guide:
  2. http://toilers.mines.edu/files-XubunTOS/mod-install-tinyos.rmod

echo "Installing Tinyos..." apt-get update

  1. Prerequisites

apt-get install -y cvs subversion autoconf automake1.9 python-dev gperf swig sun-java5-jdk graphviz alien fakeroot libc6-dev build-essential

  1. Install TinyOS 2.x

apt-get install tinyos-msp430 tinyos-avr

  1. Install TinyOS 2.x contrib

cd /opt cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x-contrib

  1. Install TinyOS 2.x doc

cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x/doc

  1. We installed TinyOS 2.x from debs, but the doc/ CVS checkout creates

this unwanted directory rm -rf /opt/tinyos-2.x/CVS

  1. Install TinyOS 1.x

cd /opt cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-1.x

echo "Fetching XubunTOS-specific files..." cd / wget http://toilers.mines.edu/files-XubunTOS/XubunTOS-special-sauce.tar.gz tar xvfz XubunTOS-special-sauce.tar.gz rm XubunTOS-special-sauce.tar.gz

  1. Fix Java. We need our modified TOSComm Makefile from special sauce
  2. For TOSComm and getenv

tos-install-jni

  1. Build TOSComm

export TINYOS_VER=1 . /etc/skel/.bash_tinyos cd /opt/tinyos-1.x/beta/TOSComm make

  1. Compile Java tools

cd /opt/tinyos-1.x/tools/java; make; make unset TINYOS_VER

  1. Change ownership of the TinyOS directories to the TinyOS group

addgroup --system tinyos

  1. adduser ubuntu tinyos

chown -R root:tinyos /opt/tinyos-* chmod -R g+w /opt/tinyos-* find /opt/tinyos-* -type d -exec chmod 2775 {} \;

  1. Clean up

apt-get clean apt-get autoclean