From 572ba0692c7a41b4e4b86009b9964e5045939fef Mon Sep 17 00:00:00 2001 From: "J.C. Woltz" Date: Sat, 17 Mar 2012 21:30:35 -0400 Subject: [PATCH] new package: usb_modeswitch_data usb_modeswitch_data provides udev rules for usb VID/PID combinations to switch usb deices from their default mode into a more useable mode. The default mode usually is a cdrom with installation software that is of little use in an embedded linux situation Signed-off-by: J.C. Woltz Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Thomas Petazzoni --- package/Config.in | 1 + package/usb_modeswitch_data/Config.in | 12 +++++++++ .../usb_modeswitch_data-makefile.patch | 27 +++++++++++++++++++ .../usb_modeswitch_data.mk | 24 +++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 package/usb_modeswitch_data/Config.in create mode 100644 package/usb_modeswitch_data/usb_modeswitch_data-makefile.patch create mode 100644 package/usb_modeswitch_data/usb_modeswitch_data.mk diff --git a/package/Config.in b/package/Config.in index 3a059173f4..3f46d3af0b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -239,6 +239,7 @@ source "package/uboot-tools/Config.in" source "package/udev/Config.in" source "package/unionfs/Config.in" source "package/usb_modeswitch/Config.in" +source "package/usb_modeswitch_data/Config.in" source "package/usbmount/Config.in" source "package/usbutils/Config.in" source "package/wipe/Config.in" diff --git a/package/usb_modeswitch_data/Config.in b/package/usb_modeswitch_data/Config.in new file mode 100644 index 0000000000..8698bb606c --- /dev/null +++ b/package/usb_modeswitch_data/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + bool "usb_modeswitch_data" + select BR2_PACKAGE_USB_MODESWITCH + # tcl is a runtime dependency + select BR2_PACKAGE_TCL + select BR2_PACKAGE_TCL_TCLSH + help + USB mode switch data + Contains udev rules and events to allow usb_modeswitch to + function automatically + + http://www.draisberghof.de/usb_modeswitch/ diff --git a/package/usb_modeswitch_data/usb_modeswitch_data-makefile.patch b/package/usb_modeswitch_data/usb_modeswitch_data-makefile.patch new file mode 100644 index 0000000000..769e514533 --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data-makefile.patch @@ -0,0 +1,27 @@ +Fixed Makefile install sections to not reload udev rules. In a +cross-compiler environment, it is not wanted to reload the host udev rules. + +Signed-off-by: J.C. Woltz +--- usb_modeswitch_data-20120120.orig/Makefile 2012-01-20 17:25:32.000000000 -0500 ++++ usb_modeswitch_data-20120120/Makefile 2012-02-06 14:20:47.000000000 -0500 +@@ -12,9 +12,9 @@ + + clean: + +-install: files-install db-install rules-reload ++install: files-install db-install + +-install-packed: files-install db-install-packed rules-reload ++install-packed: files-install db-install-packed + + files-install: + install -d $(PREFIX)/share/usb_modeswitch +@@ -50,7 +50,7 @@ + fi \ + fi + +-uninstall: files-uninstall rules-reload ++uninstall: files-uninstall + + files-uninstall: + $(RM) $(RULESDIR)/40-usb_modeswitch.rules diff --git a/package/usb_modeswitch_data/usb_modeswitch_data.mk b/package/usb_modeswitch_data/usb_modeswitch_data.mk new file mode 100644 index 0000000000..d493144aed --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data.mk @@ -0,0 +1,24 @@ +############################################################# +# +# usb_modeswitch_data +# +############################################################# + +USB_MODESWITCH_DATA_VERSION = 20120812 +USB_MODESWITCH_DATA_SOURCE = usb-modeswitch-data-$(USB_MODESWITCH_DATA_VERSION).tar.bz2 +USB_MODESWITCH_DATA_SITE = http://www.draisberghof.de/usb_modeswitch +USB_MODESWITCH_DATA_DEPENDENCIES = usb_modeswitch +USB_MODESWITCH_DATA_LICENSE = GPLv2+ +USB_MODESWITCH_DATA_LICENSE_FILES = COPYING + +# Nothing to build, it is a pure data package + +define USB_MODESWITCH_DATA_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +define USB_MODESWITCH_DATA_CLEAN_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) clean +endef + +$(eval $(generic-package)) -- 2.30.2