| Up to higher level directory | |||
| Name | Date | Size | |
|---|---|---|---|
| amd64/ | 10-Nov-2009 | ||
| common/ | 10-Nov-2009 | ||
| doc/ | 10-Nov-2009 | ||
| i386/ | 10-Nov-2009 | ||
| inc/ | 10-Nov-2009 | ||
| install-libusb | 10-Nov-2009 | 2.4K | |
| libusb-config | 10-Nov-2009 | 1.2K | |
| Makefile.com | 10-Nov-2009 | 1.6K | |
| Makefile.sfw | 10-Nov-2009 | 1.4K | |
| METADATA | 10-Nov-2009 | 565 | |
| README | 10-Nov-2009 | 5.2K | |
| sparc/ | 10-Nov-2009 | ||
| sparcv9/ | 10-Nov-2009 | ||
1 # 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 # Copyright 2004 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 # pragma ident "@(#)README 1.4 06/03/18 SMI" 26 # 27 28 To Build: make -f Makefile.sfw 29 30 31 ------------ 32 Bugid#: 5010373: 33 Need libusb library implementation in s10 freeware gate 34 35 Plugin Notes: 36 --------------- 37 38 - Plugins implement the usb interfaces 39 For interfaces that are not supported return ENOTSUP 40 41 - Implement bus / device support locally. 42 Wrapper is responsible for presenting a unified global view 43 44 - There are two ways that interfaces can be handled. 45 Either use the same symbol names as the usb.h interfaces 46 or use a prefixed symbol 47 Eg. usb_init 48 ut_usb_init where the prefix is ut_ 49 The prefix info is read by the wrapper using a libusb_prefix 50 symbol. This variable needs to be initialized by the plugin. 51 52 - If prefixed symbol is not being used please use the 53 -B direct flag to ensure that symbol collision does not 54 take place. i.e usb_xx symbol of the plugin does not collide 55 with the usb_xx of the wrapper 56 57 - All plugin errors are simply passed up by the wrapper to the app. 58 59 - wrapper makes use of the following and these need to be implemented 60 by the plugins 61 - libusb_prefix 62 - libusb_version 63 - libusb_init 64 - libusb_fini 65 66 libusb_prefix: 67 discussed earlier 68 69 libusb_version: 70 will be a const char * and initialzied by the 71 plugin to following the ON library/module format of major 72 # / minor #. So we will start with 1.1. Note that this has 73 nothing to do with the libusb API version. The libusb 74 API being implemented will occur in only two places. 75 The version of the library will be reflected in the mapfiles 76 of the wrapper and the plugin libraries. 77 78 - DESC string of the package for the plugin 79 - libusb-config file shipped with the wrapper 80 81 Other than this the versioning of the wrapper and the packages 82 and the versioning of the plugins will following the ON model. 83 For minor changes to the interface 1.x -> 1.y. For interface 84 changes that are not backward compatible (eg libusb 1.0) the 85 versioning wil be changed to 2.x to reflect this. 86 87 libusb_init: 88 Return values are as follows: 89 SUCCESS - 0 90 FAILURE - -1 91 PLUGIN_EXCLUSIVE -2 92 (Note: initial ARC case only specified the 0 and -1) 93 The plugin exclusive will need to be added as closed fast 94 track approved. 95 96 PLUGIN_EXCLUSIVE is used to indicate to the wrapper that this 97 plugin desires exclusive use and no other bus support will be 98 visible to the application. This is a user settable feature 99 and plugins can return SUCCESS/PLUGIN_EXCLUSIVE depending 100 upon the environment. 101 102 libusb_fini: 103 called by the wrapper when a plugin is unloaded. 104 wrapper will not check the return values for this 105 106 wrapper notes: 107 ---------------- 108 109 wrapper is responsibe for the following: 110 111 - loading the plugins 112 - supporting alternate load dirs 113 - loading all the plugin symbols 114 - passing app calls to plugin calls. 115 116 The wrapper is also responsible for the following: 117 118 - if multiple plugins are loaded and they are all active 119 then link up a busses pointer for each plugin to give the 120 app a unified view of the busses and the devices hanging off 121 of these busses. 122 This is done by the wrapper when the usb_find_busess is called 123 by the app and the wrapper makes successive find_busses calls 124 into each plugin 125 126 - The wrapper needs to be able to map a function call to the 127 correct plugin. For this reason it maintains a list of 128 device handles for each plugin. When an app makes a call 129 and passes in the usb_dev_handle call the wrapper searches its 130 list of open device handles and finds the matching plugin to 131 use. For this reason add and delete of device handles is implemented 132 in the wrapper. 133 134 - usb_strerror() - since we cannot tell which plugins error 135 should be returned. not good to return all so we keep track 136 of the last plugin that was called and return the strerror 137 for the plugin. 138 139 140 Building the library: 141 Since we are in the sfw gate the recommended approach 142 of ON library builds is not possible. One of the big departures 143 is the use of mapfiles as opposed to spec files since there is 144 no support for spec files in sfw gate. The approach taken 145 is to use the sfw gate model of doing the top level builds 146 (Makefile.sfw and installs) and using the ON model of doing 147 the platforms specific builds (Makefile.com and sparc/Makefile ..) 148 ON flags and environments are used for this. 149 No support for lint and msg are provided in this build 150 packaging follows the SFW gate model of packages 151