Skip to content

Instantly share code, notes, and snippets.

@zankich
Last active August 29, 2015 13:57
Show Gist options
  • Save zankich/9419358 to your computer and use it in GitHub Desktop.
Save zankich/9419358 to your computer and use it in GitHub Desktop.
Beaglebone Black Ubuntu 13.10 Install instructions

Beaglebone black ubuntu 13.10 instructions

On host machine

Installation

  • Insert SD card and hold down the sd card boot button on the beaglebone black host: ubuntu-armhf, user: ubuntu, pass: ubuntu

  • resize filesystem

  • create swap

    • $ sudo fallocate -l 1G /swapfile
    • $ sudo chmod 600 /swapfile
    • $ sudo mkswap /swapfile
    • $ sudo swapon /swapfile
    • $ sudo -- sh -c 'echo "/swapfile none swap defaults 0 0" >> /etc/fstab'
  • install core system packages

  • ethernet over usb

  • change user password

    • $ passwd
  • set hostname

    • $ sudo hostname new-hostname
    • edit /etc/hosts
      • 127.0.1.1 new-hostname
    • edit /etc/hostname
      • new-hostname
  • install nodejs

  • install golang

    • $ curl -O https://go.googlecode.com/files/go1.2.1.src.tar.gz
    • $ tar xvf go1.2.1.src.tar.gz
    • $ mv go go1.2.1
    • $ cd go1.2.1/src
    • $ ./all.bash
    • $ echo "export GOPATH=/home/ubuntu/go1.2.1/gopath" >> ~/.profile
    • $ echo "export GOROOT=/home/ubuntu/go1.2.1" >> ~/.profile
    • $ echo "export PATH=$PATH:$GOROOT/bin:$GOPATH/bin" >> ~/.profile
  • install ruby

    • $ sudo apt-get install libssl-dev zlib1g-dev libreadline-dev libyaml-dev flex gettext libffi-dev
    • $ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
    • $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
    • $ echo 'eval "$(rbenv init -)"' >> ~/.profile
    • restart your terminal session
    • $ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
    • $ rbenv install 2.1.1
    • $ rbenv rehash
    • $ rbenv global 2.1.1
    • $ gem install bundler
    • $ rbenv rehash
  • install jruby

    • Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html and download Linux ARM v6/v7 Hard Float ABI
    • from your host machine
      • $ scp jdk-7u51-linux-arm-vfp-hflt.tar.gz ubuntu@192.168.7.2:/home/ubuntu
    • on bbb
      • $ tar xvf jdk-7u51-linux-arm-vfp-hflt.tar.gz
      • $ rm jdk-7u51-linux-arm-vfp-hflt.tar.gz
      • $ echo "export JAVA_HOME=/home/ubuntu/jdk1.7.0_51" >> ~/.profile
      • $ echo "export PATH=$JAVA_HOME/bin:$PATH" >> ~/.profile
      • $ rbenv install jruby-1.7.9
      • $ rbenv rehash
      • $ rbenv shell jruby-1.7.9
      • $ gem install bundler
      • $ rbenv rehash
  • install desktop env

    • $ sudo apt-get install xfce4 tightvncserver
    • $ mkdir .vnc
    • $ touch .vnc/xstartup
    • add contents to .vnc/xstartup
       #.vnc/xstartup
       #!/bin/sh
       # Uncomment the following two lines for normal desktop:
       # unset SESSION_MANAGER
       # exec /etc/X11/xinit/xinitrc
       [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
       [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
       xsetroot -solid grey
       vncconfig -iconic &
       x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
       startxfce4 &
      
    • $ vncpasswd
    • $ chmod +x ~/.vnc/xstartup
    • $ touch ~/start_vnc.sh
    • $ echo "#!/bin/bash" > ~/start_vnc.sh
    • $ echo "starvcnserver" >> ~/start_vnc.sh
    • $ chmod +x start_vnc.sh
  • configure bluetooth

    • $ sudo apt-get install bluez bluez-utils blueman
    • $ usermod -a -G lp ubuntu
  • install frameworks

    • $ gem install artoo
    • $ rbenv rehash
    • $ sudo npm install -G cylon
    • $ go get github.com/hybridgroup/gobot
    • $ go install github.com/hybridgroup/gobot/gobot
  • default pins to no pull

     /*  
     * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Purpose License Version 2 as
     * published by the Free Software Foundation
     *
     */
     
     /dts-v1/;
     /plugin/;
     
     /{
     	compatible = "ti,beaglebone", "ti,beaglebone-black";
     	part-number = "CYLON-GPIO";
     	version = "00A0";
     
     	fragment@0 {
     		target = <&am33xx_pinmux>;
                 
     		__overlay__ {
     			pinctrl_test: CYLON_GPIO_Pins {
     				pinctrl-single,pins = <
     					0x070 0x2f
     					0x078 0x2f
     					0x074 0x2f
     					0x048 0x2f
     					0x040 0x2f
     					0x04c 0x2f
     					0x15c 0x2f
     					0x158 0x2f
     					0x154 0x2f
     					0x150 0x2f
     					0x044 0x2f
     					0x184 0x2f
     					0x180 0x2f
     					0x1a4 0x2f
     					0x1b4 0x2f
     					0x164 0x2f
     					0x090 0x2f
     					0x094 0x2f
     					0x09c 0x2f
     					0x098 0x2f
     					0x034 0x2f
     					0x030 0x2f
     					0x024 0x2f
     					0x028 0x2f
     					0x03c 0x2f
     					0x038 0x2f
     					0x02c 0x2f
     					0x08c 0x2f
     					0x020 0x2f
     					0x07c 0x2f
     				>;
     			};
     		};
     	};
     	fragment@1 {
     		target = <&ocp>;
     		__overlay__ {
     			test_helper: helper {
     				compatible = "bone-pinmux-helper";
     				pinctrl-names = "default";
     				pinctrl-0 = <&pinctrl_test>;
     				status = "okay";
     			};
     		};
     	};
     };
    
    • $ dtc -O dtb -o CYLON-GPIO-00A0.dtbo -b 0 -@ CYLON-GPIO.dts
    • $ sudo mv CYLON-GPIO-00A0.dtbo /lib/firmware/
    • $ rm CYLON-GPIO.dts
    • add to /etc/rc.local
      • echo CYLON-GPIO > /sys/devices/bone_capemgr.9/slots
  • backup image

    • On host machine
      • $ sudo apt-get install pxz
      • $ sudo dd bs=1M count=3950 if=/dev/sdb of=./image.img && sudo sync
      • $ tar -c --use-compress-program=pxz -f image.img.tar.xz image.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment