Skip to content

Mini PiTFT + Pi Zero 2 W: no output because of incorrect cmdline.txt on OS Lite or DietPi #354

@sudoshmudo

Description

@sudoshmudo

Script Command

sudo python3 adafruit-pitft.py --display=st7789_240x135 --rotation=270 --install-type=console

Operating System

64-bit Raspberry Pi OS Lite with Bookworm
64-bit DietPi OS with Bookworm

Hardware

Raspberry Pi Zero 2 W

Behavior

There is no output on the screen.

Errors which are shown during script execution:

PITFT debconf: delaying package configuration, since apt-utils is not installed
PITFT Job for con2fbmap.service failed because the control process exited with error code.
See "systemctl status con2fbmap.service" and "journalctl -xeu con2fbmap.service" for details.

Description

No response

Additional information

I fixed it by adding fbcon=map:1 fbcon=font:VGA8x8 at the end of /boot/firmware/cmdline.txt file.

Example what /boot/firmware/cmdline.txt looks like in DietPi:

root=PARTUUID=abc rootfstype=ext4 rootwait net.ifnames=0 logo.nologo console=tty1 fbcon=map:1 fbcon=font:VGA8x8

Example what it looks like in Raspberry Pi OS Lite:

console=serial0,115200 console=tty0 root=PARTUUID=abc rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=GB fbcon=map:1 fbcon=font:VGA8x8

That fix was valid on both Raspberry Pi OS Lite and DietPi OS.

Here is a full script for DietPi after fresh minimal install of OS:

dietpi-software install 130
apt install python3.11-venv -y && python3 -m venv env --system-site-packages
source env/bin/activate && sudo pip install --upgrade adafruit-python-shell click
dietpi-software install 17 && mkdir git && cd git && git clone https://github.com/adafruit/Raspberry-Pi-Installer-Scripts.git
cd Raspberry-Pi-Installer-Scripts
sudo python3 adafruit-pitft.py --display=st7789_240x135 --rotation=270 --install-type=console --reboot=no
truncate -s -1 /boot/firmware/cmdline.txt && echo ' fbcon=map:1 fbcon=font:VGA8x8' >> /boot/firmware/cmdline.txt
sudo reboot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions