From 3157cc2876e70d52b9377bd977e6110585bdacc9 Mon Sep 17 00:00:00 2001 From: Daniel Maslowski Date: Thu, 14 Sep 2023 16:05:14 +0200 Subject: [PATCH] README: add instruction for USB ethernet gadget Signed-off-by: Daniel Maslowski --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index ede88cf3..10c25f8a 100644 --- a/README.md +++ b/README.md @@ -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.