Skip to content
Β 
Β 

Latest commit

Β 

History

237 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LCD Display Driver for Raspberry Pi (Multi-OS Support)

This repository contains installation scripts for enabling SPI TFT touchscreen displays on Raspberry Pi devices running Kali Linux, Parrot OS, Raspbian, and other Debian-based operating systems.

πŸ› οΈ Originally forked from GoodTFT's LCD-show
πŸ’» Enhanced by @at0m-b0mb for multi-OS compatibility
πŸ“¦ Includes framebuffer mirroring (fbcp), calibration, and rotation support


πŸš€ Features

  • βœ… Multi-OS Support: Works with Kali Linux, Parrot OS, Raspbian, and other Debian-based systems
  • βœ… Automatic OS Detection: Detects your operating system and boot partition automatically
  • βœ… Boot Path Detection: Supports both /boot/ (old style) and /boot/firmware/ (new style)
  • βœ… Tested on Raspberry Pi 5 and other Raspberry Pi models
  • βœ… Supports multiple LCD models (MHS35, LCD35, LCD7B, and many more)
  • βœ… Installs required drivers and device overlays
  • βœ… Enables touch and display output via SPI
  • βœ… Optional framebuffer mirroring via fbcp
  • ⚠️ Rotation is not fully functional yet on some setups β€” work in progress

πŸ“¦ Requirements

  • Raspberry Pi (any model supporting SPI displays)
  • One of the following operating systems:
    • Kali Linux (ARM/ARM64) from official source
    • Parrot OS ARM version
    • Raspbian / Raspberry Pi OS
    • Other Debian-based ARM distributions
  • Compatible SPI TFT LCD Display (MHS35, LCD35, LCD7B, LCD24, etc.)
  • Internet connection for dependency installation

🎯 Supported Operating Systems

OS Status Notes
Kali Linux ARM/ARM64 βœ… Fully Supported Tested on Kali Linux 2025.2
Parrot OS ARM βœ… Fully Supported Auto-detected and configured
Raspbian / Raspberry Pi OS βœ… Fully Supported Original compatibility maintained
Other Debian-based ⚠️ Experimental Should work with most Debian derivatives

πŸ“ Repository Structure

File / Folder Purpose
*-show scripts πŸ”§ Installation scripts for different LCD models (e.g., MHS35-show, LCD35-show)
os-detect.sh πŸ” NEW: Automatic OS and boot path detection
lcd-show-common.sh πŸ› οΈ NEW: Common functions for all scripts
rotate.sh β†ͺ️ Optional screen rotation logic
LCD-hdmi πŸ“Ί Switch back to HDMI output
system_backup.sh πŸ›‘οΈ Backup current system files before installation
system_restore.sh πŸ”„ Restore backed up system files
usr/, boot/, etc/ πŸ“‚ Drivers and config files

πŸ§ͺ Tested On

  • Kali Linux 2025.2 ARM64 on Raspberry Pi 5
  • Parrot OS ARM on Raspberry Pi 4
  • Raspberry Pi OS (formerly Raspbian) on various models
  • Multiple LCD models: MHS35, LCD35, LCD7B, LCD24, LCD28, LCD32, and others

βš™οΈ Installation Instructions

πŸ”Ή 1. Clone the Repository

sudo rm -rf LCD-show-kali
git clone https://github.com/at0m-b0mb/LCD-show-kali.git
chmod -R 775 LCD-show-kali
cd LCD-show-kali

πŸ”Ή 2. Run the Installer for Your LCD Model

Choose the appropriate script for your LCD model:

For MHS35 Display:

sudo ./MHS35-show

For LCD35 Display:

sudo ./LCD35-show

For Other LCD Models:

sudo ./LCD7B-show    # For LCD7B 7" display
sudo ./LCD24-show    # For LCD24 2.4" display
sudo ./LCD28-show    # For LCD28 2.8" display
sudo ./LCD32-show    # For LCD32 3.2" display
# ... and many more

The script will:

  • Automatically detect your OS (Kali Linux, Parrot OS, Raspbian, etc.)
  • Detect the correct boot partition path (/boot/ or /boot/firmware/)
  • Install necessary dependencies
  • Configure the LCD display
  • Reboot the system

Note: The system will automatically reboot after installation.


πŸ”Ή 3. Optional: Rotate the Display

After installation, you can rotate the display:

sudo ./rotate.sh [rotation]

Where [rotation] can be:

  • 0 β†’ Normal (no rotation)
  • 90 β†’ Portrait (90 degrees)
  • 180 β†’ Inverted (180 degrees)
  • 270 β†’ Portrait (270 degrees, other side)
  • 360 β†’ Horizontal flip (HDMI only)
  • 450 β†’ Vertical flip (HDMI only)

Example:

sudo ./rotate.sh 90

⚠️ Note: Rotation may not work perfectly on all Kali Linux and Parrot OS images due to X11/input driver differences. This is being actively improved.


πŸ”„ To Switch Back to HDMI Output

If you want to disable the LCD and switch back to HDMI:

sudo ./LCD-hdmi

The system will reboot and use HDMI output.


πŸ› οΈ Dependencies Installed

The installation scripts automatically install the following packages (if not already present):

  • cmake - For building fbcp (framebuffer copy tool)
  • git - For cloning repositories
  • build-essential - Compilation tools
  • xserver-xorg-input-evdev - Touch input driver
  • libraspberrypi-dev - Raspberry Pi libraries (on compatible systems)

Package installation is OS-aware and will use the appropriate package repositories for your system (Kali, Parrot, Raspbian, etc.).


πŸ’‘ Troubleshooting

1. Display Stuck or Blank?

  • Check your boot configuration file:
    • Kali Linux / Newer systems: /boot/firmware/config.txt
    • Raspbian / Older systems: /boot/config.txt
  • Verify SPI is enabled in the config
  • Ensure correct overlay is present: dtoverlay=mhs35:rotate=90 (or your LCD model)
  • Check that overlay files exist in the overlays directory

2. Touch Input Not Working?

  • Confirm /etc/X11/xorg.conf.d/99-calibration.conf is in place
  • Install/reinstall: sudo apt-get install xserver-xorg-input-evdev
  • Try restarting fbcp: sudo fbcp &
  • Check if touch device is detected: ls /dev/input/

3. Rotation Not Working?

  • Try rotating using Xinput or xrandr
  • Check if you're using X11 (not Wayland)
  • Manual touch configuration may be needed
  • Some rotations require specific calibration files

4. Package Installation Fails?

  • Update package lists: sudo apt-get update
  • Check your internet connection
  • The scripts will fall back to local .deb packages if repository install fails
  • For Kali/Parrot: Ensure your system is up-to-date with sudo apt-get upgrade

5. Boot Configuration Not Applied?

  • Verify the correct boot path is being used
  • Check system logs: dmesg | grep -i lcd
  • Manually check the boot config file matches expected settings
  • Some systems may require additional boot parameters

6. OS Not Detected Correctly?

  • Run the OS detection manually: bash os-detect.sh
  • Check /etc/os-release for OS information
  • Report issues with OS detection on the GitHub issues page

πŸ” How It Works

OS Detection

The scripts now include an intelligent OS detection system (os-detect.sh) that:

  1. Reads /etc/os-release to identify the operating system
  2. Detects whether the system uses /boot/ or /boot/firmware/
  3. Automatically configures paths for overlay files
  4. Selects appropriate package installation methods

This ensures compatibility across:

  • Kali Linux (ID: kali)
  • Parrot OS (ID: parrot)
  • Raspbian (ID: raspbian)
  • Other Debian-based systems (ID: debian)

Boot Path Detection

Modern Raspberry Pi systems (including Kali Linux) use /boot/firmware/ for boot configuration, while older Raspbian systems use /boot/. The scripts automatically detect and use the correct path.


🀝 Contributing

Contributions are welcome! If you:

  • Test on a new OS or Raspberry Pi model
  • Fix a bug or improve compatibility
  • Add support for a new LCD model

Please open a Pull Request or Issue on GitHub.


❀️ Credits

  • Based on the original driver from GoodTFT
  • Adapted for multi-OS support by @at0m-b0mb
  • Thanks to the Kali Linux and Parrot OS communities for testing

πŸ“œ License

MIT License β€” Free to use, modify, and distribute.


πŸ™‹β€β™‚οΈ Need Help?


πŸ“ Changelog

Latest Update

  • βœ… Added support for Kali Linux ARM/ARM64
  • βœ… Added support for Parrot OS ARM
  • βœ… Automatic OS detection system
  • βœ… Dynamic boot path detection (/boot/ vs /boot/firmware/)
  • βœ… OS-agnostic package installation
  • βœ… Maintained backward compatibility with Raspbian
  • βœ… Updated all LCD show scripts for multi-OS support
  • βœ… Improved error handling and user feedback

About

3.2" 3.5" 5.0" 7.0" TFT LCD driver for the Raspberry PI, PI 2, PI 3, PI4, and PI5

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages