Bringing up Debian on BeagleBone Black
BeagleBoard.org has recently been gradually playing with the idea of replacing the long-used Angstrom distribution to Debian. Thanks in large part to the incredibly productive Robert C. Nelson the transition seems to be quite smooth. Below I document my attempt at bringing up a BeagleBone Black with one of Robert’s Debian images.
Write to SD card,
$ dd if=BBB-eMMC-flasher-debian-7.6-console-armhf-2014-09-04-2gb.img.xz of=/dev/mmcblk0
Boot BeagleBone from SD card; a great deal of flashing commences. When flashing stops unplug BBB, remove SD card.
Making things hospitable
The default Debian image is quite spartan. In fact, it doesn’t even include
wpa_supplicant or the firmware for my Ralink RT5370 wifi adapter. To download these I used wired ethernet,
Plug in Ethernet cable
Apply power to BBB
Monitor DHCP logs for BBB’s request
SSH to BBB (the default username is
debian, password is
$ sudo adduser ben $ sudo adduser ben adm $ sudo adduser ben admin $ sudo passwd -d debian $ sudo apt-get update $ sudo apt-get install wpasupplicant firmware-ralink vim iw usbutils lsb-release $ sudo apt-get install tmux git bash-completion
rt2800usbdrivers perform very poorly with power-saving enabled (the default). Thankfully Stack Overflow has the answer to this,
$ echo 'ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan*" RUN+="/usr/bin/iw dev %k set power_save off"' | sudo tee /etc/udev/rules.d/70-wifi-disable-powersave.rules
Reboot and ensure that
Upgrading the kernel
The image I downloaded included a rather ancient 3.8 kernel. Let’s try the 3.14 kernel currently under testing,
$ sudo apt-get install linux-image-3.14.17-ti-r19
Things appear to still work after reboot.
Modifying the Devicetree
Robert Nelson’s [
dtb-rebuilder] repository has sources for the upstream Devicetrees,
$ git clone https://github.com/RobertCNelson/dtb-rebuilder $ cd dtb-rebuilder/src/arm $ cp am335x-boneblack-audio.dts am335x-boneblack-mycape.dts $ make -C../..
/boot/dtbs/$KERNEL_VERSION on the device. Finally, you need to configure u-boot to use your new Devicetree: in
dtb to, e.g.,
am335x-boneblack-mycape.dtb. Reboot and hopefully things work.
Building a new kernel
The official BeagleBoard kernel tree is now hosted by the
beagleboard organization on Github.
$ git clone firstname.lastname@example.org/beagleboard/linux $ git checkout 3.14.17-ti-r17 $ make menuconfig ARCH=arm $ KDEB_PKGVERSION=1wheezy KBUILD_DEBARCH=armhf make deb-pkg ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LOCALVERSION=-mycape
Copy the resulting
.debs in the parent directory to the device and install with