How to get USB gadget ethenet working?


We followed the instruction : Debian: Getting Started with the BeagleBone Black - Linux Guides - Engineering and Component Solution Forum - TechForum │ Digi-Key

and have uboot and kernel as well.

Everything looks working except for USB0 ethernet.

Anyone know how to fix this issue?

if we overwrite uboot and kernel and modules only, still use rootfs then USB0 work. Mean config in kernel should be OK.
But if we use custom debian rootfs as the instruction then USB0 doesn’t work (ethernet PHY still work).


Hi @caccac268 out of the box, that custom image doesn’t have the usb-gadget enabled by default…

Just configure it with:

sudo apt update
sudo apt install bb-usb-gadgets
sudo systemctl enable bb-usb-gadgets.service
sudo systemctl enable systemd-networkd.service
sudo reboot


1 Like

Thank Robert for quick reply

We tried your suggestion, and another issue that we couldn’t update.
We are using kernel 4.19.94-ti-r72 which is very close to official Buster release 4.19.94-ti-r42.


Hi @caccac268

So Bullseye threw us a curve ball, i’ve been fixing images, but some still exist out there without… systemd-timesyncd got spun out of systemd package by default… So these image have a broken clock on bootup… Fixed going forward, but current users:

Since date is off just run:

sudo date --utc --set='2022-04-15 18:35'
sudo apt update
sudo apt install systemd-timesyncd

To get it into the ball park…

Hi Robert,

I went home and try again, and it works awesome. I am not sure I did something wrong or you just fixed the issue, because I see rootfs has been updated to 2022.04.15 (today).

Anyway, it works perfect. Thanks a lot.

I am starting beaglebone and have few more questions but I think I should make a new topic. This topic is resolved.

Yeah, just updated it after your message this morning…


Hi Robert again,

We followed buildroot’s instructions and success to build uboot, kernel and rootfs that boot on beaglebone. It is small and around 5 seconds and this is our goal.

The thing is, this image has nothing. We need:

  • USB Ethernet,
  • PHY Network,
  • sudo command
  • apt or apt-get command.

We followed your instruction and got an image as you knew yesterday. This image has more than what we need.

Next step is, we need to mix these images. I mean:

  • a) Add configs to buildroot to get Ethernet, USB gadget, sudo, apt-get…
  • b) Or remove some config from your image that we don’t need.

Either way, we need to know what config should be add (a) or remove (b).

We know there are some config like: USB_GADGET, USB_ETH…
But look like not enough.

Could you please tell us what config should be set to have these features like your image? And what modules / drivers needed for these config?

When build buildroot, we enabled some configs and sometime PC detected BBB as CDC- virtual comport, sometime USB masstorage while we wanted USB network :)).

This will be long answer so if you can help step by step, that will be awesome. But if not, please give us a hint.

Also, we run ./ Frist time took 45 mins. Second time also 15-20 mins.

Is there anyway to run “make -linux-menuconfig” and only re-build what we changed?

We would like to customize the build for smaller and faster, and keep only ethernet, usb, apt-get, sudo.

Thank you so much!

It’s in the readme…


Edit, if you want a faster boot, on the “ti” kernel disable SMP, not needed on the AM335x, or just swap to the bone v5.10.x/v5.15.x branch…


Thank Robert,

./tool/ is what we were looking for.

About fast boot:

I just tried both, disable SMP (ti - 4.19.x) and bone 5.15.x, it is still ~25 seconds from hitting reset to login prompt, same as when no changed.

Any other hint?

Hi Robert,

Can you please share to me how we change the config?

Example I would like toy change CONFIG_SOUND=y to “# CONFIG_SOUND is not set”.

I see ${config} is omap2plus_defconfig, so I temporary change over there and use ./tool/ The output doesn’t get any change, it is still “CONFIG_SOUND=y”

when I do ./, look it will overwrite my value back to original file.

I hardcode ${config} to my new file config, change value, but it still pick the config file somewhere to build.

in, I event disable “make… oldconfig” and “make … menuconfig” to prevent generate new .config file, only keep something like:
“make… distclean”
“make … custom_defconfig”

But it still doesn’t use the config in custom_defconfig file. Build is OK, no error. Just config doesn’t get change.


Sorry, omap2plus_defconfig is just a reference config… The actual config used during the build is “./patches/defconfig”…

“./” always resets the KERNEL directory back to what and defconfig have set…

1: run ./ to setup the tree
2: change CONFIG_SOUND=y → # CONFIG_SOUND is not set when menuconfig pops up…

If you start applying patches or tweaking the config, just run:

./tools/ as that will rebuild the “./KERNEL” directory in it’s current state…


Yes, spent 2 days weekend and get more understand about those scripts and can change value just fine.

After removed some config that we don’t use, and disable some service, we get boot time from 30sec to 15 seconds.

We are trying to looking more if something that can help boot faster. We need 10 seconds, now 15 seconds, closer.

If you have any idea, please share to us :))

We only need to keep two thing : “USB0 ethernet, SSH”