Project

General

Profile

Actions

Feature #1030

closed

Switch to using include files for lcdshow hdmi vs tft configuration

Added by Hammel over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Immediate
Assignee:
Target version:
Start date:
29 Aug 2023
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

In lcdshow, the pibox-hdmi script is used to switch between using hdmi and the TFT. This is done by using sed to change configuration options in config.txt

A better method would be to create stock hdmi and tft config files, as in lcdshow-hdmi-config.txt and lcdshow-tft-config.txt. Then the pibox-hdmi script need only change one line in config.txt to set the include file to use, as in either

  include lcdshow-hdmi-config.txt

or
  include lcdshow-tft-config.txt

The rest of pibox-hdmi is still required, since cmdline.txt and other config files don't support include files like this.


Related issues

Precedes picam - Feature #1027: Bump fps on RPi4 on TFTsClosedHammel30 Aug 202330 Aug 2023

Actions
Actions #1

Updated by Hammel over 1 year ago

Actions #2

Updated by Hammel over 1 year ago

Changes required:
  1. src/scripts/pibox-hdmi
    1. Remove existing config.txt changes
    2. Insert "include tft-config.txt" if TFT, or remove it if HDMI
  2. src/opkg
    1. postinst
      1. Remove updates to ${MODEL}.txt (they will be hard coded now)
      2. copy ${MODEL}.txt to /media/boot/tft-config.txt and include in config.txt (instead of appending to config.txt)
      3. Remove framebuffer setting (that's hardcoded in ${MODEL}.txt now)
    2. prerm - update to match postinst
  3. New file src/config/LCD35.txt with hard coded settings
  4. config/lcdshow.mk
    1. Make sure LCD35 target update to config.update file are moved LCD35.txt
    2. Copy src/config/$(MODEL).txt to $(PK_BLDDIR)/usr/share/$(MODEL)/
  5. Remove configs/LCD35.cfg and references to it
Actions #3

Updated by Hammel over 1 year ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

Changes made to lcdshow repo.

Ready to test. Use RPi4 build of pisentry, then replace lcdshow with repo build of opkg.

Actions #4

Updated by Hammel over 1 year ago

  • % Done changed from 50 to 60

Tested, but failing. The postinst script is blasting the config.txt away for some reason, leaving just the new include line in its place.

The LCD35.txt is installed in the wrong place too - it's under /usr/share but it should be under /usr/share/lcdshow. That will require updates to both postinst and pibox-hdmi (and maybe other opkg scripts).

Actions #5

Updated by Hammel over 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 60 to 100

Switched to using sed soley for updating the config.txt and that cleared the problem of the postinst trashing that file.

Tested on hardware. Tested switching between HDMI and TFT using pibox-hdmi and that worked fine. Both HDMI and TFT displays work as expected.

Code committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF