Skip to content

Add `devicepkg-dev` which generate the touchscreen udev rule based on the deviceinfo

Daniele Debernardi requested to merge feature/devicepkg-generate-udev-rules into master

Including devicepkg-dev package in makedepends of the device APKBUILD, allows to call:

  • devicepkg_default_build during the build function which reads the deviceinfo and generate the udev rule for the touchscreen
  • devicepkg_default_package during the package function will install the generated file

It will use the deviceinfo_dev_touchscreen and deviceinfo_dev_touchscreen_calibration variables of the deviceinfo file and creates a rule like this:

SUBSYSTEM=="input", ENV{DEVNAME}=="/dev/input/event2", \
ENV{WL_CALIBRATION}="1.043478 0.000000 -5.217407 0.014562 0.956938 2.798035", \
ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1"

(PS: for the samsung i9070 I removed the calibration since it's not necessary)

commands used for testing:

sudo rm -f ~/.local/var/pmbootstrap/packages/*/devicepkg-dev-*
sudo rm -f ~/.local/var/pmbootstrap/packages/*/device-samsung-i9070-*
pmbootstrap index
pmbootstrap -y zap

pmbootstrap checksum devicepkg-dev && pmbootstrap build devicepkg-dev --arch armhf
pmbootstrap checksum device-samsung-i9070 && pmbootstrap build device-samsung-i9070 --arch=armhf

pmbootstrap -y zap
pmbootstrap chroot -r -- apk add device-samsung-i9070
pmbootstrap chroot -r -- cat /etc/udev/rules.d/90-touchscreen-dev.rules

Merge request reports