Patchwork Add a udev rules file for flashrom

login
register
about
Submitter Uwe Hermann
Date 2010-06-10 23:13:48
Message ID <20100610231348.GM15971@greenwood>
Download mbox | patch
Permalink /patch/1497/
State Superseded
Headers show

Comments

Uwe Hermann - 2010-06-10 23:13:48
See patch.


Uwe.
Carl-Daniel Hailfinger - 2010-06-11 00:55:51
On 11.06.2010 01:13, Uwe Hermann wrote:
> Add a udev rules file for flashrom.
>
> This allows USB-based external programmers to be used by non-root users
> (which are in the 'plugdev' group). The file is to be installed by the
> distros into the proper place (not sure if this is distro-specific). On
> Debian the file will end up in /etc/udev/rules.d/z60_flashrom.rules.
>
> The following devices are listed so far:
>
>  - Buspirate
>  - Dediprog SF100
>  - DLP Design DLP-USB1232H
>  - FTDI FT4232H Mini-Module
>
> Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
>   

The following Bus Pirate link may be better:
http://dangerousprototypes.com/2009/10/08/bus-pirate-raw-spi-mode/

Could you add a comment to the file which states the exact udev version
and Debian release? udev and associated rulesets change so fast that it
is unlikely the script will work as is on other machines.

Besides that, we should think about where to store this file. flashrom
source tree, wiki or somewhere else...

Regards,
Carl-Daniel

Patch

Add a udev rules file for flashrom.

This allows USB-based external programmers to be used by non-root users
(which are in the 'plugdev' group). The file is to be installed by the
distros into the proper place (not sure if this is distro-specific). On
Debian the file will end up in /etc/udev/rules.d/z60_flashrom.rules.

The following devices are listed so far:

 - Buspirate
 - Dediprog SF100
 - DLP Design DLP-USB1232H
 - FTDI FT4232H Mini-Module

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>

Index: z60_flashrom.rules
===================================================================
--- z60_flashrom.rules	(Revision 0)
+++ z60_flashrom.rules	(Revision 0)
@@ -0,0 +1,44 @@ 
+##
+## This file is part of the flashrom project.
+##
+## Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+##
+
+##
+## Please keep this list sorted alphabetically by vendor/device name.
+##
+
+ACTION!="add|change", GOTO="flashrom_rules_end"
+SUBSYSTEM!="usb|usb_device", GOTO="flashrom_rules_end"
+
+# Buspirate
+# http://dangerousprototypes.com/2009/11/03/bus-pirate-logic-analyzer-mode/
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="664", GROUP="plugdev"
+
+# Dediprog SF100
+# http://www.dediprog.com/SPI-flash-in-circuit-programming/SF100
+ATTRS{idVendor}=="0483", ATTRS{idProduct}=="dada", MODE="664", GROUP="plugdev"
+
+# DLP Design DLP-USB1232H
+# http://www.dlpdesign.com/usb/usb1232h.shtml
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="664", GROUP="plugdev"
+
+# FTDI FT4232H Mini-Module
+# http://www.ftdichip.com/Products/EvaluationKits/FT4232H_MiniModule.htm
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="664", GROUP="plugdev"
+
+LABEL="flashrom_rules_end"