Cours:VirtualGPIO

De troyesGEII
Aller à : navigation, rechercher

https://stackoverflow.com/questions/60941225/compile-gpio-mockup-in-5-4

https://debian-facile.org/doc:systeme:kernel:compiler

https://wiki.peori.space/page/gpio

!!!prévoir 30-35 GO pour la compilation !!!
apt install build-essential fakeroot dpkg-dev perl libssl-dev bc gnupg dirmngr libncurses5-dev libelf-dev flex bison lsb-release
apt install linux-source
cd /usr/src
tar xvf linux-source-5.4.0.tar.bz2
cd linux-source-5.4.0
rm linux-source-5.4.0.tar.bz2
cp /boot/config-5.4.xxxx .config
make olddefconfig
echo "CONFIG_GPIO_MOCKUP=m" >> .config
pb avec le fichier debian/scrips/fix-filenames à déplacer pour lancer la compilation
make -j $(nproc) deb-pkg LOCALVERSION=-gpio-mockup


  • fichiers :
    • /etc/modules-load.d/gpio.conf
      • gpio-mockup
    • /etc/modprobe.d/gpio.conf
      • options gpio-mockup gpio_mockup_ranges=1,40
    • /etc/udev/rules.d/99-gpio.rules
      • SUBSYSTEM=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chgrp -R plugdev /sys/${DEVPATH} && chmod -R g+w /sys/${DEVPATH} && chmod 220 /sys/class/gpio/export && chgrp -R plugdev /sys/class/gpio/export'"