Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Script to automatically download and install rockbox firmware

Re: Script to automatically download and install rockbox firmware

From: Menachem Shapiro <menachem.shapiro_at_gmail.com>
Date: Tue, 15 May 2007 19:45:00 -0700

B"H
On 5/15/07, Nix <nix_at_esperi.org.uk> wrote:
> On 15 May 2007, Menachem Shapiro said:
>
> > I created a file called 98-rockbox.rules and put it in
> > /etc/udev/rules.d. I experimented with different things, trying to use
> > the VID and PID of the usb device as an identifier. I ended up with
> > something like tihs:
> > SUBSYSTEM=="usb", ATTRS{idVendor}=="05ab", ATTRS{idProduct}=="0060",
> > RUN+="/home/mshapiro/rockbox_scripts/rockbox_downloader.sh"
> >
>
> You can use whatever block you like, but all the keys have to come
> from the same block. (Or you could upgrade udev, as later versions
> don't have this limitation.)
>

In an effort to get it down to the minimum needed to get it to work, I
tried this:
SUBSYSTEMS=="scsi", RUN+="home/mshapiro/rockbox_scripts/rockbox_downloader.sh"

(I also tried this, in case there was a permissions issue with my script:
SUBSYSTEMS=="scsi", RUN+="zenity --warning --text 'teeext'")

'udevtest /sys/block/sdb/' returned the following data (with the data
at the end seeming to indicate that it should run the command when I
plug in the device.). However, plugging in the device did not result
in the script running. Any ideas? (If it helps, I an running ubuntu
7.04) :
===================================================
mshapiro_at_eskimo:~/Desktop/rockbox_scripts$ udevtest /sys/block/sdb/
parse_file: reading '/etc/udev/rules.d/00-init.rules' as rules file
parse_file: reading '/etc/udev/rules.d/05-options.rules' as rules file
parse_file: reading '/etc/udev/rules.d/20-names.rules' as rules file
parse_file: reading '/etc/udev/rules.d/25-dmsetup.rules' as rules file
parse_file: reading '/etc/udev/rules.d/25-iftab.rules' as rules file
parse_file: reading '/etc/udev/rules.d/30-cdrom_id.rules' as rules file
parse_file: reading '/etc/udev/rules.d/40-permissions.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-hplip.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-libgphoto2.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-libsane.rules' as rules file
parse_file: reading
'/etc/udev/rules.d/50-xserver-xorg-input-wacom.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-libpisock.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-symlinks.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-vboxdrv.rules' as rules file
parse_file: reading '/etc/udev/rules.d/65-persistent-input.rules' as rules file
parse_file: reading '/etc/udev/rules.d/65-persistent-storage.rules' as
rules file
parse_file: reading '/etc/udev/rules.d/80-programs.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-alsa.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-brltty.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-hdparm.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-hplj10xx.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-hwclock.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-ifupdown.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-pcmcia.rules' as rules file
parse_file: reading '/etc/udev/rules.d/90-modprobe.rules' as rules file
parse_file: reading '/etc/udev/rules.d/95-hal.rules' as rules file
parse_file: reading '/etc/udev/rules.d/98-rockbox.rules' as rules file
parse_file: reading '/etc/udev/rules.d/99-udevmonitor.rules' as rules file
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, if rules
match against subsystem specfic kernel event variables.

main: looking at device '/block/sdb' from subsystem 'block'
run_program: 'usb_id -x'
run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR=FUJITSU'
run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL=MHV2040AT'
run_program: '/lib/udev/usb_id' (stdout) 'ID_REVISION=0000'
run_program: '/lib/udev/usb_id' (stdout)
'ID_SERIAL=FUJITSU_MHV2040AT_wwww.archos.comA-0:0'
run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL_SHORT=wwww.archos.comA'
run_program: '/lib/udev/usb_id' (stdout) 'ID_TYPE=disk'
run_program: '/lib/udev/usb_id' (stdout) 'ID_INSTANCE=0:0'
run_program: '/lib/udev/usb_id' (stdout) 'ID_BUS=usb'
run_program: '/lib/udev/usb_id' returned with status 0
udev_rules_get_name: add symlink
'disk/by-id/usb-FUJITSU_MHV2040AT_wwww.archos.comA-0:0'
run_program: 'path_id /block/sdb'
run_program: '/lib/udev/path_id' (stdout)
'ID_PATH=pci-0000:00:1d.7-usb-0:7:2.0-scsi-0:0:0:0'
run_program: '/lib/udev/path_id' returned with status 0
udev_rules_get_name: add symlink
'disk/by-path/pci-0000:00:1d.7-usb-0:7:2.0-scsi-0:0:0:0'
udev_node_mknod: mknod(/dev/.tmp-8-16, 060600, 8, 16) failed: Permission denied
run_program: 'vol_id --export /dev/.tmp-8-16'
run_program: '/lib/udev/vol_id' (stderr) '/dev/.tmp-8-16: error open volume'
run_program: '/lib/udev/vol_id' returned with status 2
run_program: 'edd_id --export /dev/.tmp-8-16'
run_program: '/lib/udev/edd_id' (stderr) 'no kernel EDD support'
run_program: '/lib/udev/edd_id' returned with status 2
udev_rules_get_name: no node name set, will use kernel name 'sdb'
unlink_secure: chown(/dev/.tmp-8-16, 0, 0) failed: No such file or directory
unlink_secure: chmod(/dev/.tmp-8-16, 0000) failed: No such file or directory
udev_device_event: device '/block/sdb' already in database, cleanup
udev_node_add: creating device node '/dev/sdb', major = '8', minor =
'16', mode = '0660', uid = '0', gid = '46'
udev_node_update_symlinks: update symlink
'disk/by-id/usb-FUJITSU_MHV2040AT_wwww.archos.comA-0:0' of
'/block/sdb'
udev_db_get_devices_by_name: found index directory
'/dev/.udev/names/disk%2fby-id%2fusb-FUJITSU_MHV2040AT_wwww.archos.comA-0:0'
update_link: found 1 devices with name
'disk/by-id/usb-FUJITSU_MHV2040AT_wwww.archos.comA-0:0'
update_link: found '/block/sdb' for
'disk/by-id/usb-FUJITSU_MHV2040AT_wwww.archos.comA-0:0'
update_link: compare (our own) priority of '/block/sdb' 0 >= 0
update_link: 'disk/by-id/usb-FUJITSU_MHV2040AT_wwww.archos.comA-0:0'
with target 'sdb' has the highest priority 0, create it
udev_node_update_symlinks: update symlink
'disk/by-path/pci-0000:00:1d.7-usb-0:7:2.0-scsi-0:0:0:0' of
'/block/sdb'
udev_db_get_devices_by_name: found index directory
'/dev/.udev/names/disk%2fby-path%2fpci-0000:00:1d.7-usb-0:7:2.0-scsi-0:0:0:0'
update_link: found 1 devices with name
'disk/by-path/pci-0000:00:1d.7-usb-0:7:2.0-scsi-0:0:0:0'
update_link: found '/block/sdb' for
'disk/by-path/pci-0000:00:1d.7-usb-0:7:2.0-scsi-0:0:0:0'
update_link: compare (our own) priority of '/block/sdb' 0 >= 0
update_link: 'disk/by-path/pci-0000:00:1d.7-usb-0:7:2.0-scsi-0:0:0:0'
with target 'sdb' has the highest priority 0, create it
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/home/mshapiro/rockbox_scripts/rockbox_downloader.sh'
main: run: 'socket:/org/kernel/udev/monitor'
===================================================

> --
> `In the future, company names will be a 32-character hex string.'
> --- Bruce Schneier on the shortage of company names
>
Received on 2007-05-16


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa