I know you gonna love me.
This tutorial is a mix of several descriptions of how to set up BeagleBone on Ubuntu.
Connect with your BeagleBone
There are several methods to do so.
The easiest one when usb is connected:
mzperx@geburah:~$ screen /dev/ttyUSB1 115200
ttyUSB1 depends on what you have connected to your computer, try some from `ls /dev/ttyUSB*`
If your BeagleBone is connected to the same network as your computer (ie: you plugged it into your router using a UTP cable), you can try to locate it using a networking tool or try to connect to it using it’s default address: 192.168.7.1.
If not, you can try the USB method and running ifconfig to see what ip the device received from the DHCP server of your router. You can try ‘Network’ from Gnome (type Network in the app launcher of Ubuntu 11.04), sometimes the BeagleBone advertises itself by the name of “beaglebone”, if so you can connect to it by typing:
mzperx@geburah:~$ ssh email@example.com
If not, you can go for the ifconfig method and connect using the pure IP.
mzperx@geburah:~$ ssh firstname.lastname@example.org
The default root password on the BeagleBone is “root”.
This part is based on this page: http://borderhack.com/?p=1062
First of all, you might would like to create a backup of your currently working SD card. You can do this by creating a byte-by-byte copy using ‘dd’.
Insert the SD card of your Beagle into your computer.
The easiest way to find out where your SD card got mounted is to run dmesg.
o@ubuntu:$ dmesg | tail
[291266.566727] sd 68:0:0:0: Attached scsi generic sg3 type 0
[291266.575483] sd 68:0:0:0: [sdc] 7626752 512-byte logical blocks: (3.90 GB/3.63 GiB)
[291266.577006] sd 68:0:0:0: [sdc] Write Protect is off
[291266.577017] sd 68:0:0:0: [sdc] Mode Sense: 0b 00 00 08
[291266.577024] sd 68:0:0:0: [sdc] Assuming drive cache: write through
[291266.579100] sd 68:0:0:0: [sdc] Assuming drive cache: write through
[291266.579114] sdc: sdc1 sdc2
[291266.584546] sd 68:0:0:0: [sdc] Assuming drive cache: write through
[291266.584559] sd 68:0:0:0: [sdc] Attached SCSI removable disk
In this case it was mounted to sdc, on Ubuntu it is usually something more complicated.
After you managed to find out it’s name you should unmount the device to avoid nasty corruption scenes while copying.
mzperx@geburah:~$ sudo umount /dev/mmcblk0p1 #or whatever ubuntu offers 🙂
Create the backup in a compressed file. This might take 10 minutes.
mzperx@geburah:~$ sudo dd if=/dev/mmcblk0 bs=8M | gzip -c > beaglebone_default.img.gz
Should you ever need to restore this backup:
mzperx@geburah:~$ zcat beaglebone_default.img.gz | sudo dd of=/dev/mmcblk0 bs=8M
From here on you can choose 2 different paths.
Update to the latest Angström version
You can choose to update Angström or directly put Ubuntu on it – below.
You can download the latest binaries from here: http://downloads.angstrom-distribution.org/demo/beaglebone/
SD card in your PC.
To install the version of your choice you have to do something like this:
mzperx@geburah:~$ xz -dkc Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.04.22.img.xz > /dev/mmcblk0
No preparations needed, you can overwrite all stuff on the card.
After restarting you might experience problems if you are using beaglebone.local to ssh. Restarting your router will solve this problem (not too nice though). Should you need to reset your known_hosts file, Ubuntu will tell you how when needed.
You are good to go with your updated Angström distribution.
Install Ubuntu on the BeagleBone
To update your Angström check the above part.
Install Ubuntu core system
This description is based on this wiki page which I found a bit messy.
Get the pre-built image:
Verify the image:
Should output this:
Unpack your image on your PC:
tar xJf ubuntu-11.10-r8-minimal-armel.tar.xz
To find out the location of your SD you can use this script: (also check the Angström update description above)
sudo ./setup_sdcard.sh --probe-mmc
Now to push the image onto the card:
sudo ./setup_sdcard.sh --mmc /dev/mmcblk0 --uboot "bone"
This will take a few minutes. It basically formats the card and does the same process you did if you followed the Angström update part.
After this process you should have a ready-to-use Ubuntu on your Beaglebone.
If you try to reach it with screen you should see something like this after login (default user: ubuntu, default password:temppwd)
If you are fast enough you can even see Ubuntu booting 🙂
For a brief list of common commands check this page out: https://help.ubuntu.com/community/UsingTheTerminal#Commands
Custom kernel for Ubuntu (Optional)
I will describe the “install from sources” version method here.
Still using your computer (not the BeagleBone!) do these:
git clone git://github.com/RobertCNelson/linux-dev.git
git checkout origin/am33x-v3.2 -b am33x-v3.2
You will get the usual kernel config app with which you can tweak your future kernel. This process will take a while (15 minutes on my laptop).
To install the built kernel use linux-dev/tools/install_image.sh script.
Usually it does not happen but if you have trouble that there’s no network after Ubuntu took over the Beaglebone try this. (Beaglebone plugged into your router via ethernet and also USB to your PC, and you are now talking to it over USB (since you have problems with the network :)))
sudo ifconfig -a
sudo dhclient eth0 (or wlanX/etc..)
If this solved your problem, modify your /etc/network/interfaces:
iface eth0 inet dhcp