Small Linux Virtual Box Image - NUbots/robocup GitHub Wiki
I have made a small virtual box image capable of compiling the code for the NAO. The steps I used to make the image are as follows:
- Download the “Alternate Install” CD for Ubuntu, and attached it to the virtual box’s CD drive.
- At the welcome screen press F4, and select install command line system.
- Following the on screen installation instructions.
- Run the following command
sudo aptitude update
. - Run the following command
sudo aptitude install fluxbox xorg slim xfe
. You can skip this step if you don’t want any graphics. You can also swapxfe
fornautilus
for a more familiar interface. - Run the following command
sudo aptitude install avahi-daemon
.
Now we have an awesome Linux OS, we need to set up Aldebaran’s SDK and the cross-compiler.
- Download the SDK and the cross-compiler from Aldebaran’s website.
- Put the cross-compiler in side the sdk in a new directory called crosstoolchain
- Copy the sdk and cross-compiler with a command like
scp -rC robocup
computer.local:/Desktop/aldebaran-sdk-v1.6.0-linux naoqi@. The sdk and cross compiler combined are about 1GB. - Add the
export AL_DIR=/home/robocup/naoqi
to your .profile.
Now we need to install the following things to work with the code
- Install cmake with
sudo aptitude install cmake cmake-curses-gui
At this stage you have everything you need to compile code for the NAO. The image will be about 2.6GB.
A handy feature to have is to use the VirtualBox’s shared folders to mount the source directory on the host inside the guest. To do this means you need to install the VirtualBox’s guest additions. This means you will need to install a bunch of packages, and this will take up a fair amount of disk space. Decide for your self whether you want to use this feature.
- To compile the guest additions you will need to run
sudo aptitude install build-essential linux-headers-2.6.31-14-generic
- Mount the guest additions iso with
mount /dev/disk/by-label/VBOXADDITIONS_3.
. This will mount the cd-rom in/cdrom
. - Run
sudo sh /cdrom/VBoxLinuxAdditions-x86.run
. - Now edit your fstab with
sudo nano /etc/fstab
and add the following line at the bottomsharedname /home/robocup/code vboxsf rw,uid=1000,gid=1000 0 0
.
This will increase the image size up to about 3GB. But now you don’t have to use scp to copy you local source directory to the virtual machine.
- To open a very basic file manager run the following:
startx
and thenxfe
.