Repository navigation
Conversation
On macOS the SDP/SDPS boot ROM HID interface is owned by the IOHIDFamily kernel driver. libusb can only detach it by re-enumerating the device with capture, which requires root, so uuu fails with "detach kernel driver failure (-3)" (or LIBUSB_ERROR_ACCESS on claim) unless run with sudo. On macOS, let HIDTrans talk to the device through hidapi, which goes through IOHIDFamily and needs no extra privileges. libusb is still used for enumeration; the matching HID device is selected by its USB location ID. Stale input reports are flushed on open and reads skip reports with an unexpected ID. Linux and Windows are unchanged. Add hidapi as a macOS dependency for uuu, libuuu, the Python wrapper (vcpkg) and the macOS CI workflow, and update the README. Tested without sudo on MIMXRT1060-EVK (SDP write/rdmem) and i.MX93 (SDPS boot of a signed U-Boot) with both uuu and the Python wrapper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Marek Vitula <marek.vitula@nxp.com>
Contributor
|
The key problem is that hidapi block -m options and mult-boards support. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On macOS, downloading to i.MX/RT boards in SDP/SDPS mode needs
sudo; otherwise uuu (and the Pythonlibuuuwrapper) fails with:The boot ROM HID interface is owned by the IOHIDFamily kernel driver. libusb can only detach it on Darwin by re-enumerating the device with capture, which requires root. Skipping the detach only moves the failure to
libusb_claim_interface(LIBUSB_ERROR_ACCESS).Change
__APPLE__,HIDTransuses hidapi (IOHIDFamily, no extra privileges) for open/read/write/close. libusb is still used for enumeration; the matching HID device is selected by its USB location ID.libuuu/uuuCMake (pkg-config), Python wrapper (CMake + vcpkgosxplatform), macOS CI workflow, README.Testing (macOS arm64, no sudo)
SDP: write192 KB ×3 +rdmemread-back, uuu CLISDPS: bootof signed U-Boot, uuu CLIdetach kernel driver failure (-3)The wrapper was built manually against Homebrew libraries; the vcpkg wrapper build has not been run locally.
🤖 Generated with Claude Code