Skip to content

Instantly share code, notes, and snippets.

@codewithpassion
Created August 7, 2013 13:03
Show Gist options
  • Save codewithpassion/6173849 to your computer and use it in GitHub Desktop.
Save codewithpassion/6173849 to your computer and use it in GitHub Desktop.
The script, or rather step by step approach, to take a beaglebone ubuntu demo image and make it into an OpenROV image. The lines prefixed with ## are not shell commands but rather stuff that needs to be done
tar xf ../../ubuntu-saucy-console-armhf-2013-07-22.tar.xz
cd ubuntu-saucy-console-armhf-2013-07-22/
mkdir root
cd root
tar xf ../armhf-rootfs-ubuntu-saucy.tar
mount --bind /dev/ dev/
mount --bind /proc/ proc/
mount --bind /sys/ sys/
mount --bind /run/ run/
mount --bind /etc/resolv.conf etc/resolv.conf
cp /usr/bin/qemu-arm-static usr/bin/
cd /opt
git clone https://github.com/OpenROV/openrov-software.git openrov
cd openrov
npm install --arch=arm
chroot .
apt-get update
apt-get upgrade
apt-get install linux-firmware devmem2 python-software-properties python-configobj python-jinja2 python-serial gcc g++ make libjpeg-dev picocom zip unzip dhcpd vim ethtool arduino-core avr-libc avrdude binutils-avr
##build node
##copy node
##fix npm (path to node)
cd /tmp
git clone https://github.com/amperka/ino.git
cd ino
wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
make install
git clone https://github.com/codewithpassion/mjpg-streamer.git
cd mjpg-streamer/mjpg-streamer
make install
cd /opt/openrov
/opt/node/bin/npm rebuild
useradd rov -p OpenROV -g ubuntu -G admin
ln -s /opt/openrov/linux/openrov.service /etc/init.d/openrov
chmod +x /opt/openrov/linux/openrov.service
update-rc.d openrov defaults
echo OpenROV > /etc/hostname
## FIX /etc/hosts
##
##127.0.0.1 localhost
##127.0.1.1 OpenROV
##fix network/interfaces
##fix /etc/dhcpd/dhcp.client
## we are done, go back to the real environment ant tar up the stuff!
exit
umount etc/resolv.conf
umount run
umount sys
umount proc
umount dev
tar cf ../armhf-rootfs-ubuntu-saucy.tar .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment