BeagleBone Black and DTC

BeagleBone Black (Adafruit)

Arch Linux ARM currently includes an unpatched version of dtc (device tree compiler) which lacks the “@” option. If you want to enable additional UARTs, SPI, I2C, or just use GPIO without recompiling the bootloader, you need a patched version of dtc. You can download the source code and manually patch/compile, but to make this process easier I created a PKGBUILD which builds a patched version of dtc from git. Grab the raw PKGBUILD after the break, or just run packer to install from the AUR:

packer -S dtc-git-patched

Make sure you don’t have the vanilla version of dtc installed, pacman will throw “file exists on filesystem” errors if it’s already installed from the standard repository.

After installing dtc you can easily mux pins with the flattened device tree. For more information on muxing pins and enabling UARTs, check out the hipstercircuits guide.

# Maintainer: Ethan Zonca <>

pkgdesc="Device Tree Compiler with Dynamic Symbols and Fixup Support Patch"
arch=('i686' 'x86_64' 'armv7h')


build() {
    msg 'Downloading dynamic symbols fixup patch...'
    wget -O dynamic-symbols.patch
    msg 'Connecting to GIT server...'

    if [[ -d ${_gitname} ]]
        cd ${_gitname}
        git reset --hard HEAD
        git pull -f
        git clean -f
        git clone ${_gitroot} ${_gitname}

    msg 'GIT checkout done or server timeout'

package() {
   cd ${_gitname}

   # Revert to version that patch applies to
   git reset --hard f8cb5dd94903a5cfa1609695328b8f1d5557367f

   # Apply patch
   git apply ../dynamic-symbols.patch
   #    patch -Np1 -i ../dynamic-symbols.patch

    make || return 1
    make INSTALL=$(which install) DESTDIR=${pkgdir} PREFIX=/usr install || return 1

Image credit: Adafruit

Ethan is a computer engineer and open source hardware/software developer from Michigan. He enjoys AVR and linux development, photography, mountain biking, and drinking significant amounts of home-roasted coffee. Find out more at

Tagged with: , , ,
Posted in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *