Well, after much banging around I finally hit upon something that worked, and it didn’t involve compiling any code. I’ve been using one of those tiny Adafruit miniPiTFT 1.14" displays as a console on one of my robots, so I fired it up to see if I could see any clues on how I did it. I found a directory “Raspberry-Pi-Installer-Scripts”, so I cloned the latest repository onto a brand new 32-bit Bullseye OS, this for a Raspberry Pi 3 B+.
I followed the instructions for installing the necessary dependencies, then executed the adafruit-pitft.py script. It asks you for the specific TFT display you have (I chose “[6] ST7789 2.0”) and a rotation angle of “[1] 90 degrees”, then goes off forever to do its magic. After the installation finished it asked to reboot. The initial result was a black screen. I began fiddling with the configuration that was installed at the bottom of /boot/config.txt and managed to get it to work. It’s a bit counterintuitive as the rotation, width and height seem reversed, but for a 320x240 landscape display the following is what’s working for me:
# --- added by adafruit-pitft-helper Sat Apr 13 00:57:51 2024 ---
[all]
hdmi_force_hotplug=0
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=fbtft,spi0-1,st7789v,dc_pin=9,width=240,height=320,led_pin=13,rotate=90,speed=40000000
dtparam=width=240,height=320
dtparam=dc-gpio=25,backlight-gpio=22
# --- end adafruit-pitft-helper Sat Apr 13 00:57:51 2024 ---
There’s a vibrating yellow line at the bottom of the display (I think it’s called a “tear line”), and I’ve not been able to get rid of that, but the display otherwise works fine as a console.