BeagleBone Black: Day 1

29890_1_texas_instruments_takes_aim_at_raspberry_pi_with_the_new_beagle_bone_blackI was happy to get my BeagleBone Black yesterday in the mail! These are my notes from my first day tinkering around with it. There were some growing pains using Angstrom which had a bunch of variants from utilities I’m used to, but I must say that the boot time and performance has been impressive so far, especially compared to the RasPi.

Opkg Update Fail
First time with a BBB, I tried running “opkg update”. This corrupts the Linux install and it needs to be reflashed.

Basically, all you have to do is download the latest flasher image of Angstrom, extract it to a uSD, and then hold down the boot button (the one by the USB) during a reboot. A few gotchas:

  • SD card must be 4GB or larger
  • you must use a real power supply – 5V with 1A or more. Also, don’t have anyone connected over Ethernet or it will draw power

After the four lights have illuminated one by one, you can release and watch the 45 minutes of magic.

Here are a few resources with more details:

Setting up Git on BeagleBone Black

I want git on my BeagleBone to make my development life easy. Luckily, git is already installed and working fine on the Angstrom images. However, we have the pleasure of using an ssh client other then Open-SSH: Dropbear!

I found out how to generate an ssh key and tell dropbear where to find it when Git asks for it, but was puzzled by how Git requested a passphrase which I didn’t set when generating the ssh key. Blank didn’t work and neither did root’s password, so I gave up and used ssh-keygen on another computer to generate the key (and passphrase!) before transferring it over to the BBB.

So, what it boils down to is:

  •   generate your ssh-key off Beaglebone: `ssh-keygen -t rsa -C “your_email@example.com”`
  • tell GitHub about it by copying out the public key: `xclip -sel clip < ~/.ssh/id_rsa.pub`
  • transfer it to the BBB, `mkdir /home/root/.ssh/` first, and then scp it over there.
  • create the file gitssh.sh:

#!/bin/sh
ssh -i ~/.ssh/id_rsa $*

  • make it executable, `chmod a+x gitssh.sh`
  • make sure Dropbear can find it: `export GIT_SSH=~/gitssh.sh`

Getting my Python Libraries

Turns out all the Python modules I can sudo apt-get aren’t opkg’able :(
Have no fear, it pretty easy to install Python modules… if you have some basic Python modules first:

  • opkg install python-distutils
  • opkg install python-compile
  • opkg install python-doctest

These should be enough for installing most modules using python:
Download & Install Python Modules:

  • wget http:address/to/python/module.tar.gz
  • tar -xvzf module.gz
  • cd module
  • sudo python setup.py install
  • cd ..
  • sudo rm -r module*

Start-up Scripts
Finally, something standard. rc-init is alive and well!

If you create you start-up script and make it executable, it’s pretty easy to setup.

  • cp scriptName /etc/init.d/scriptName
  • update-rc.d scriptName defaults
  • update-rc.d -f scriptName remove

Changing Local Name
I’ve got a few BBB that I will plug into my router and I’d like to give them special names. Go to `/etc/hostname` and replace `beaglebone` by `newname`.

Resources
Good support:

Leave a Comment

You must be logged in to post a comment.