Build fbtft drivers for Linux 4.4 on BeagleBone Black

Build fbtft drivers for Linux 4.4 kernel so that BeagleBone Black can use TFT LCD connected via SPI as Framebuffer

Build fbtft drivers for Linux 4.4 on BeagleBone Black

Posted by Angel on 2015-12-02T01:28:45-05:00


In previous blog posts, I’ve showed how to use small LCD displays as a Linux framebuffer on the BeagleBone Black thanks to the fbtft drivers:

In this post, I will show how to use fbtft drivers on BBB with the latest version of the Linux kernel.  In this case, that is Linux 4.4.

Full transcript in this GitHub Gist.

Step 1: Build kernel

Clone Robert C. Nelson’s bb-kernel repo and checkout the am33x-v4.4 branch.  When I did last week, the latest kernel version was 4.4-rc1-bone0:

laptop$ git clone

laptop$ cd bb-kernel/

laptop$ git checkout am33x-v4.4

laptop$ ./

The build kernel script will at some point open the kernel config menu system.  Enable Device Drivers->Staging->fbtft:







Step 2: Install kernel

Flash latest Debian 8.2 (Jessie) console image for the BBB:

laptop$ wget

laptop$ xz -d bone-debian-8.2-console-armhf-2015-11-15-2gb.img.xz

laptop$ sudo dd if=/home/afustini/Downloads/bbb-images/bone-debian-8.2-console-armhf-2015-11-15-2gb.img.xz of=/dev/sdc

laptop$ sudo eject /dev/sdc

Remove and re-insert so that fs gets mounted.  Run this from bb-kernel directory:

laptop$ ./tools/

Eject card and boot the BeagleBone with it.  Once booted, grow the filesystem to make use of free space on the card:

bone$ sudo /opt/scripts/tools/

bone$ sudo reboot

Finish installation of the new kernel on the BeagleBone.  The install script fails to do this.  In this case, my new kernel is 4.4.0-rc1-bone0:

bone$ sudo cp -pr /dtbs /boot/dtbs/4.4.0-rc1-bone0

bone$ sudo cp /zImage /boot/vmlinuz-4.4.0-rc1-bone0

Edit /boot/uEnv.txt on Beaglebone so that the new kernel is booted:

bone$ sudo vi /boot/uEnv.txt



bone$ sudo reboot

Verify the the BeagleBone booted the new kernel:

bone$ uname -a

Linux beaglebone 4.4.0-rc1-bone0 #4 Thu Nov 19 20:26:04 CST 2015 armv7l GNU/Linux

Step 3: Configure SPI

Build the latest Device Tree Overlays:

bone$ sudo apt-get update

bone$ sudo apt-get install git

bone$ git clone

bone$ cd

bone$ ./

bone$ ./


Load the Device Tree Overlay for BB-SPIDEV1 “virtual cape” as my LCD is wired up to spi1 pins:

bone$ cat /sys/devices/platform/bone_capemgr/slots

0: PF—-  -1

1: PF—-  -1

2: PF—-  -1

3: PF—-  -1


bone$ sudo /bin/sh -c ‘echo BB-SPIDEV1 > /sys/devices/platform/bone_capemgr/slots’


bone$ cat /sys/devices/platform/bone_capemgr/slots

0: PF—-  -1

1: PF—-  -1

2: PF—-  -1

3: PF—-  -1

4: P-O-L-  0 Override Board Name,00A0,Override Manuf,BB-SPIDEV1

Step 4: Load fbtft drivers

Load fbtft_device module for adafruit18 (Adafruit 1.8″ TFT LCD) which will use the fb_st7735r driver:

bone$ sudo modprobe fbtft_device busnum=1 name=adafruit18 debug=7 verbose=3 gpios=dc:48,reset:60


Display image on the LCD display:

bone$ sudo apt-get install fbi

bone$ wget ‘

bone$ sudo fbi -d /dev/fb0 -T 1 -a BorisTux_w_Logo.png

Comments are not currently available for this post.