Skip to content

Instantly share code, notes, and snippets.

@pdp7
Last active September 15, 2016 17:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdp7/2fba066dcf23b049781a to your computer and use it in GitHub Desktop.
Save pdp7/2fba066dcf23b049781a to your computer and use it in GitHub Desktop.
BeagleBone Black: fbtft frame buffer drivers with Linux 3.8.13-bone79 kernel with 1.8" & 2.2" TFT LCD displays
#########################################
### BeagleBone Black
### fbtft frame buffer drivers with Linux 3.8.13-bone79 kernel
### working with 1.8" & 2.2" TFT LCD displays
###
### Photos: https://plus.google.com/photos/+DrewFustini/albums/6211546193314906001
#########################################
##########################################################
### clone bb-kernel repo & checkout Linux kernel 3.8 branch
$ git clone https://github.com/RobertCNelson/bb-kernel
$ cd bb-kernel
$ git checkout am33x-v3.8
Already on 'am33x-v3.8'
Your branch is up-to-date with 'origin/am33x-v3.8'.
### needed for fresh Fedora 22 install
$ sudo dnf install ncurses-devel ncurses-devel.x86_64 ncurses-devel.i686
### run the build script
$ ./build_kernel.sh
<snip>
-----------------------------
make -j4 ARCH=arm LOCALVERSION=-bone79 CROSS_COMPILE="ccache /home/afustini/dev/bbb/bb-kernel/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-" dtbs
-----------------------------
<snip>
‘arch/arm/boot/zImage’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79.zImage’
‘.config’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/config-3.8.13-bone79’
-rwxrwxr-x 1 afustini afustini 5.3M Oct 31 12:11 /home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79.zImage
-----------------------------
Building modules archive...
Compressing 3.8.13-bone79-modules.tar.gz...
-rw-rw-r-- 1 afustini afustini 12M Oct 31 12:11 /home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79-modules.tar.gz
-----------------------------
Building firmware archive...
Compressing 3.8.13-bone79-firmware.tar.gz...
-rw-rw-r-- 1 afustini afustini 1.3M Oct 31 12:11 /home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79-firmware.tar.gz
-----------------------------
Building dtbs archive...
‘./arch/arm/boot/dts/am335x-boneblack.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/am335x-boneblack.dtb’
<snip>
Compressing 3.8.13-bone79-dtbs.tar.gz...
-rw-rw-r-- 1 afustini afustini 39K Oct 31 12:11 /home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79-dtbs.tar.gz
-----------------------------
Script Complete
eewiki.net: [user@localhost:~$ export kernel_version=3.8.13-bone79]
-----------------------------
##############################################################
### add fbtft drivers into Linux kernel source
### based on instructions from:
### https://github.com/notro/fbtft/blob/master/README
###
### Before Linux 3.15
### cd drivers/video
### git clone https://github.com/notro/fbtft.git
###
### Add to drivers/video/Kconfig: source "drivers/video/fbtft/Kconfig"
### Add to drivers/video/Makefile: obj-y += fbtft/
###
### Enable driver(s) in menuconfig and build the kernel
###
### Drew's screenshots:
### https://plus.google.com/photos/+DrewFustini/albums/6212972642625921345
### from within the bb-kernel dir
$ cd KERNEL/drivers/video
$ git clone https://github.com/notro/fbtft
Cloning into 'fbtft'...
remote: Counting objects: 1170, done.
remote: Total 1170 (delta 0), reused 0 (delta 0), pack-reused 1170
Receiving objects: 100% (1170/1170), 526.16 KiB | 0 bytes/s, done.
Resolving deltas: 100% (726/726), done.
Checking connectivity... done.
### move back the the bb-kernel dir
$ cd ../../..
### Add this line to drivers/video/Kconfig:
### source "drivers/video/fbtft/Kconfig"
### Add this line to drivers/video/Makefile:
### obj-y += fbtft/
### Verify files were edited correctly
$ git diff
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index a0c757a..50c5d62 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2494,4 +2494,6 @@ config FB_SSD1307
This driver implements support for the Solomon SSD1307
OLED controller over I2C.
+source "drivers/video/fbtft/Kconfig"
+
endmenu
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 28bfbca..6bd03af 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -174,3 +174,6 @@ obj-$(CONFIG_DISPLAY_TIMING) += display_timing.o
obj-$(CONFIG_OF_DISPLAY_TIMING) += of_display_timing.o
obj-$(CONFIG_VIDEOMODE) += videomode.o
obj-$(CONFIG_OF_VIDEOMODE) += of_videomode.o
+
+obj-y += fbtft/
+
##############################################################
### rebuild after adding fbtft dir from notro github repo
$ ./tools/rebuild.sh
+ Detected build host ["Fedora release 22 (Twenty Two)"]
+ host: [x86_64]
+ git HEAD commit: [a50680ea2cc2fc4519353dee4c1cbb47e475d8b2]
RPM distro version: [22]
-----------------------------
scripts/gcc: Using: arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 4.7.3 20130328 (prerelease)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------
CROSS_COMPILE=/home/afustini/dev/bbb/bb-kernel/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-
ccache [enabled]
scripts/kconfig/mconf Kconfig
drivers/video/Kconfig:60:error: recursive dependency detected!
drivers/video/Kconfig:60: symbol FB is selected by DRM_KMS_HELPER
drivers/gpu/drm/Kconfig:28: symbol DRM_KMS_HELPER is selected by DRM_TILCDC
drivers/gpu/drm/tilcdc/Kconfig:1: symbol DRM_TILCDC depends on BACKLIGHT_LCD_SUPPORT
drivers/video/backlight/Kconfig:5: symbol BACKLIGHT_LCD_SUPPORT is selected by FB_BACKLIGHT
drivers/video/Kconfig:247: symbol FB_BACKLIGHT is selected by PMAC_BACKLIGHT
drivers/macintosh/Kconfig:134: symbol PMAC_BACKLIGHT depends on FB
warning: (USB_MUSB_HDRC) selects TWL6030_USB which has unmet direct dependencies (USB_SUPPORT && (USB || USB_GADGET) && TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS)
warning: (DVB_USB_PCTV452E) selects TTPCI_EEPROM which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_PCI_SUPPORT && MEDIA_DIGITAL_TV_SUPPORT && I2C)
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
‘.config’ -> ‘/home/afustini/dev/bbb/bb-kernel/patches/defconfig’
-----------------------------
make -j4 ARCH=arm LOCALVERSION=-bone79 CROSS_COMPILE="ccache /home/afustini/dev/bbb/bb-kernel/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-" zImage modules
-----------------------------
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/video/Kconfig:60:error: recursive dependency detected!
drivers/video/Kconfig:60: symbol FB is selected by DRM_KMS_HELPER
drivers/gpu/drm/Kconfig:28: symbol DRM_KMS_HELPER is selected by DRM_TILCDC
drivers/gpu/drm/tilcdc/Kconfig:1: symbol DRM_TILCDC depends on BACKLIGHT_LCD_SUPPORT
drivers/video/backlight/Kconfig:5: symbol BACKLIGHT_LCD_SUPPORT is selected by FB_BACKLIGHT
drivers/video/Kconfig:247: symbol FB_BACKLIGHT is selected by PMAC_BACKLIGHT
drivers/macintosh/Kconfig:134: symbol PMAC_BACKLIGHT depends on FB
warning: (USB_MUSB_HDRC) selects TWL6030_USB which has unmet direct dependencies (USB_SUPPORT && (USB || USB_GADGET) && TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS)
warning: (DVB_USB_PCTV452E) selects TTPCI_EEPROM which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_PCI_SUPPORT && MEDIA_DIGITAL_TV_SUPPORT && I2C)
warning: (USB_MUSB_HDRC) selects TWL6030_USB which has unmet direct dependencies (USB_SUPPORT && (USB || USB_GADGET) && TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS)
warning: (DVB_USB_PCTV452E) selects TTPCI_EEPROM which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_PCI_SUPPORT && MEDIA_DIGITAL_TV_SUPPORT && I2C)
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC kernel/printk.o
GZIP kernel/config_data.gz
CHK kernel/config_data.h
UPD kernel/config_data.h
CC kernel/configs.o
LD kernel/built-in.o
CC drivers/spi/spi.o
CC drivers/spi/spidev.o
CC drivers/spi/spi-omap2-mcspi.o
CC [M] drivers/spi/spi-sc18is602.o
CC [M] drivers/spi/spi-xcomm.o
LD drivers/spi/built-in.o
LD drivers/built-in.o
LINK vmlinux
LD vmlinux.o
MODPOST vmlinux.o
WARNING: modpost: Found 1 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
KSYM .tmp_kallsyms1.o
KSYM .tmp_kallsyms2.o
LD vmlinux
SORTEX vmlinux
sort done marker at 8100c8
SYSMAP System.map
OBJCOPY arch/arm/boot/Image
Building modules, stage 2.
Kernel: arch/arm/boot/Image is ready
LZO arch/arm/boot/compressed/piggy.lzo
MODPOST 1281 modules
AS arch/arm/boot/compressed/piggy.lzo.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
LD [M] drivers/spi/spi-sc18is602.ko
LD [M] drivers/spi/spi-xcomm.ko
-----------------------------
make -j4 ARCH=arm LOCALVERSION=-bone79 CROSS_COMPILE="ccache /home/afustini/dev/bbb/bb-kernel/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-" dtbs
-----------------------------
-----------------------------
‘arch/arm/boot/zImage’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79.zImage’
‘.config’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/config-3.8.13-bone79’
-rwxrwxr-x 1 afustini afustini 5.3M Oct 31 12:40 /home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79.zImage
-----------------------------
Building modules archive...
Compressing 3.8.13-bone79-modules.tar.gz...
-rw-rw-r-- 1 afustini afustini 12M Oct 31 12:41 /home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79-modules.tar.gz
-----------------------------
Building firmware archive...
Compressing 3.8.13-bone79-firmware.tar.gz...
-rw-rw-r-- 1 afustini afustini 1.3M Oct 31 12:41 /home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79-firmware.tar.gz
-----------------------------
Building dtbs archive...
‘./arch/arm/boot/dts/omap4-panda.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap4-panda.dtb’
‘./arch/arm/boot/dts/am335x-boneblack.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/am335x-boneblack.dtb’
‘./arch/arm/boot/dts/omap3-evm.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap3-evm.dtb’
‘./arch/arm/boot/dts/omap4-panda-a4.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap4-panda-a4.dtb’
‘./arch/arm/boot/dts/omap4-sdp.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap4-sdp.dtb’
‘./arch/arm/boot/dts/am335x-evmsk.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/am335x-evmsk.dtb’
‘./arch/arm/boot/dts/arduino-tre.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/arduino-tre.dtb’
‘./arch/arm/boot/dts/omap4-var-som.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap4-var-som.dtb’
‘./arch/arm/boot/dts/am335x-bone.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/am335x-bone.dtb’
‘./arch/arm/boot/dts/am335x-tester.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/am335x-tester.dtb’
‘./arch/arm/boot/dts/omap4-panda-es.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap4-panda-es.dtb’
‘./arch/arm/boot/dts/omap3-beagle-xm.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap3-beagle-xm.dtb’
‘./arch/arm/boot/dts/am335x-evm.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/am335x-evm.dtb’
‘./arch/arm/boot/dts/omap3-tobi.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap3-tobi.dtb’
‘./arch/arm/boot/dts/omap3-beagle.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap3-beagle.dtb’
‘./arch/arm/boot/dts/omap5-evm.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap5-evm.dtb’
‘./arch/arm/boot/dts/am335x-bonegreen.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/am335x-bonegreen.dtb’
‘./arch/arm/boot/dts/omap2420-h4.dtb’ -> ‘/home/afustini/dev/bbb/bb-kernel/deploy/tmp/omap2420-h4.dtb’
Compressing 3.8.13-bone79-dtbs.tar.gz...
-rw-rw-r-- 1 afustini afustini 39K Oct 31 12:41 /home/afustini/dev/bbb/bb-kernel/deploy/3.8.13-bone79-dtbs.tar.gz
-----------------------------
Script Complete
eewiki.net: [user@localhost:~$ export kernel_version=3.8.13-bone79]
-----------------------------
### Verify in bb-kernel dir that fbtft modules were compiled
$ find |grep fbtft |grep ko$
./KERNEL/drivers/video/fbtft/fb_upd161704.ko
./KERNEL/drivers/video/fbtft/fb_ili9486.ko
./KERNEL/drivers/video/fbtft/flexfb.ko
./KERNEL/drivers/video/fbtft/fb_watterott.ko
./KERNEL/drivers/video/fbtft/fb_hx8340bn.ko
./KERNEL/drivers/video/fbtft/fb_ssd1351.ko
./KERNEL/drivers/video/fbtft/fbtft_device.ko
./KERNEL/drivers/video/fbtft/fbtft.ko
./KERNEL/drivers/video/fbtft/fb_ssd1306.ko
./KERNEL/drivers/video/fbtft/fb_ili9325.ko
./KERNEL/drivers/video/fbtft/fb_tinylcd.ko
./KERNEL/drivers/video/fbtft/fb_s6d1121.ko
./KERNEL/drivers/video/fbtft/fb_hx8353d.ko
./KERNEL/drivers/video/fbtft/fb_ili9320.ko
./KERNEL/drivers/video/fbtft/fb_ili9340.ko
./KERNEL/drivers/video/fbtft/fb_ssd1289.ko
./KERNEL/drivers/video/fbtft/fb_ssd1331.ko
./KERNEL/drivers/video/fbtft/fb_st7735r.ko
./KERNEL/drivers/video/fbtft/fb_ili9481.ko
./KERNEL/drivers/video/fbtft/fb_ili9341.ko
./KERNEL/drivers/video/fbtft/fb_agm1264k-fl.ko
./KERNEL/drivers/video/fbtft/fb_hx8347d.ko
./KERNEL/drivers/video/fbtft/fb_ra8875.ko
./KERNEL/drivers/video/fbtft/fb_uc1701.ko
./KERNEL/drivers/video/fbtft/fb_bd663474.ko
./KERNEL/drivers/video/fbtft/fb_s6d02a1.ko
./KERNEL/drivers/video/fbtft/fb_pcd8544.ko
./KERNEL/drivers/video/fbtft/fb_tls8204.ko
### Verify in bb-kernel/deploy that kernel and tarballs were created
$ ls -ltar deploy/
-rwxrwxr-x 1 afustini afustini 5552136 Oct 31 13:01 3.8.13-bone79.zImage
-rw-rw-r-- 1 afustini afustini 110207 Oct 31 13:01 config-3.8.13-bone79
-rw-rw-r-- 1 afustini afustini 11690719 Oct 31 13:01 3.8.13-bone79-modules.tar.gz
-rw-rw-r-- 1 afustini afustini 1263879 Oct 31 13:01 3.8.13-bone79-firmware.tar.gz
-rw-rw-r-- 1 afustini afustini 39642 Oct 31 13:01 3.8.13-bone79-dtbs.tar.gz
###########################################################
## Install new kernel on SD Card (from Linux host)
##
## NOTE: SD card already had been imaged with
## Debian (BeagleBone, BeagleBone Black - 4GB SD) 2015-03-01
## md5: c848627722b7a5f7bc89791cc8949e3b
## http://debian.beagleboard.org/images/bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz
### from within bb-kernel dir
$ sudo ./tools/install_kernel.sh
ERROR: MMC is not defined in system.sha
### edit script to specify which device is your SD card
$ vi system.sh
$ sudo ./tools/install_kernel.sh
I see...
fdisk -l:
Disk /dev/sdb: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Disk /dev/mapper/sdb5_crypt: 119 GiB, 127776325632 bytes, 249563136 sectors
Disk /dev/mapper/lappy486--vg-root: 114.1 GiB, 122553368576 bytes, 239362048 sectors
Disk /dev/mapper/lappy486--vg-swap_1: 4.9 GiB, 5221908480 bytes, 10199040 sectors
Disk /dev/sdc: 14.9 GiB, 16013942784 bytes, 31277232 sectors
Disk /dev/sdd: 7.4 GiB, 7948206080 bytes, 15523840 sectors
lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
└─sda1 8:1 0 232.9G 0 part
sdb 8:16 0 119.2G 0 disk
├─sdb1 8:17 0 243M 0 part /boot
├─sdb2 8:18 0 1K 0 part
└─sdb5 8:21 0 119G 0 part
└─sdb5_crypt 254:0 0 119G 0 crypt
├─lappy486--vg-root 254:1 0 114.1G 0 lvm /
└─lappy486--vg-swap_1 254:2 0 4.9G 0 lvm [SWAP]
sdc 8:32 1 14.9G 0 disk
└─sdc1 8:33 1 14.9G 0 part /media/usb0
sdd 8:48 1 7.4G 0 disk
├─sdd1 8:49 1 96M 0 part /media/afustini/BEAGLE_BONE
└─sdd2 8:50 1 7.3G 0 part /media/afustini/rootfs
-----------------------------
Are you 100% sure, on selecting [/dev/sdd] (y/n)? y
Debug: Existing Partition on drive:
-----------------------------
Disk /dev/sdd: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 198655 196608 96M e W95 FAT16 (LBA)
/dev/sdd2 198656 15523839 15325184 7.3G 83 Linux
Unmounting Partitions
-----------------------------
Starting Partition Search
-----------------------------
Trying: [/dev/sdd1]
Partition: [/dev/sdd1] trying: [vfat], [ext4]
Partition: [vfat]
found: /uEnv.txt
Installing 3.8.13-bone79 to /dev/sdd1
‘/media/usb0/bbb/bonnie-bb-kernel/bb-kernel-am33x-v3.8/deploy/3.8.13-bone79.zImage’ -> ‘/media/usb0/bbb/bonnie-bb-kernel/bb-kernel-am33x-v3.8/deploy/disk/zImage’
Installing 3.8.13-bone79-dtbs.tar.gz to /dev/sdd1
/media/usb0/bbb/bonnie-bb-kernel/bb-kernel-am33x-v3.8
Trying: [/dev/sdd2]
Partition: [/dev/sdd2] trying: [vfat], [ext4]
Partition: [extX]
found: /etc/fstab
Installing 3.8.13-bone79-modules.tar.gz to /dev/sdd2
‘/media/usb0/bbb/bonnie-bb-kernel/bb-kernel-am33x-v3.8/deploy/config-3.8.13-bone79’ -> ‘/media/usb0/bbb/bonnie-bb-kernel/bb-kernel-am33x-v3.8/deploy/disk/boot/config-3.8.13-bone79’
info: [3.8.13-bone79] now installed...
/media/usb0/bbb/bonnie-bb-kernel/bb-kernel-am33x-v3.8
-----------------------------
This script has finished...
For verification, always test this media with your end device...
###########################################################
## BOOT BEAGLEBONE BLACK WITH UPDATED SD CARD
root@beaglebone:~# dmesg| head
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.8.13-bone79 (XXXX@YYYY) (gcc version 4.7.3 20130328 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) ) #4 SMP Sat Oct 31 13:00:55 CDT 2015
root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone79 #4 SMP Sat Oct 31 13:00:55 CDT 2015 armv7l GNU/Linux
root@beaglebone:~# find /lib/modules/3.8.13-bone79/|grep fbtft
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_pcd8544.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ili9486.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ili9340.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_hx8340bn.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ili9325.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ili9341.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_uc1701.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ssd1351.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_s6d1121.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_upd161704.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ra8875.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_agm1264k-fl.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ili9481.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_watterott.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_bd663474.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_hx8347d.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fbtft_device.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_tinylcd.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_tls8204.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ssd1331.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ssd1306.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_hx8353d.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_st7735r.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/flexfb.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ili9320.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_ssd1289.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fb_s6d02a1.ko
/lib/modules/3.8.13-bone79/kernel/drivers/video/fbtft/fbtft.ko
## edit uboot config file uEnv.txt
## SPIDEV1 loads at boot and HDMI & eMMC are not loaded
## lines from uEnv.txt:
cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G
cape_enable=capemgr.enable_partno=BB-SPIDEV1
## Drew's uEnv.txt for reference:
## https://gist.github.com/pdp7/59868d226605e4d36e87
## verify that HDMI & eMMC are not loaded and SPIDEV1 is loaded
## NOTE: My BBB has no need for HDMI or eMMC
## Ut may not be completely necessary to disable.
## But I did not investigate this.
root@beaglebone:~# cat /sys/devices/bone_capemgr.9/slots
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-- Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPIDEV1
## see photos of breadboard wiring using SPI1 (CS0, MOSI, SCLK), D/C, RESET
## https://plus.google.com/photos/+DrewFustini/albums/6212972642625921345
## load fbtft st7735r driver for adafruit18 (Adafruit 1.8" TFT LCD display)
root@beaglebone:~# modprobe fbtft_device busnum=1 name=adafruit18 debug=7 verbose=3 gpios=dc:48,reset:60
## CONSOLE WORKED OKAY
## see photos:
## https://plus.google.com/photos/+DrewFustini/albums/6212972642625921345
## NOTE: if you have not already done, so run script to make sure all the free space on SD card can be utilized
root@beaglebone:~# /opt/scripts/tools/grow_partition.sh
## NOTE: apt-get may fail with warning
## "There is no public key available for the following key IDs"
## fix by running running:
root@beaglebone:~# apt-get install debian-keyring debian-archive-keyring
root@beaglebone:~# apt-get update
## FBI WORKED OKAY
root@beaglebone:~# apt-get install fbi
root@beaglebone:~# wget https://kernel.org/theme/images/logos/tux.png
root@beaglebone:~# fbi -d /dev/fb0 -T 1 -a tux.png
using "DejaVu Sans Mono-16", pixelsize=16.67 file=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
## MPLAYER WORKED OKAY
root@beaglebone:~# apt-get install mplayer
root@beaglebone:~# wget http://hubblesource.stsci.edu/sources/video/clips/details/images/hst_1.mpg
root@beaglebone:~# mplayer -nolirc -vo fbdev:/dev/fb0 scale=WIDTH:128 hst_1.mpg
## dmesg of verbose debug output for adafruit18
https://gist.github.com/pdp7/ce4a3deb43f3e7e0214d
https://gist.github.com/pdp7/c3ecf2cf4b39a62a4192
## Now using the Adafruit 2.2" TFT LCD display with adafruit22a [note: the "a" suffix is important]
root@beaglebone:~# modprobe fbtft_device busnum=1 speed=4000000 name=adafruit22a debug=7 verbose=3 gpios=dc:48,reset:60
## dmesg of verbose debug output for adafruit22a
https://gist.github.com/pdp7/c62f54573992dfafd003
## console, fbi and mplayer ALL WORKED OK for adafruit22a
###########################################################
### LINKS
FBTFT on BeagleBone Black running Debian:
https://github.com/notro/fbtft/wiki/BeagleBone-Black
FBTFT Wiki:
https://github.com/notro/fbtft/wiki
The FBTFT drivers are now in the Linux kernel staging tree:
https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing
Development in this github repo has ceased.
Drew's photos of fbtft working for 1.8" & 2.2" TFT LCDs
https://plus.google.com/photos/+DrewFustini/albums/6211546193314906001
Drew's screenshots of kernel config for fbtft drivers in BeagleBone kernel v3.8.13
https://plus.google.com/photos/+DrewFustini/albums/6212972642625921345
@pdp7
Copy link
Author

pdp7 commented Nov 3, 2015

LINKS

FBTFT on BeagleBone Black running Debian:
https://github.com/notro/fbtft/wiki/BeagleBone-Black

FBTFT Wiki:
https://github.com/notro/fbtft/wiki

The FBTFT drivers are now in the Linux kernel staging tree:
https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing
Development in this github repo has ceased.

Drew's photos of fbtft working for 1.8" & 2.2" TFT LCDs
https://plus.google.com/photos/+DrewFustini/albums/6211546193314906001

Drew's screenshots of kernel config for fbtft drivers in BeagleBone kernel v3.8.13
https://plus.google.com/photos/+DrewFustini/albums/6212972642625921345

@pdp7
Copy link
Author

pdp7 commented Nov 3, 2015

If you don't want to go through the whole process of compiling the latest beaglebone v3.8 branch kernel:
Prebuilt drivers for the bone-debian-7.5-2014-05-14-2gb
https://gist.github.com/pdp7/b6c769b79508c605e7a1

@pdp7
Copy link
Author

pdp7 commented Nov 18, 2015

bbb rcn bb-kernel am33x-v3.8: part 1
https://gist.github.com/pdp7/1b59c27e9106903cd0c8

bbb rcn bb-kernel am33x-v3.8: part 2
https://gist.github.com/pdp7/3b6ed0d9bb0376df3631

bbb rcn bb-kernel am33x-v3.8: part 3
https://gist.github.com/pdp7/c3a6ead711c453d013aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment