Add a new tool to convert FreeBSD USB device IDs to the format we use
authorMatthias Schmidt <matthias@dragonflybsd.org>
Sun, 13 Jan 2008 18:21:50 +0000 (18:21 +0000)
committerMatthias Schmidt <matthias@dragonflybsd.org>
Sun, 13 Jan 2008 18:21:50 +0000 (18:21 +0000)
commitd4680f3d9dff640c51b96e7c2ad63ad7c0ada843
tree1932e9f5904e271e6f510eb0a00d92cd5b2ef1ea
parent241a69f53574c6ce3bdaa97fca38c9eb27fcdd15
Add a new tool to convert FreeBSD USB device IDs to the format we use
in DragonFly.  This eases the process of getting new IDs from FreeBSD, which
is currently necessary due to the fact that their lists are much longer
than our lists :)

To use the tool you need the usbdevs file from FreeBSD:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/usbdevs

usage: ./convert_usb_ids.sh [-d] < FREEBSD-IDs > DFLY-IDs

The tool operates in two modi.  The first one is for umass entries and
converts entries like this

  { USB_VENDOR_ADDONICS2, USB_PRODUCT_ADDONICS2_CABLE_205, RID_WILDCARD,
  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
  NO_QUIRKS
  },

to

  /* Addonics Cable 205  */
  { .vendor = 0x0bf6, .product = 0xa001, release = WILDCARD_ID,
    .proto  = UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
    .quirks = NO_QUIRKS
  },

Pass -d option to use umass modi.  The second one converts easier
entries:

  {{ USB_VENDOR_ACEECA, USB_PRODUCT_ACEECA_MEZ1000 }, PALM4 },

to

  {{ USB_DEVICE(0x4766, 0x0001) }, PALM4 }, /* Aceeca MEZ1000 RDA  */

NOTE:  Due to some peculiarities of the usbdevs file, it is possible that you
can get duplicate entries or wrong comments.  So make sure that your converted
entry is correct.
tools/tools/README
tools/tools/convert_usb_ids/convert_usb_ids.sh [new file with mode: 0644]