From: Paul Hänsch Date: Wed, 6 Mar 2019 17:47:16 +0000 (+0100) Subject: modular config for touch screen X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=fa1d197fbf6dde03e3fa2363425c0f5f9b0bcd42;p=rpi_small modular config for touch screen --- diff --git a/Makefile b/Makefile index 6a35118..fe8971e 100644 --- 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 diff --git a/config.example b/config.example index 8f02654..9bf5035 100644 --- a/config.example +++ b/config.example @@ -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 diff --git a/files/boot/config.txt b/files/boot/config.txt index 78c168d..cf2e1af 100644 --- a/files/boot/config.txt +++ b/files/boot/config.txt @@ -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 index faf7de6..0000000 --- a/files/root/postbuild.sh +++ /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 index 0000000..6d18181 --- /dev/null +++ b/files_ws5inch/usr/share/X11/xorg.conf.d/45-evdev.conf @@ -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/files_xfce/etc/Xresources/xscreensaver b/files_xfce/etc/X11/Xresources/xscreensaver similarity index 100% rename from files_xfce/etc/Xresources/xscreensaver rename to files_xfce/etc/X11/Xresources/xscreensaver diff --git a/files_xfce/etc/Xsession.d/10qtstyle b/files_xfce/etc/X11/Xsession.d/10qtstyle similarity index 100% rename from files_xfce/etc/Xsession.d/10qtstyle rename to files_xfce/etc/X11/Xsession.d/10qtstyle diff --git a/files_xfce/etc/2.0/controllerrc b/files_xfce/etc/gimp/2.0/controllerrc similarity index 100% rename from files_xfce/etc/2.0/controllerrc rename to files_xfce/etc/gimp/2.0/controllerrc diff --git a/files_xfce/etc/2.0/gimprc b/files_xfce/etc/gimp/2.0/gimprc similarity index 100% rename from files_xfce/etc/2.0/gimprc rename to files_xfce/etc/gimp/2.0/gimprc diff --git a/files_xfce/etc/2.0/gtkrc b/files_xfce/etc/gimp/2.0/gtkrc similarity index 100% rename from files_xfce/etc/2.0/gtkrc rename to files_xfce/etc/gimp/2.0/gtkrc diff --git a/files_xfce/etc/2.0/menurc b/files_xfce/etc/gimp/2.0/menurc similarity index 100% rename from files_xfce/etc/2.0/menurc rename to files_xfce/etc/gimp/2.0/menurc diff --git a/files_xfce/etc/2.0/sessionrc b/files_xfce/etc/gimp/2.0/sessionrc similarity index 100% rename from files_xfce/etc/2.0/sessionrc rename to files_xfce/etc/gimp/2.0/sessionrc diff --git a/files_xfce/etc/2.0/templaterc b/files_xfce/etc/gimp/2.0/templaterc similarity index 100% rename from files_xfce/etc/2.0/templaterc rename to files_xfce/etc/gimp/2.0/templaterc diff --git a/files_xfce/etc/2.0/toolrc b/files_xfce/etc/gimp/2.0/toolrc similarity index 100% rename from files_xfce/etc/2.0/toolrc rename to files_xfce/etc/gimp/2.0/toolrc diff --git a/files_xfce/etc/2.0/unitrc b/files_xfce/etc/gimp/2.0/unitrc similarity index 100% rename from files_xfce/etc/2.0/unitrc rename to files_xfce/etc/gimp/2.0/unitrc diff --git a/files_xfce/etc/gtkrc b/files_xfce/etc/gtk-2.0/gtkrc similarity index 100% rename from files_xfce/etc/gtkrc rename to files_xfce/etc/gtk-2.0/gtkrc diff --git a/files_xfce/etc/marblerc b/files_xfce/etc/xdg/marblerc similarity index 100% rename from files_xfce/etc/marblerc rename to files_xfce/etc/xdg/marblerc diff --git a/files_xfce/etc/mimeapps.list b/files_xfce/etc/xdg/mimeapps.list similarity index 100% rename from files_xfce/etc/mimeapps.list rename to files_xfce/etc/xdg/mimeapps.list diff --git a/files_xfce/etc/xfce4/panel/whiskermenu-1.rc b/files_xfce/etc/xdg/xfce4/panel/whiskermenu-1.rc similarity index 100% rename from files_xfce/etc/xfce4/panel/whiskermenu-1.rc rename to files_xfce/etc/xdg/xfce4/panel/whiskermenu-1.rc diff --git a/files_xfce/etc/xfce4/terminal/terminalrc b/files_xfce/etc/xdg/xfce4/terminal/terminalrc similarity index 100% rename from files_xfce/etc/xfce4/terminal/terminalrc rename to files_xfce/etc/xdg/xfce4/terminal/terminalrc diff --git a/files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/thunar.xml b/files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/thunar.xml similarity index 100% rename from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/thunar.xml rename to files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/thunar.xml diff --git a/files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml b/files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml similarity index 100% rename from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml rename to files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml diff --git a/files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml similarity index 100% rename from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml rename to files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml diff --git a/files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml b/files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml similarity index 100% rename from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml rename to files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml diff --git a/files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml similarity index 100% rename from files_xfce/etc/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml rename to files_xfce/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml diff --git a/ws5inch.mk b/ws5inch.mk new file mode 100644 index 0000000..e514622 --- /dev/null +++ b/ws5inch.mk @@ -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/. "$>"$