Skip to content

Commit 0938002

Browse files
author
Thomas Preston
committed
added new manual install instructions for kernel >= 3.18
1 parent 419deae commit 0938002

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/installation.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ but is not enabled by default. You can load the SPI driver manually by running::
5151

5252
$ sudo modprobe spi-bcm2708
5353

54-
And you can permanently enable it by commenting out the
55-
``blacklist spi-bcm2708`` line in ``/etc/modprobe.d/raspi-blacklist.conf``.
54+
You can permanently enable it one of two ways, depending on which kernel
55+
version you're on.
56+
57+
- Kernel Version < 3.18 (The old way): Comment out ``blacklist spi-bcm2708`` line in ``/etc/modprobe.d/raspi-blacklist.conf``.
58+
59+
- Kernel Version >= 3.18 (Device Tree): add ``dtparam=spi=on`` to ``/boot/config/txt``
5660

5761
The /dev/spidev* devices should now appear but they require special privileges
5862
for the user *pi* to access them. You can set these up by adding the following
@@ -76,11 +80,7 @@ Interrupts work by monitoring the GPIO pins. You'll need to give the user *pi*
7680
access to these by adding the following udev rule (all on one line) to
7781
``/etc/udev/rules.d/51-gpio.rules``::
7882

79-
SUBSYSTEM=="gpio*", PROGRAM="
80-
/bin/sh -c 'chown -R root:gpio /sys/class/gpio &&
81-
chmod -R 770 /sys/class/gpio;
82-
chown -R root:gpio /sys/devices/virtual/gpio &&
83-
chmod -R 770 /sys/devices/virtual/gpio'"
83+
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c 'chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio'"
8484

8585
Then create the gpio group and add the user pi::
8686

0 commit comments

Comments
 (0)