Koa-PicoITX User Manual rev 1.0
20
with command: sudo sh -c 'echo i2c_dev >>/etc/modules'
−
add the /dev/i2c device to the dialout group to be used by any user:
create the file i2c_chown in /etc/init.d/
content of i2c_chown:
#! /bin/sh
# add i2c dev into dialout group
chown :dialout /dev/i2c-0
-
change the file to execution mode:
sudo chmod +x /etc/init.d/i2c_chown
-
create the link to the start-up level 2:
sudo ln -s /etc/init.d/i2c_chown /etc/rc2.d/S99i2c_chown
-
load the module: sudo modprobe i2c_dev
-
launch the script: sudo /etc/init.d/./i2c_chown
5.4.2 gpio driver
-
for an autonomous start-up, add it in the file /etc/modules
with command: sudo sh -c 'echo via_gpio >>/etc/modules'
-
create the file via_gpio giving node initialization and device group
modification in /etc/init.d/ :
content of file via_gpio :
#! /bin/sh
#create node
mknod /dev/via_gpio c 241 0 -m660
# add via_gpio into dialout group
chown :dialout /dev/via_gpio
-
change the file to execution mode:
sudo chmod +x /etc/init.d/via_gpio
-
launch the script: sudo /etc/init.d/./via_gpio