FydeOS / chromium_os-raspberry_pi

Build your Chromium OS for Raspberry Pi 4B, Pi400 and the latest Raspberry Pi 5
https://chromiumos.io
BSD 2-Clause "Simplified" License
1.69k stars 192 forks source link

Build with custom touchscreen driver #231

Closed ghost closed 2 years ago

ghost commented 2 years ago

Greetings, I have a raspberry pi MHS 3.5-inch touchscreen that uses GPIO. Is it possible to build the OS with custom overlay drivers? Also does FydeOS support GPIO? Thank you.

peeweep commented 2 years ago

Of course you can build your system with a custom overlay driver. We have a config.txt to configure this, you can modify it before you build image, or use the edit-pi-config built in the OS to edit it. And also FydeOS/Chromium OS support GPIO. In this OS we have built in some simple and useful tools, you can try gpio* commands. For example, gpioinfo.

ghost commented 2 years ago

Since FydeOS is Linux based, can I use the driver overlay files and configs here? And can you show me how to build the OS with the drivers above? Thanks !

peeweep commented 2 years ago

A script of MHS35: https://github.com/goodtft/LCD-show/blob/master/MHS35-show I think the part that can be used on Chromium OS in this script is to copy the dtb file and modify rpi config.txt.

hdmi_force_hotplug=1
dtparam=i2c_arm=on
dtparam=spi=on
enable_uart=1
dtoverlay=mhs35:rotate=90
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 480 320 60 6 0 0 0
hdmi_drive=2

I don't know how to drive your touchscreen display, need you to try it yourself.

If you want to have a specific reference, you can see https://github.com/fydeos/chromium_os-raspberry_pi/commit/1eae303e3 In order to let MIPI camera work, we modified rpi config.txt, kernel config, camera lib and gbm lib in this commit.

peeweep commented 2 years ago

Your issues will likely get closed if:

  • You are asking about issues about a 3rd-party app, a non-standard peripheral device or a special setup that does not benefit the general community

As FAQ, I will close this issue. If you find something useful , welcome to share with us.