Iru Cai (vimacs) would like Iru Cai to review this change.

View Change

Add a udev rule for ch341a programmer

The udev rule will let users use the programmer without root
permission.

Change-Id: I5347f2c9f5a7c8613c74ee989d572d3f0b9a7e76
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
---
A 99-flashrom.rules
M Makefile
2 files changed, 4 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/49/39749/1
diff --git a/99-flashrom.rules b/99-flashrom.rules
new file mode 100644
index 0000000..6e505a7
--- /dev/null
+++ b/99-flashrom.rules
@@ -0,0 +1,2 @@
+# CH341A
+SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666"
diff --git a/Makefile b/Makefile
index 28ceab6..d0900db 100644
--- a/Makefile
+++ b/Makefile
@@ -1560,8 +1560,10 @@
install: $(PROGRAM)$(EXEC_SUFFIX) $(PROGRAM).8
mkdir -p $(DESTDIR)$(PREFIX)/sbin
mkdir -p $(DESTDIR)$(MANDIR)/man8
+ mkdir -p $(DESTDIR)/etc/udev/rules.d
$(INSTALL) -m 0755 $(PROGRAM)$(EXEC_SUFFIX) $(DESTDIR)$(PREFIX)/sbin
$(INSTALL) -m 0644 $(PROGRAM).8 $(DESTDIR)$(MANDIR)/man8
+ $(INSTALL) -m 0644 99-flashrom.rules $(DESTDIR)/etc/udev/rules.d

libinstall: libflashrom.a libflashrom.h
mkdir -p $(DESTDIR)$(PREFIX)/lib

To view, visit change 39749. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I5347f2c9f5a7c8613c74ee989d572d3f0b9a7e76
Gerrit-Change-Number: 39749
Gerrit-PatchSet: 1
Gerrit-Owner: Iru Cai (vimacs) <mytbk920423@gmail.com>
Gerrit-Reviewer: Iru Cai <mytbk920423@gmail.com>
Gerrit-MessageType: newchange