Adafruit MiniPiTFT

DRAFT / WIP

Adafruit MiniPiTFT is a small, 240x135 or 240x240 pixels display with two additional buttons, designed for Raspberry Pi. Adafruit only provides a raspbian installer, so let's try to get this to work on Gentoo.

This wiki entry has not yet been tested and contains some stuff pulled from the original install script and not yet translated for Gentoo.

= Prerequisites =

Kernel config
correct kernel options should already be set ; in doubt, make sure you have

CONFIG_FB_TFT_ST7789V=m

Software packages
$ cd rpi-fbcp $ mkdir build $ cd build $ cmake .. $ make
 * 1) emerge dev-vcs/git
 * 2) emerge terminus-font
 * 3) pip install --user adafruit-python-shell
 * 4) pip install --user click
 * 5) echo "=media-libs/raspberrypi-userland-9999   **" >> /etc/portage/package.accept_keywords/rpi
 * 6) emerge media-libs/raspberrypi-userland
 * 7) git clone https://github.com/adafruit/rpi-fbcp.git
 * 1) install fbcp /usr/local/bin/fbcp

original script also says:
 * 1) apt-get install -y bc fbi git python3-dev python3-pip python3-smbus python3-spidev evtest libts-bin device-tree-compiler

and

shell.run_command("dtc --warning no-unit_address_vs_reg -I dts -O dtb -o {dest} {src}".format(dest=pitft_config['overlay_dest'], src=pitft_config['overlay_src']))

= Configuration = add the correct options in /boot/cmdline.txt:

fbcon=map:10 fbcon=font:VGA8x8 BLANK_TIME=0

edit /boot/config.txt:

hdmi_cvt=WIDTH HEIGHT 60 1 0 0 0" hdmi_force_hotplug=1 # required for cases when HDMI is not plugged in! dtparam=spi=on dtparam=i2c1=on dtparam=i2c_arm=on {overlay}

overscan=0 hdmi_force_hotplug=1 hdmi_group=2 hdmi_mode=87
 * 1) dtoverlay=vc4-fkms-v3d

it makes no sense to clone https://github.com/adafruit/Raspberry-Pi-Installer-Scripts.git ; instead :


 * 1) vim /etc/conf.d/consolefont

and change

consolefont="default8x16"

to

consolefont="ter-u12n"

note: I have yet to find the 6x12 terminus font if that's not it.


 * 1) echo "/usr/local/bin/fbcp \&" > /etc/local.d/rpi-tft
 * 2) chmod +x /etc/local.d/rpi-tft

''' [Unit] Description=Framebuffer copy utility for PiTFT After=network.target

[Service] Type=simple ExecStartPre=/bin/sleep 10 ExecStart=/usr/local/bin/fbcp

[Install] WantedBy=multi-user.target '''

disabling console blanking
TODO unless it was successful above