Skip to content

Commit

Permalink
README: add instruction for USB ethernet gadget
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Maslowski <[email protected]>
  • Loading branch information
orangecms committed Sep 14, 2023
1 parent 8962908 commit 3157cc2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,22 @@ machine.
We can use the same trick to cpu to Linux from OSX, but instead of having an Arm tree under `pwd`
we'll need a Linux binary tree to pick binaries from.

### cpu over USB

There are many IoT like devices that do not have an ethernet port.
Fear not though: The Linux USB gadget drivers offer ethernet via USB!

There are [tutorials out
there](https://linuxlink.timesys.com/docs/wiki/engineering/HOWTO_Use_USB_Gadget_Ethernet), and here is the gist:

- enable the Linux kernel options
* `CONFIG_USB_GADGET`
* `CONFIG_USB_ETH`
* `CONFIG_USB_ETH_RNDIS` (for Windows support)
* `CONFIG_INET`
- add the MAC addresses for your gadget device and the machine you connect to in
the kernel `CMDLINE`, e.g., `g_ether.dev_addr=12:34:56:78:9a:bc g_ether.host_addr=12:34:56:78:9a:bd`

## cpu will be familiar to ssh users

As mentioned, cpu looks and feels a lot like ssh, to the point of honoring ssh config files.
Expand Down

0 comments on commit 3157cc2

Please sign in to comment.