cancel
Showing results for 
Search instead for 
Did you mean: 

How to get USB0 Ethernet STM32MP157f-dk2 with buildroot

Dat Tran
Senior II

Hi, the image provided by ST, usb0 ethernet show up as well when try 'ifconfig'.

We would like to try with buildroot.

We pick kernel from ST: linux-5.15-stm32mp-r1.tar.gz

We pick config from ST: en.SOURCES-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15.tar.xz (inside the zip has config-5.15.24.txt file)

Building and boot are success. 

We expected to see "usb_gadget" in folder /sys/kernel/config to run "stm32_usbotg_eth_config.sh". But "usb_gadget" folder doesn't appear.

But we tried:

```

mkdir -p /config

mount -t configfs none /config

```

"usb_gadget" does appear inside /config as well.

So, we change path in script "stm32_usbotg_eth_config.sh", instead of "/sys/kernel/config/usb_gadget" become "/config/usb_gadget".

Script run look fine but all we see just:

[  45.084215] using random self ethernet address

[  45.087218] using random host ethernet address

Anyone know what we are missing or any hint?

And why "usb_gadget" only appears when use mount, instead of default "/sys/kernel/config/usb_gadget"?

Many thanks

Note: libcomposite is builtin module but for sure we also tried cmd:

```

modprobe libcomposite

 ```

2 REPLIES 2
OlivierK
ST Employee

Hi Dat Tran (Community Member) 

Sorry this post is quite old. Did you manage to find a solution to this issue? or maybe in Bootlin community?

https://bootlin.com/blog/building-a-linux-system-for-the-stm32mp1-basic-system/

Dat Tran
Senior II

Hi OlivierK, I got it working very well. Thanks a lot.

By the way, do you know STM32H7 (STM32H743) support usb gadget ethernet?

I see somewhere STM32F7 does, I guess STM32H7 support this feature as well but I am not sure.