没志青年
发布于 2025-09-08 / 15 阅读
0

STM32MP157 - 网卡驱动移植

以太网

STM32MP157 V1.3 使用的是 YT8511

将 motorcomm.c 拷贝到 drivers/net/phy

将 motorcomm_phy.h 拷贝到 include/linux

在 drivers/net/phy/Makefile 文件后最后添加

obj-$(CONFIG_MOTORCOMM_PHY) += motorcomm.o

修改 drivers/net/phy/Kconfig

在 endif # PHYLIB 前添加

config MOTORCOMM_PHY
	tristate "Motorcomm PHYs"
	---help---
		Supports the YT8010, YT8510, YT8511, YT8512 PHYs.

进入图形化配置界面

-> Device Drivers 
   -> Network device support (NETDEVICES [=y]) 
      -> PHY Device support and infrastructure (PHYLIB [=y]) 
          -> <*> Motorcomm PHYs //将 YT8511 驱动编译进内核

WIFI

USB 使用 RTL8188EUS 直接用内核自带的驱动就好了

-> Device Drivers 
  -> Staging drivers (STAGING [=y])
       -> <M> Realtek RTL8188EU Wireless LAN NIC driver
          *  Realtek RTL8188EU AP mode

需要固件

在根文件系统 lib/firmware/rtlwifi 下添加文件 rtl8188wufw.bin

在lib/firmware 下

先insmod cfg8.ko

然后再加载 rt8188.ko

SDIO 使用的是 RTL8723DS,需要手动移植驱动