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