-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to ConfigFS for USB Gadgets #62
Conversation
This is really neat I am pretty excited to the config fs stuff. |
Here is the one that failed https://github.com/nerves-project/nerves_system_rpi0/blob/master/test/priv/test/test_test.exs#L13-L15 |
I forgot to mention that the reason I left some
|
668870d
to
fb7e9d1
Compare
So here's my proposal for interoperability with this new system:
|
The error message someone would get looks something like this: $ mix deps.get
Resolving Hex dependencies...
Failed to use "nerves_init_gadget" (version 0.4.0) because
/Users/gmefford/projects/nerves/nerves_system_rpi0/mix.exs requires >= 0.4.1
mix.exs specifies ~> 0.4.0
** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, "~> 1.0", override: true} |
5023e6a
to
b9d57ef
Compare
b9d57ef
to
cc34cfa
Compare
I've updated this PR to add the When compiling it directly into the kernel like we have been in the past, there's not any way I could find to unload it if you want to configure a different device using |
Changes from linux-4.14.defconfig help me to emulate keyboard USB gadget. First need to remove g_cdc module if is enable Create device with https://github.com/nerves-project/usb_gadget 'a' and 'A' @device "/dev/hidg0" Note: |
This is the first step to better support for USB Gadget devices on Windows. I'm working on an additional PR to
nerves_init_gadget
and also new library (usb_gadget
) that will make use of these ConfigFS-based USB Gadget devices.The thing is that, if we stop compiling in a gadget device in BuildRoot, the system by itself won’t have a
/dev/ttyGS0
interface anymore, so I’m questioning whether it should be the default console when it would that you either usenerves_init_gadget
or configure your own withusb_gadget
for it to exist. I’m fine with that because I think most people will end up wanting that, but thought it was worth bringing up, since it's a breaking change for people who are currently using the compiled-in gadget serial device.The reason to include
CONFIG_BONDING=y
is so that we can set up a bonded NIC between the RNDIS and ECM Ethernet devices. This allows us to present both devices to the host device, but set one as the primary and one as the fail-over on the Nerves device side. This way, when you plug into a Windows host, only the RNDIS interface comes up, whereas on Linux, they both come up but only the ECM is active because it's primary. On OSX (by default), it doesn't have RNDIS drivers installed, so it only brings up the ECM interface. If someone has installed RNDIS drivers on OSX, it just behaves like Linux, bringing up both interfaces, with with the RNDIS one in a "failed" state because the Nerves device has it disabled while the ECM one is connected.Related to #29
Related to #45
Related to #46
Related to nerves-project/nerves_runtime#58