The current shipping kernel version of the BeagleBone Black is 3.8. However, it is fairly easy to upgrade to 3.13 with the help of Robert Nelson’s scripts. Why upgrade to 3.13? Well, mainly because the support for the OMAP hardware random number generator, OMAP crypto accelerators, and TPM support are available. The TI crypto hardware (hwrng and AES, MD5, and SHA accelerators) are enabled by default in the BeagleBoard images. To enable I2C TPM support, we need to configure the kernel. The CryptoCape, which will be soon available at SparkFun Electronics, will have the Atmel 1.2 TPM.
There are three parts to this post. The first is how to flash Debian to the eMMC. This is not technically a prerequisite, but I keep looking this information up all over the web and I finally decided to write it down. This is how I setup all of my BBBs. The second section is how to use the scripts to quickly upgrade to the 3.13. The last section shows how to customize the kernel and add TPM support.
However, know that not everything is working in 3.13. The following is status list, taken from the BBB 3.13 kernel repo:
- I2C: working
- SPI: working
- MMC: mmc1 working, mmc2 working
- USB host: working
- USB gadget: working: usb eth, usb drive
- HDMI: working
- LCDC: lcd3/lcd4/lcd7/dvi: untested
- TS: untested
- ADC: untested
- PWM: untested
- PMIC: untested
- PMIC PWM: untested
- CPUfreq: not working
- Capes: untested
- AUDIO: untested
As you can see, not everything is working. Also, there is no capemgr in 3.13. Proceed at your own risk!
Section 1: Install Debian to the eMMC
Recently, BeagleBoard.org starting releasing officially supported Debian images on their latest images page. I like the eMMC flasher image which appropriately flashes this image to the eMMC. 😉 Go ahead and download that. The rest of this post assumes you are running some sort of linux. Check out Adafruit’s tutorial for Mac or Windows instructions.
- Extract the image and copy over to your SD card. The SD card part (of) will be custom to your machine. Be very sure you are copying to your SD card and not your bootable hard drive! This took 11 minutes on my laptop.
unxz *.xz sudo dd if=./BBB-eMMC-flasher-debian-7.4-2014-03-04-2gb.img of=/dev/mmcblk0
- Power off the BBB and insert the microSD card.
- While holding down the USER BOOT button, plug in the power cord for the BBB.
- Release the USER BOOT button when all 4 LEDs are lit (this happens quickly).
- Get some coffee. It could take up to 15 minutes for the image to copy over.
- When all four LEDs are lit again, the procedure is complete. Remove the micro SD card and reboot.
- The default user name is
debianand the password is
temppwd. The root account password is
root. Hey, at least it’s not
As far as I know, it’s very difficult to “brick” the BBB. If you hose the eMMC, you can always boot from the micro SD with the SD card image. Then, once booted from the micro sd, perform the following1:
cd /opt/scripts/tools git pull sudo ./beaglebone-black-eMMC-flasher.sh
Then cycle power to the BBB.
Section 2: Upgrade to 3.13
Now that your BBB has Debian, the easiest way to upgrade to 3.13 is to use Robert Nelson’s upgrade scripts:
wget https://rcn-ee.net/deb/wheezy-armhf/v3.13.6-bone7/install-me.sh chmod +x install-me.sh sudo ./install-me.sh sudo reboot
That directory is constantly updated so it’s best to check the
rcn-ee.net/deb/wheezy-armhf directory for the latest version fist.
After the reboot, you’ll be running 3.13:
debian@beaglebone:~$ uname -a Linux beaglebone 3.13.6-bone7 #1 SMP Sat Mar 8 01:11:45 UTC 2014 armv7l GNU/Linux
And now you have the the OMAP hardware random number generator support:
debian@beaglebone:~$ ls -l /dev/hwrng crw------- 1 root root 10, 183 Jan 1 1970 /dev/hwrng
cating some random numbers. It’s fun.
Section 3: Customizing 3.13
Thanks again to Robert Nelson, we can use this repo to build the BBB 3.13 kernel. This will pull down the kernel’s git repository and will take some time.
git clone email@example.com:RobertCNelson/linux-dev.git git fetch git checkout am33x-v3.13 ./build_kernel.sh
You’ll automatically enter the menuconfig. The TPM related selections are below. I choose to include them directly in the kernel vs. a module, but that choice is up to you.
<*> Device Drivers > Character devices > TPM HW Random Number Generator Support <*> Device Drivers > Character devices > TPM Hardware Support <*> Device Drivers > Character devices > TPM Hardware Support > TPM Interface Specification 1.2 Interface (I2C - Atmel)
Make any other changes you wish and then select
Install the kernel
install your SD/microSD card and then run the script:
Use the trick from the first section to boot from the SD card and you will boot your new kernel!
These steps are the basics for upgrading your BBB. If you have questions the best place is to look over the official BeagleBoard forum, or checkout the
#beagle channel on freenode.
In a later post, I’ll show how to actually use the TPM. But now we can rest assured that our kernel has the driver.
- This is essentially what the flasher image does, it just calls this script. At least, that’s my understanding of it. I somehow hosed the filesystem on the eMMC, so this recovery step does indeed work ;) ↩