diff options
| -rw-r--r-- | Makefile.am | 2 | ||||
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | udev/89-libiphone.rules.in | 5 | ||||
| -rw-r--r-- | udev/Makefile.am | 12 | ||||
| -rwxr-xr-x | udev/set-usb-configuration-3.sh | 3 |
5 files changed, 22 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index f103377..2b9ce9a 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | AUTOMAKE_OPTIONS = foreign | 1 | AUTOMAKE_OPTIONS = foreign |
| 2 | 2 | ||
| 3 | SUBDIRS = src include fdi $(DEV_SUB) | 3 | SUBDIRS = src include fdi udev $(DEV_SUB) |
| 4 | 4 | ||
| 5 | pkgconfigdir = $(libdir)/pkgconfig | 5 | pkgconfigdir = $(libdir)/pkgconfig |
| 6 | pkgconfig_DATA = libiphone-1.0.pc | 6 | pkgconfig_DATA = libiphone-1.0.pc |
diff --git a/configure.ac b/configure.ac index 7c31e2a..2cabe29 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -86,4 +86,4 @@ if test "$enable_largefile" != no; then | |||
| 86 | fi | 86 | fi |
| 87 | AC_SUBST(LFS_CFLAGS) | 87 | AC_SUBST(LFS_CFLAGS) |
| 88 | 88 | ||
| 89 | AC_OUTPUT(Makefile src/Makefile include/Makefile fdi/Makefile dev/Makefile libiphone-1.0.pc) | 89 | AC_OUTPUT(Makefile src/Makefile include/Makefile fdi/Makefile udev/Makefile dev/Makefile libiphone-1.0.pc) |
diff --git a/udev/89-libiphone.rules.in b/udev/89-libiphone.rules.in new file mode 100644 index 0000000..48e9a16 --- /dev/null +++ b/udev/89-libiphone.rules.in | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # Forces iPhone 1.0, 3G and iPodTouch 1 and 2 to USB configuration 3 | ||
| 2 | KERNEL=="?-?", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1290", ACTION=="add", RUN+="@bindir@/set-usb-configuration-3.sh" | ||
| 3 | KERNEL=="?-?", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1291", ACTION=="add", RUN+="@bindir@/set-usb-configuration-3.sh" | ||
| 4 | KERNEL=="?-?", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1292", ACTION=="add", RUN+="@bindir@/set-usb-configuration-3.sh" | ||
| 5 | KERNEL=="?-?", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1293", ACTION=="add", RUN+="@bindir@/set-usb-configuration-3.sh" | ||
diff --git a/udev/Makefile.am b/udev/Makefile.am new file mode 100644 index 0000000..27cc456 --- /dev/null +++ b/udev/Makefile.am | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | udevdir=$(sysconfdir)/udev/rules.d/ | ||
| 2 | udev_DATA=89-libiphone.rules | ||
| 3 | |||
| 4 | edit = sed \ | ||
| 5 | -e 's|@bindir[@]|$(bindir)|g' | ||
| 6 | |||
| 7 | 89-libiphone.rules: | ||
| 8 | rm -f $@ $@.tmp | ||
| 9 | $(edit) '$(srcdir)/$@.in' >$@.tmp | ||
| 10 | mv $@.tmp $@ | ||
| 11 | |||
| 12 | bin_SCRIPTS = set-usb-configuration-3.sh | ||
diff --git a/udev/set-usb-configuration-3.sh b/udev/set-usb-configuration-3.sh new file mode 100755 index 0000000..ace07f0 --- /dev/null +++ b/udev/set-usb-configuration-3.sh | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | echo 3 > /sys$DEVPATH/bConfigurationValue | ||
