Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Many instructions here are mirrored from Toby Schneider's instructions at http://gobysoft.org/wiki/InstallOnGumstixOvero.  

Root filesystem preparation

Follow these steps to create a debian wheezy root filesystem.  In this section we will use # host to indicate commands run on the host machine, and # chroot for commands commands run inside the chroot filesystem.  

...

To avoid permission issues, you should use your user account (not the root account) to check out subversion or git repos.  Sudo may not work in the chroot environment, so you may still need to use the root account for operations that require root access.  

...

Kernel Preparation

Install dependencies

Code Block
sudo apt-get install u-boot-tools g++-arm-linux-gnueabi

...

The resulting uImage should be built in arch/arm/boot.  Modules will be installed by the script that makes the SD card.  

...

Software setup

If it isn't already, mount /dev in the chroot:

Code Block
# host
sudo mount -o bind /dev ~/duovero/rootfs/dev

Enter the chroot and start by installing some additional Install some specific packages. 

Code Block
# chroot
apt-get install module-init-tools openssh-server screen psmisc

Add the main user to the dialout group so it can access serial ports. 

Code Block
# chroot
usermod -a -G dialout mit

Follow the steps at Software Installation to install MOOS, MOOS-IvP, Goby, and the hovergroup applications.  You   Make sure you perform these steps as the user account you created, not root.  You may wish to install distcc first to speed up compiling - see next section for instructions. Even if compiling inside the chroot, you may still want to set the compiler to distcc to avoid completely recompiling later.  Distcc will complain about not being able to distribute the compile job but will revert to using local compilation just fine.

Setup Distcc

First on the gumstix/chroot side.  The debian wheezy image we built includes g++-4.6 by default, but Ubuntu 14.04 only has the cross compiler for 4.7, so we'll install 4.7 along with distcc. 

Code Block
#chroot# chroot
apt-get install g++-4.7 distcc

There should be some symlinks in /usr/lib/distcc as follows:

Code Block
#chroot# chroot
arm-linux-gnueabi-g++-4.7 -> ../../bin/distcc
arm-linux-gnueabi-gcc-4.7 -> ../../bin/distcc

The cross compiler on the host machine will need to match the g++/gcc version listed in your symlinks.  To make distcc the default compiler add the following lines to your ~/.bashrc file:

Code Block
#chroot# chroot
export CC=/usr/lib/distcc/arm-linux-gnueabi-gcc-4.7
export CXX=/usr/lib/distcc/arm-linux-gnueabi-g++-4.7
export DISTCC_HOST=192.168.1.100  # default remote host to use

On the machine you want to distribute the compile jobs too (host) install distcc and the cross compiler.

Code Block
#host# host
sudo apt-get install distcc g++-4.7-arm-linux-gnueabi

Add two new symlinks in /usr/lib/distcc

Code Block
#host# host
cd /usr/lib/distcc
sudo ln -s ../../bin/distcc arm-linux-gnueabi-g++-4.7
sudo ln -s ../../bin/distcc arm-linux-gnueabi-gcc-4.7

Run the distcc daemon on the host

Code Block
#host# host
distccd --daemon --allow '192.168.1.0/24'

You can add this command to ~/.profile to run on login.

RTKLIB Setup

The required files are included in the third-party folder of the hovergroup svn.  Start by building the rtklib applications:

Code Block
cd# chroot
~/hoverland/hovergroup/third-partyhover-kayak/third-party/rtklib/app/makeall.sh

Then set the launch scripts corresponding to your vehicle to automatically start

Code Block
# chroot
cd /etc/init.d
sudo ln -s /home/mit/hoverland/hover-kayak/third_party/josh_rtklib/start_silvana.sh start_kayak.sh
sudo ln -s /home/mit/hoverland/hover-kayak/third_party/josh_rtklib/start_rtkrcv.sh start_rtkrcv.sh
sudo update-rc.d start_kayak.sh defaults
sudo update-rc.d start_rtkrcv.sh defaults

For some reason this doesn't seem to work when copy pasted, so you may need to type it in. 

Other Modifications

Set permissions on screen at startup

Code Block
# chroot
nano /etc/rc.local

chmod 777 /var/run/screen

Allow [machine] auto ssh login to [remote]

This is required for the automated log fetching scripts to work correctly.  For example, to allow terra to ssh into kestrel without a password prompt:

Code Block
# terra
ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.105

 

...

Deploy to SD card

Copy the required files from the hovergroup svn:

...