I’ve had a lot of problems trying to update the OpenROV software from the default image. I keep on getting npm errors and install script errors. I’ve tried all the suggestions from the wiki and also forum.
So I decided to try and build my own image from Source after noticing on Github a recent change to using Vagrant with instructions on building your own image. I already had a copy of Virtual box and so decided to give it a try. I’m on Mac OSX system but it should work on other systems.
I had some problems with the build and after speaking to Bryan A on the OpenROV downgraded my copy of VirtualBox to version 4.2.10.
- Download and install a copy of Vagrant from http://www.vagrantup.com/
- I already had a recent copy of Virtual box, but this can be downloaded from http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html
- Clone the github file from https://github.com/OpenROV/openrov-image locally I used GitHUB desktop to do this.
- Using Terminal chang into the directory where cloned the repository openrov-image
- Type the command “vagrant up” On my system this started a number of commands but hung at “Waiting for VM to boot. This can take a few minutes.” A quick trip to Google revealed that others have experienced the same problem. First I had to stop the running image this can be done by typing the command “VBoxManage list runningvms” followed by BoxManage controlvm <id of running image> poweroff
- I fixed it by running up the Virtual box and starting the image manually. I closed the image then tried the Vagrant up command again this time the image seemed to spin up and download a number of different files before exiting back to the command prompt
- Type the command “vagrant ssh” to ssh into the image, Windows users will probably need to use putty to do this.
- change to the vagrant directory cd /vagrant
- and run the build “./build.sh”
- This will take sometime so go and have a cup of tea, at the end hopefully we should have a completed build ready for installation to the SDCard
- One problem was getting the system to recognise the SDCard the following instructions from http://superuser.com/questions/373463/how-to-access-an-sd-card-from-a-virtual-machine/#45808 was one solution and these instructions are repeated below:
On newer MacBook Pro’s the SD card slot is no longer exposed as a USB device. Because of this you’ll need to attach the raw device to the VM in order to gain raw access to the whole card. Full documentation is in the Advanced Storage Configuration section of the VirtualBox documentation.
As clearly stated in the docs:
As a quick guide these are the steps to attach the device to a linux VM:
With the system now recognising the SDCard we could move onto installing the image to it
- Change to the build directory cd /vagrant/work/omap-image-builder/deploy/2013-07-20/ubuntu-12.04-r8-minimal-armhf-2013-07-20/
- Probe to get the SDCard “
sudo ./setup_sdcard.sh --probe-mmc" Note /dev/sdb
- I also needed to install some extra dependencies to get the install to run “sudo apt-get install wget pv dosfstools parted git-core”
- Finally we could install the image to the SD Card by issuing the command “
sudo ./setup_sdcard.sh --mmc /dev/sdb --uboot "bone""
- When finished you can log out of the VirtualBox and then call “vagrant halt” to stop the virtual system