linux-firmware: add new package r8152-firmware
authorMarty Jones <mj8263788@gmail.com>
Sat, 10 Jul 2021 08:00:30 +0000 (04:00 -0400)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 7 Jan 2022 23:49:59 +0000 (00:49 +0100)
Linux upstream commit https://github.com/torvalds/linux/commit/9370f2d05a2a150b0aa719a3070b26d478180df3
add load firmware file through request_firmware,this affect the
nanopi r2s and some USB adapters in kernel 5.10 with this error:
'r8152 4-1:1.0: unable to load firmware patch rtl_nic/rtl8153b-2.fw'
This patch split the USB NIC firmware files from r8169 firmware,
and adds r8152-firmware to r8152 driver.
Add kmod-usb-net-cdc-ncm to support RTL8156A and RTL8156B 2.5G ethernet
adapters supported since v5.13-rc1.
https://github.com/torvalds/linux/commit/195aae321c829dd1945900d75561e6aa79cce208

Signed-off-by: Marty Jones <mj8263788@gmail.com>
package/firmware/linux-firmware/realtek.mk
package/kernel/linux/modules/usb.mk

index 081cc1b37c19555620a7bb74645b88b35413a754..c883e8ba597e8026d4e0b504f7de4e133f9be22a 100644 (file)
@@ -1,8 +1,21 @@
+Package/r8152-firmware = $(call Package/firmware-default,RealTek RTL8152 firmware)
+define Package/r8152-firmware/install
+       $(INSTALL_DIR) $(1)/lib/firmware/rtl_nic
+       $(CP) \
+               $(PKG_BUILD_DIR)/rtl_nic/rtl8153* \
+               $(PKG_BUILD_DIR)/rtl_nic/rtl8156* \
+               $(1)/lib/firmware/rtl_nic
+endef
+$(eval $(call BuildPackage,r8152-firmware))
+
 Package/r8169-firmware = $(call Package/firmware-default,RealTek RTL8169 firmware)
 define Package/r8169-firmware/install
        $(INSTALL_DIR) $(1)/lib/firmware/rtl_nic
        $(CP) \
-               $(PKG_BUILD_DIR)/rtl_nic/* \
+               $(PKG_BUILD_DIR)/rtl_nic/rtl810* \
+               $(PKG_BUILD_DIR)/rtl_nic/rtl8125* \
+               $(PKG_BUILD_DIR)/rtl_nic/rtl8168* \
+               $(PKG_BUILD_DIR)/rtl_nic/rtl84* \
                $(1)/lib/firmware/rtl_nic
 endef
 $(eval $(call BuildPackage,r8169-firmware))
index ce7c57bf7391fe92b4e1138f14a764de0bf5de08..8815b153ef50873470c44f7f46fbcedc8f9cba9f 100644 (file)
@@ -1356,6 +1356,7 @@ $(eval $(call KernelPackage,usb-net-rtl8150))
 
 define KernelPackage/usb-net-rtl8152
   TITLE:=Kernel module for USB-to-Ethernet Realtek convertors
+  DEPENDS:=+r8152-firmware +kmod-crypto-sha256 +kmod-usb-net-cdc-ncm
   KCONFIG:=CONFIG_USB_RTL8152
   FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/r8152.ko
   AUTOLOAD:=$(call AutoProbe,r8152)