Adafruit 1.3" 240x240 Kernel Module Install

I’m working on a project and I’m looking to get an Adafruit 240x240 display installed on a Raspberry Pi Zero W. I’m using the kernel method so I can have direct access to the frame buffer using OpenGL.

From what I’m gathered, this display requires a kernel module/extension. Here is the Adafruit installer scripts

It expects access to /boot to do it’s work.

Reading Balena docs makes it seem like I need to compile and install the overlays and kernel extension into the reason-boot partition on the SD card prior to the first boot. Is this correct?

If that line of thinking is even correct, I’m not sure how to connect those dots.

One thought was, run the installer against a vanilla RaspberryPI image and then copy the compiled files off and putting them into the Balena/reason boot partition before the first boot, but I have no idea of the outcome.

Can anyone please shed some light? :slight_smile:


— Arron


I think there are 2 problems here -

  • making those drivers available in the os
  • enabling them in boot config
  1. For the first problem, I think you’ll have to build the balenaOS image yourself and make sure you include whatever extra stuff you need. We use yocto to build our balenaOS images, and you can find instructions for the same here
  2. For the second case, once you have added whatever you need, you can make changes to the config.txt for the dt overlays or dt params. This can be done through the balena dashboard, or by manually editing the files. The first method is simpler. Check the docs for that here

Thanks for the reply. I believe you are right. I spent some time working with the kernel-build project but didn’t get it working. For anyone else, I ended up using this userland driver for the display

With this Dockerfile:

FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:buster-build

RUN apt update -y
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install -y cmake
RUN apt-get install -y libraspberrypi-dev raspberrypi-kernel-headers

RUN git clone
WORKDIR fbcp-ili9341
RUN git reset --hard 662e8db76ba16d86cf6fd09d85240adc19e62735

RUN mkdir -p build
RUN make -j

ENTRYPOINT ./fbcp-ili9341