Skip to content

Commit

Permalink
Merge pull request #80 from tvoverbeek/crash-fix
Browse files Browse the repository at this point in the history
Avoid crash when spi not yet available
  • Loading branch information
shawaj authored Dec 19, 2017
2 parents a637422 + bfd8e1f commit 27f245e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions PlatformWithOS/driver-common/98-spidev.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
KERNEL=="spidev0.0", SUBSYSTEM=="spidev", TAG+="systemd"
2 changes: 2 additions & 0 deletions PlatformWithOS/driver-common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ install: check-compiled
ifeq (systemd,${SERVICE})
[ ! -d "${DESTDIR}${LIBDIR}/systemd/system" ] && mkdir -p "${DESTDIR}${LIBDIR}/systemd/system" || true
install --group=root --mode=644 --owner=root epd-fuse.service "${DESTDIR}${LIBDIR}/systemd/system/epd-fuse.service"
[ ! -d "${DESTDIR}${SYSCONFDIR}/udev/rules.d" ] && mkdir -p "${DESTDIR}${SYSCONFDIR}/udev/rules.d" || true
install --group=root --mode=644 --owner=root 98-spidev.rules "${DESTDIR}${SYSCONFDIR}/udev/rules.d/98-spidev.rules"
else # otherwise Debian
if [ -e "${EPD_FUSE_CONF}" ] ; \
then \
Expand Down
3 changes: 2 additions & 1 deletion PlatformWithOS/driver-common/epd-fuse.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Unit]
Description=A Fuse driver for the Repaper.org EPD
After=network.target dev-serial1.device
After=network.target dev-serial1.device dev-spidev0.0.device
BindsTo=dev-spidev0.0.device

[Service]
Type=forking
Expand Down

0 comments on commit 27f245e

Please sign in to comment.