modular config for touch screen
authorPaul Hänsch <paul@plutz.net>
Wed, 6 Mar 2019 17:47:16 +0000 (18:47 +0100)
committerPaul Hänsch <paul@plutz.net>
Wed, 6 Mar 2019 17:47:16 +0000 (18:47 +0100)
27 files changed:
Makefile
config.example
files/boot/config.txt
files/root/postbuild.sh [deleted file]
files_ws5inch/usr/share/X11/xorg.conf.d/45-evdev.conf [new file with mode: 0644]
files_xfce/etc/X11/Xresources/xscreensaver [moved from files_xfce/etc/Xresources/xscreensaver with 100% similarity]
files_xfce/etc/X11/Xsession.d/10qtstyle [moved from files_xfce/etc/Xsession.d/10qtstyle with 100% similarity]
files_xfce/etc/gimp/2.0/controllerrc [moved from files_xfce/etc/2.0/controllerrc with 100% similarity]
files_xfce/etc/gimp/2.0/gimprc [moved from files_xfce/etc/2.0/gimprc with 100% similarity]
files_xfce/etc/gimp/2.0/gtkrc [moved from files_xfce/etc/2.0/gtkrc with 100% similarity]
files_xfce/etc/gimp/2.0/menurc [moved from files_xfce/etc/2.0/menurc with 100% similarity]
files_xfce/etc/gimp/2.0/sessionrc [moved from files_xfce/etc/2.0/sessionrc with 100% similarity]
files_xfce/etc/gimp/2.0/templaterc [moved from files_xfce/etc/2.0/templaterc with 100% similarity]
files_xfce/etc/gimp/2.0/toolrc [moved from files_xfce/etc/2.0/toolrc with 100% similarity]
files_xfce/etc/gimp/2.0/unitrc [moved from files_xfce/etc/2.0/unitrc with 100% similarity]
files_xfce/etc/gtk-2.0/gtkrc [moved from files_xfce/etc/gtkrc with 100% similarity]
files_xfce/etc/xdg/marblerc [moved from files_xfce/etc/marblerc with 100% similarity]
files_xfce/etc/xdg/mimeapps.list [moved from files_xfce/etc/mimeapps.list with 100% similarity]
files_xfce/etc/xdg/xfce4/panel/whiskermenu-1.rc [moved from files_xfce/etc/xfce4/panel/whiskermenu-1.rc with 100% similarity]
files_xfce/etc/xdg/xfce4/terminal/terminalrc [moved from files_xfce/etc/xfce4/terminal/terminalrc with 100% similarity]
files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/thunar.xml [moved from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/thunar.xml with 100% similarity]
files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml [moved from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml with 100% similarity]
files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml [moved from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml with 100% similarity]
files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml [moved from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml with 100% similarity]
files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml [moved from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml with 100% similarity]
ws5inch.mk [new file with mode: 0644]
xfce.mk

index 6a35118..fe8971e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,8 +20,8 @@
 BOOTSTRAP = http://raspbian.raspberrypi.org/raspbian
 
 define SOURCES = 
-deb    http://raspbian.raspberrypi.org/raspbian stretch main non-free firmware rpi\n\
-deb    http://archive.raspberrypi.org/debian stretch main\n
+deb    http://raspbian.raspberrypi.org/raspbian stretch main non-free firmware rpi
+deb    http://archive.raspberrypi.org/debian stretch main
 endef
 
 PACKAGES := apt bluez bluez-firmware bluez-tools btrfs-tools busybox-static bzip2 ca-certificates cron debian-archive-keyring deborphan firmware-brcm80211 firmware-linux-free firmware-misc-nonfree gzip htop ifupdown init iputils-ping irqbalance isc-dhcp-client less libraspberrypi-bin libraspberrypi0 make net-tools nmap ntpdate openssh-client openssh-server pi-bluetooth raspberrypi-bootloader raspberrypi-kernel rsync ssh sshfs sudo systemd traceroute unzip vim wget wireless-tools wpasupplicant xz-utils zip
@@ -30,15 +30,14 @@ PACKAGES := apt bluez bluez-firmware bluez-tools btrfs-tools busybox-static bzip
 WIFI-SSID = 
 WIFI-PASS = 
 
+IMGFILE = raspi.img
+
 config.mk: config.example
        cp -n "$<" "$@"
+include config.mk
 
 .PHONY: imgfile imgmount root_copy norecommends apt_keys
-
-IMGFILE = raspi.img
-
-include config.mk
-include *.mk
+export SOURCES
 
 raspi_root:
        btrfs subvolume create "$@" || mkdir "$@"
@@ -55,13 +54,13 @@ raspi_root/etc/apt/apt.conf.d/10norecommends: raspi_root
        printf 'APT::Install-Recommends "false";\n' >"$@"
        chmod 644 "$@"
 
-apt_keys:
-       -chroot "$@" apt-key add - <./raspbian-archive-keyring.gpg
-       -chroot "$@" apt-key add - <./raspberrypi-archive-keyring.gpg
-       -chroot "$@" apt-key add - <./debian-archive-stretch-stable.gpg
+apt_keys: raspi_root
+       -chroot "$<" apt-key add - <./raspbian-archive-keyring.gpg
+       -chroot "$<" apt-key add - <./raspberrypi-archive-keyring.gpg
+       -chroot "$<" apt-key add - <./debian-archive-stretch-stable.gpg
 
 raspi_root/: raspi_root norecommends apt_keys .FORCE
-       printf '${SOURCES}' >$@/etc/apt/sources.list
+       printf %s "$$SOURCES" >$@/etc/apt/sources.list
        -cp /etc/resolv.conf "$@etc/"
        -chroot "$@" sh -c 'apt-mark showmanual |xargs apt-mark auto'
        -chroot "$@" apt-get update
index 8f02654..9bf5035 100644 (file)
@@ -1,18 +1,20 @@
 # Name this file config.mk to override options from the main Makefile
 
 # define SOURCES = 
-# deb     http://raspbian.raspberrypi.org/raspbian stretch main non-free firmware rpi\n\
-# deb     http://archive.raspberrypi.org/debian stretch main\n
+# deb     http://raspbian.raspberrypi.org/raspbian stretch main non-free firmware rpi
+# deb     http://archive.raspberrypi.org/debian stretch main
 # endef
 
 # BOOTSTRAP := http://raspbian.raspberrypi.org/raspbian
-
 # PACKAGES := ${PACKAGES} foo bar ... additional packages
 
+# include xfce.mk
+# include ws5inch.mk
+
 # WIFI-SSID = 
 # WIFI-PASS =
 
 # PHONY: rootpass
 # ${IMGFILE}: rootpass
 # rootpass: imgmount root_copy
-#      -chroot "$<" usermod -p "$(openssl passwd -1 -salt aaa password)" root
+#      -chroot "$<" usermod -p "$$(openssl passwd -salt "x$$RANDOM" password)" root
index 78c168d..cf2e1af 100644 (file)
@@ -5,8 +5,3 @@
 
 dtparam=audio=on
 # dtoverlay=w1-gpio
-
-hdmi_group=2
-hdmi_mode=87
-hdmi_cvt=800 480 60 6 0 0 0
-hdmi_drive=1
diff --git a/files/root/postbuild.sh b/files/root/postbuild.sh
deleted file mode 100755 (executable)
index faf7de6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-usermod -p "$(openssl passwd -1 -salt ert root)" root
-useradd -m local
diff --git a/files_ws5inch/usr/share/X11/xorg.conf.d/45-evdev.conf b/files_ws5inch/usr/share/X11/xorg.conf.d/45-evdev.conf
new file mode 100644 (file)
index 0000000..6d18181
--- /dev/null
@@ -0,0 +1,7 @@
+Section "InputClass"
+       Identifier "evdev touchscreen catchall"
+       MatchIsTouchscreen "on"
+       Option  "Calibration"   "200 3950 250 4000"
+       MatchDevicePath "/dev/input/event*"
+       Driver "evdev"
+EndSection
diff --git a/ws5inch.mk b/ws5inch.mk
new file mode 100644 (file)
index 0000000..e514622
--- /dev/null
@@ -0,0 +1,21 @@
+define ws5inch_boot =
+hdmi_group=2
+hdmi_mode=87
+hdmi_cvt=800 480 60 6 0 0 0
+hdmi_drive=1
+
+dtparam=i2c_arm=on
+dtparam=spi=on
+enable_uart=1
+dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
+endef
+export ws5inch_boot
+
+PACKAGES := ${PACKAGES} xserver-xorg-input-evdev xinput xinput-calibrator
+
+.PHONY: ws5inch
+${IMGFILE}: ws5inch
+ws5inch: imgmount root_copy files_ws5inch/
+       cp -a files_ws5inch/. "$</"
+       printf %s "$$ws5inch_boot" >>"$</boot/config.txt"
+       -chroot "$<" adduser local input
diff --git a/xfce.mk b/xfce.mk
index 58c1a43..6be2aea 100644 (file)
--- a/xfce.mk
+++ b/xfce.mk
@@ -1,11 +1,7 @@
 PACKAGES := ${PACKAGES} xserver-xorg-video-fbturbo xserver-xorg xserver-xorg-input-evdev nodm xfce4 xauth x2x xvkbd blueman xfce4-terminal xinput xinput-calibrator xfce4-clipman-plugin xfce4-whiskermenu-plugin
 
-.PHONY: xuser xfce
-
-${IMGFILE}: xuser xfce
-
-xuser: imgmount root_copy
-       -chroot "$<" useradd -m local
-
-xfce: imgmount files_xfce/
+.PHONY: xfce
+${IMGFILE}: xfce
+xfce: imgmount root_copy files_xfce/
        cp -a files_xfce/. "$</"
+       -chroot "$<" useradd -m local