2018-12-04 21:00:54

by Michael Opdenacker

[permalink] [raw]
Subject: [PATCH] ARM: omap2plus_defconfig: add networking over USB device

This adds support for networking over USB device,
which allows boards such as the BeagleBoneBlack Wireless and
Pocket Beagle to boot on an NFS root filesystem. Such boards
have no Ethernet port.

This is for consistency with CONFIG_ROOT_NFS=y
which makes no sense if there is no networking.

Tested on BeagleBoneBlack Wireless and BeagleBoneBlack

Signed-off-by: Michael Opdenacker <[email protected]>
---
arch/arm/configs/omap2plus_defconfig | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 6491419b1dad..7e8a8ed028fd 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -403,11 +403,11 @@ CONFIG_USB_EHCI_HCD=m
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_ACM=m
CONFIG_USB_STORAGE=m
-CONFIG_USB_MUSB_HDRC=m
-CONFIG_USB_MUSB_TUSB6010=m
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_TUSB6010=y
CONFIG_USB_MUSB_OMAP2PLUS=m
CONFIG_USB_MUSB_AM35X=m
-CONFIG_USB_MUSB_DSPS=m
+CONFIG_USB_MUSB_DSPS=y
CONFIG_USB_INVENTRA_DMA=y
CONFIG_USB_TI_CPPI41_DMA=y
CONFIG_USB_TUSB_OMAP_DMA=y
@@ -418,10 +418,10 @@ CONFIG_USB_SERIAL_SIMPLE=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_PL2303=m
CONFIG_USB_TEST=m
-CONFIG_NOP_USB_XCEIV=m
-CONFIG_AM335X_PHY_USB=m
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_AM335X_PHY_USB=y
CONFIG_TWL6030_USB=m
-CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DEBUG=y
CONFIG_USB_GADGET_DEBUG_FILES=y
CONFIG_USB_GADGET_DEBUG_FS=y
@@ -442,6 +442,7 @@ CONFIG_USB_CONFIGFS_F_UAC1=y
CONFIG_USB_CONFIGFS_F_UAC2=y
CONFIG_USB_CONFIGFS_F_MIDI=y
CONFIG_USB_CONFIGFS_F_HID=y
+CONFIG_USB_ETH=y
CONFIG_USB_ZERO=m
CONFIG_USB_G_NOKIA=m
CONFIG_MMC=y
--
2.17.1



2018-12-04 21:53:46

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH] ARM: omap2plus_defconfig: add networking over USB device

Hi,

* Michael Opdenacker <[email protected]> [181204 12:59]:
> This adds support for networking over USB device,
> which allows boards such as the BeagleBoneBlack Wireless and
> Pocket Beagle to boot on an NFS root filesystem. Such boards
> have no Ethernet port.
>
> This is for consistency with CONFIG_ROOT_NFS=y
> which makes no sense if there is no networking.

Hmm well this has few issues though:

1. We've had USB as loadable modules for years now to
cut down on bloat and try to make things more
distro friendly

2. MUSB has never worked well with PM and enabling
it almost certainly would break PM for multiple
devices

3. The USB gadget configuration should be done using
configfs as it's device and policy specific and
Ethernet gadget may not be even desirable

So I suggest just doing what distros do and use a proper
initramfs :)

BTW what works quite nicely for devices with Ethernet
controller is to have u-boot load dtb, kernel and
modules.tar.gz over Ethernet and write it to mmc. That
way the loaded kernel and modules are available on
boot as long as some init script untars modules.tar.gz
first thing when init starts.

Regards,

Tony