Angstrom can be flashed and updated onto your Beaglebone Black following this simple procedure. This method requires a microSD card, Internet connection, and a Linux based OS.
Downloading and Preparing the Image:
Download the BeagleBone Black (eMMC flasher) image form https://s3.amazonaws.com/angstrom/demo/beaglebone/BBB-eMMC-flasher-2013.06.20.img.xz
Once your image has finished downloading, type the following commands into the terminal:
- cd ~/
- mkdir bbb~/ is a shortcut to your home folder ~/ = /home/usrname
– To confirm that the directory “bbb” has been created, type ls You should see bbb listed after you hit the enter button.
Now type the following commands into the terminal:
- cd ~/bbb
- cp ~/Downloads/BBB-eMMC-flasher-2013.06.20.img.xz ./ (The ./ in the cp command defines the destination folder. The ./ destination says to copy the file into the directory(folder) we are currently in (~/bbb). If you wanted to copy the file to a different location, you would replace the ./ with the directory path you would like to copy the file into.)
- unxz BBB-eMMC-flasher-2013.06.20.img.xz
Copying the Image:
Now the image is ready to be copied to the MicroSD card. Use a USB MicroSD card reader for this.
The first thing we need to do is find the device. To do so, type the following command into your terminal prior to plugging in your USB MicroSD card reader.
- ls /dev/sd*
The output will look something like this.
Now plug the USB card reader with the MicroSD card into your computer. Once again, type in the following command:
- ls /dev/sd*
Now you should a new device:
On my system its /dev/sdd. This, however, may very likely be different on your machine.
So now that we know the path to the USB card reader, use the following command to copy the image to the microSD.
!!! Warning: Make sure you replace the /dev/sdd with the path to your USB card reader or you could destroy one of your drives
- sudo dd bs=1M if=BBB-eMMC-flasher-2013.06.20.img of=/dev/sdd
Flashing the BeagleBone Black
Make sure the BeagleBone Black is powered down. Insert the MicroSD card with the new image into the BeagleBone Black.
While holding down the BOOT Switch, plug the 5v power supply into the BeagleBone Black. (see above image for location of BOOT Switch)
Continue to hold the switch down until you see all four USRx LEDs turn on and start flashing.
This is now copying the image from the MicroSD to the BeagleBone Black. This will take approximately 45 to 60 minutes to complete.
The task of copying the image will be completed when the USRx LEDs stop flashing and all LEDs illuminated.
Once it’s completed copying the image, power down the BeagleBone Black (hold the power button down for 5-10 seconds), remove the 5v power supply, and remove the MicroSD card.
Testing the BeagleBone Black
If everything went right you should now be able to connect the BeagleBone Black to your computer via the USB cable. Also, connect the BeagleBone Black to your network via Ethernet cable. The BeagleBone Black will need access to the Internet later.
Enter the following command from the command line:
- ssh email@example.com
When asked for the password hit enter as there no password by default. The command prompt should now look like this:
NOTE: In some cases, the BeagleBone Black and the OS will not allow you to gain access to your BBB via the USB and 192.168.7.2 IP Address. If this is the case, you can access your BBB via the Ethernet connection.
To access your BBB through the Ethernet connection, you must first find the BBB’s IP Address. To do so, go to your web browser and type in the routers IP Address into the address bar.
*The router’s IP Address can be located on the back or bottom of most routers. If you cannot find it, a quick Google search for your router’s IP address (ie “What is the IP address for [linksys, d-link, etc.] router?”) will give you the answer.
Once you have accessed your router via the Internet, click on network settings, and find where it lists all devices currently plugged into your router. My router says “Number of Dynamic DHCP Clients: 2, and listed below that has my computer, and below that “beaglebone”.
Now that you have located your BeagleBone Black’s IP Address, go back to your command line and type in the following command:
- ssh firstname.lastname@example.org (put your BBB IP Address in for the x’s)
If you can’t access your BBB through either of these options, your BBB might not have been properly flashed. If this is the case, restart from the top of this tutorial.
Logging on through the Ethernet connection
Before we can upgrade/patch the OS we need to login to the Beaglebone Black via the network. To do that we need to find out what the IP address is for it.
NOTE: If you couldn’t ssh through the USB hub, but were able to ssh through the Ethernet cable, skip down to “Patching the OS” section.
Use the following command to get the IP address for the network:
The output should look something like this:
net addr:192.168.1.144 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fa20::cca0:32af:feae:5349/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:72 errors:0 dropped:39 overruns:0 frame:0
TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:10289 (10.0 KiB) TX bytes:10159 (9.9 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:280 (280.0 B) TX bytes:280 (280.0 B)
usb0 Link encap:Ethernet HWaddr 6E:5F:3C:07:A9:89
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:76 errors:0 dropped:0 overruns:0 frame:0
TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:14088 (13.7 KiB) TX bytes:13938 (13.6 KiB)
Find the device label eth0 and look for “inet addr: xxx.xxx.x.xxx”. That is the IP address of the network port on the Beaglebone Black. In my case, its 192.168.1.144.
From a new terminal, login to the Beaglebone Black with the following command:
- ssh email@example.com the 192.168.1.132 with your IP address that you just looked up.
When asked for the password hit enter there is no password by default. The command prompt should now look like this:
You are now remotely logged on to the BeagleBone Black over the network.
Patching the OS
To patch the OS, use the following commands:
- opkg update
- opkg upgrade
This can take a really long time. If you start to see errors like “Failed to download”, don’t worry! Let it complete and then type the two commands again.
Sometime it takes a few times to get everything patched.
Once there are no more errors type the following commands.
Log back in using the ssh command and Ethernet IP Address.
Congratulations! You have now flashed your BeagleBone Black with a new OS.