Created
January 30, 2021 07:41
-
-
Save raoulh/f1d39d7f038779f3fc465a227348317e to your computer and use it in GitHub Desktop.
install pimori hyperpixel4 touchscreen on octoprint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget https://virtualhere.com/sites/default/files/usbserver/vhusbdarm | |
chmod +x vhusbdarm | |
mv vhusbdarm /usr/local/bin | |
cat > /etc/systemd/system/vhusbd.service <<- EOSCRIPT | |
[Unit] | |
Description=vhusbd | |
After=network.target | |
[Service] | |
ExecStart=/usr/local/bin/vhusbdarm | |
Type=simple | |
User=root | |
Restart=always | |
RestartSec=0 | |
[Install] | |
WantedBy=multi-user.target | |
EOSCRIPT | |
systemctl daemon-reload | |
systemctl enable vhusbd.service | |
apt update | |
apt full-upgrade | |
apt-get install --no-install-recommends xinit xinput xserver-xorg xserver-xorg-video-fbdev x11-xserver-utils matchbox unclutter chromium-browser xserver-xorg-video-fbturbo git libts-bin | |
sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config | |
cat > /usr/share/X11/xorg.conf.d/99-fbdev.conf <<- EOSCRIPT | |
Section "Device" | |
Identifier "touchscreen" | |
Driver "fbdev" | |
Option "fbdev" "/dev/fb0" | |
EndSection | |
EOSCRIPT | |
wget https://github.com/UnchartedBull/OctoDash/raw/main/scripts/install.sh | |
bash install.sh | |
rm -f install.sh | |
#enable i2c | |
raspi-config nonint do_i2c 0 | |
#console autologin | |
raspi-config nonint do_boot_behaviour B2 | |
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime | |
wget https://get.pimoroni.com/hyperpixel4 -O installhp4.sh | |
chmod +x installhp4.sh | |
./installhp4.sh -y | |
git clone https://github.com/pimoroni/hyperpixel4 -b pi4-i2c-fix | |
sed -i 's/screen-size-x = <480>/screen-size-x = <800>/' hyperpixel4/src/hyperpixel4-0x14-overlay.dts | |
sed -i 's/screen-size-y = <800>/screen-size-y = <480>/' hyperpixel4/src/hyperpixel4-0x14-overlay.dts | |
sed -i 's/touchscreen-x-mm = <51>/touchscreen-x-mm = <85>/' hyperpixel4/src/hyperpixel4-0x14-overlay.dts | |
sed -i 's/touchscreen-y-mm = <85>/touchscreen-y-mm = <51>/' hyperpixel4/src/hyperpixel4-0x14-overlay.dts | |
sed -i 's/screen-size-x = <480>/screen-size-x = <800>/' hyperpixel4/src/hyperpixel4-0x5d-overlay.dts | |
sed -i 's/screen-size-y = <800>/screen-size-y = <480>/' hyperpixel4/src/hyperpixel4-0x5d-overlay.dts | |
sed -i 's/touchscreen-x-mm = <51>/touchscreen-x-mm = <85>/' hyperpixel4/src/hyperpixel4-0x5d-overlay.dts | |
sed -i 's/touchscreen-y-mm = <85>/touchscreen-y-mm = <51>/' hyperpixel4/src/hyperpixel4-0x5d-overlay.dts | |
cd hyperpixel4 | |
./install.sh | |
wget https://calaos.fr/download/misc/xserver-xorg-input-tslib_0.0.6-7_armhf.deb | |
dpkg -i xserver-xorg-input-tslib_0.0.6-7_armhf.deb | |
cat >> /home/pi/.bashrc <<- EOSCRIPT | |
if [ -z "$SSH_CLIENT" ] || [ -z "$SSH_TTY" ]; then | |
xinit -- -nocursor | |
fi | |
EOSCRIPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment