From: Xiaofan C. <xia...@gm...> - 2014-03-30 07:46:34
|
The following sentence may need some modification for Mac OS X 10.9 users. "If you use an FTDI-based adapter and have the FTDI kext installed, you will need to unload it prior to using OpenOCD: sudo kextunload FTDIUSBSerialDriver.kext" Ref: Technical Note TN2315 Introducing the Apple AppleUSBFTDI kernel driver https://developer.apple.com/library/mac/technotes/tn2315/_index.html So the kernel kext can come from FTDI or Apple (10.9 or later). Maybe the following changes are good to have. "If you use an FTDI-based adapter and have the FTDI or Apple kext installed, you will need to unload the kext prior to using OpenOCD: For FTDI kext sudo kextunload FTDIUSBSerialDriver.kext For Apple kext ( Mac OS X 10.9 or later) sudo kextunload -b com.apple.driver.AppleUSBFTDI" A codeless kext may not be as easy as before under Mac OS X 10.9. Please refer to the above mentioned Apple Technical Note. " Under OS X Mavericks, the official location for third party Extension files, is in/Library/Extensions/. OS X Mavericks requires that the kext be signed using a special Developer ID. See the readme file for instructions on requesting this special Developer ID." This is a problem for libusb and libusb based application when there is already an Apple provided kernel driver. -- Xiaofan |
From: Paul F. <fer...@gm...> - 2014-03-30 07:54:44
|
On Sun, Mar 30, 2014 at 03:46:27PM +0800, Xiaofan Chen wrote: > This is a problem for libusb and libusb based application when > there is already an Apple provided kernel driver. On Linux libusb is able to "unbind" the kernel driver from the device on its own. Is it absolutely out of scope for the OS X implementation? What's the official Apple opinion about that? The way you propose sounds sort of messy, as cumbersome as those silly tricks that windows users have to resort to. Of course some modifications to README.OSX will be made regardless of the discussion result, thank you for paying attention to that! -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fer...@gm... |
From: Xiaofan C. <xia...@gm...> - 2014-03-30 08:49:34
|
On Sun, Mar 30, 2014 at 3:54 PM, Paul Fertser <fer...@gm...> wrote: > On Sun, Mar 30, 2014 at 03:46:27PM +0800, Xiaofan Chen wrote: >> This is a problem for libusb and libusb based application when >> there is already an Apple provided kernel driver. > > On Linux libusb is able to "unbind" the kernel driver from the device > on its own. Is it absolutely out of scope for the OS X implementation? > What's the official Apple opinion about that? I think you either use kextunload or better appropriately codeless kext. There is no programming way to unbind the kernel driver. > The way you propose sounds sort of messy, as cumbersome as > those silly tricks that windows users have to resort to. Actually for device without system driver, Mac OS X is quite easy in terms of using libusb. For device with system driver, Mac OS X is actually more difficult in terms of libusb than Windows since you can use Zadig to easily switching drivers under Windows. Luckily there is this HIDAPI which saves a lot of trouble for USB HID device. If not, then it is actually quite difficult to use libusb under Mac OS X for USB HID device. > Of course some modifications to README.OSX will be made > regardless of the discussion result, thank you for paying attention > to that! -- Xiaofan |
From: Paul F. <fer...@gm...> - 2014-03-31 13:25:00
|
Hello Xiofan, Thinking about it a bit more, I have a follow-up comment. On Sun, Mar 30, 2014 at 03:46:27PM +0800, Xiaofan Chen wrote: > A codeless kext may not be as easy as before under Mac OS X 10.9. To avoid mentioning codeless kexts and other obscure topics in README (e.g. I have no clue whatsoever about what that really means, sounds a bit like a windows "inf" file to me), and also since Darwin is an evolving kernel, wouldn't it be best if libusb project provided some official documentation regarding OS X in a clean and well-structured way, and OpenOCD docs would simply link to it? -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fer...@gm... |
From: Xiaofan C. <xia...@gm...> - 2014-03-31 14:14:02
|
On Mon, Mar 31, 2014 at 9:24 PM, Paul Fertser <fer...@gm...> wrote: > Hello Xiofan, > > Thinking about it a bit more, I have a follow-up comment. > > On Sun, Mar 30, 2014 at 03:46:27PM +0800, Xiaofan Chen wrote: >> A codeless kext may not be as easy as before under Mac OS X 10.9. > > To avoid mentioning codeless kexts and other obscure topics in README > (e.g. I have no clue whatsoever about what that really means, sounds a > bit like a windows "inf" file to me), and also since Darwin is an > evolving kernel, wouldn't it be best if libusb project provided some > official documentation regarding OS X in a clean and well-structured > way, and OpenOCD docs would simply link to it? > That is a good idea. I just updated libusb github wiki entry here. https://github.com/libusb/libusb/wiki/FAQ#How_can_I_run_libusb_applications_under_Mac_OS_X_if_there_is_already_a_kernel_extension_installed_for_the_device Suggestions are welcome to make it better. You can link to libusb github Wiki FAQ pages. https://github.com/libusb/libusb/wiki/FAQ -- Xiaofan |
From: Xiaofan C. <xia...@gm...> - 2014-04-01 13:49:51
|
On Mon, Mar 31, 2014 at 10:13 PM, Xiaofan Chen <xia...@gm...> wrote: > On Mon, Mar 31, 2014 at 9:24 PM, Paul Fertser <fer...@gm...> wrote: >> Thinking about it a bit more, I have a follow-up comment. >> To avoid mentioning codeless kexts and other obscure topics in README >> (e.g. I have no clue whatsoever about what that really means, sounds a >> bit like a windows "inf" file to me), and also since Darwin is an >> evolving kernel, wouldn't it be best if libusb project provided some >> official documentation regarding OS X in a clean and well-structured >> way, and OpenOCD docs would simply link to it? >> > > That is a good idea. I just updated libusb github wiki entry here. > https://github.com/libusb/libusb/wiki/FAQ#How_can_I_run_libusb_applications_under_Mac_OS_X_if_there_is_already_a_kernel_extension_installed_for_the_device > > Suggestions are welcome to make it better. You can link to libusb > github Wiki FAQ pages. > https://github.com/libusb/libusb/wiki/FAQ > FYI, I have updated the FAQ after reading an article here. On the other hand, I think this method is more troublesome. So I think there is no need to update README.OSX file again. http://alvarop.com/2014/01/using-busblaster-openocd-on-osx-mavericks/ -- Xiaofan |