]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
rtl826x-firmware: ship rtl8261n and rtl8264b in single firmware package 23947/head
authorSven Eckelmann <sven@narfation.org>
Mon, 22 Jun 2026 13:10:38 +0000 (15:10 +0200)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 30 Jun 2026 22:13:59 +0000 (00:13 +0200)
The firmware loading does not depend (solely) on the PHY id. The driver
needs to read out the vendor version id of the PHY before it can decide
which firmware file needs to be loaded.

A split in an RTL8261N and an RTL8264B firmware package is therefore
misleading. And it could even be that a product ships an RTL8264B but
switches the revision of the chip in the middle of its product lifetime. In
this case, the first identification based on the chip ID or the actual chip
ID for the OpenWrt porter might fail for another user with a later/earlier
produced device.

Shipping both files in the same package avoids this problem. Only the "low
power" firmware package is slightly misleading because there is only a
RTL8261N firmware binary for low power but no corresponding RTL8264B
version. It will ship simply the non-low power version for RTL8264B.

Suggested-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/23947
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
package/firmware/rtl826x-firmware/Makefile
target/linux/airoha/image/an7581.mk
target/linux/mediatek/image/filogic.mk
target/linux/qualcommbe/image/ipq95xx.mk
target/linux/realtek/image/rtl930x.mk

index 494677a331e451a9d74c0c76bbf466c7a695db46..8cc54b69f1b461e86848c8c65b9e3b8b70ae23fb 100644 (file)
@@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtl826x-firmware
 PKG_SOURCE_DATE:=2026-01-24
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=https://github.com/balika011/realtek_phy_firmware
 PKG_SOURCE_VERSION:=0cd4abe2b0bf197f75c27088f86a74c7ddb103b4
@@ -30,47 +30,37 @@ define Package/rtl826x-firmware/Default
   PKGARCH:=all
 endef
 
-define Package/rtl8261n-firmware
+define Package/rtl826x-firmware
   $(call Package/rtl826x-firmware/Default)
-  TITLE:=Realtek RTL8251L/RTL8261BE/RTL8261N firmware
+  TITLE:=Realtek RTL8251L/RTL8261BE/RTL8261N/RTL8254B/RTL8264/RTL8264B firmware
   VERSION:=20221115
 endef
 
-define Package/rtl8261n-lp-firmware
+define Package/rtl826x-lp-firmware
   $(call Package/rtl826x-firmware/Default)
-  TITLE:=Realtek RTL8251L/RTL8261BE/RTL8261N low-power firmware
+  TITLE:=Realtek RTL8251L/RTL8261BE/RTL8261N/RTL8254B/RTL8264/RTL8264B low-power firmware
   VERSION:=20240729
-  PROVIDES:=rtl8261n-firmware
-  CONFLICTS:=rtl8261n-firmware
+  PROVIDES:=rtl826x-firmware
+  CONFLICTS:=rtl826x-firmware
 endef
 
-define Package/rtl8264b-firmware
-  $(call Package/rtl826x-firmware/Default)
-  TITLE:=Realtek RTL8254B/RTL8264/RTL8264B firmware
-  VERSION:=20221215
-endef
-
-define Package/rtl8261n-firmware/install
+define Package/rtl826x-firmware/install
        $(INSTALL_DIR) $(1)/lib/firmware
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/rtl8261n.bin \
+               $(PKG_BUILD_DIR)/rtl8264b.bin \
                $(1)/lib/firmware/
 endef
 
-define Package/rtl8261n-lp-firmware/install
+define Package/rtl826x-lp-firmware/install
        $(INSTALL_DIR) $(1)/lib/firmware
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/rtl8261n_lp.bin \
                $(1)/lib/firmware/rtl8261n.bin
-endef
-
-define Package/rtl8264b-firmware/install
-       $(INSTALL_DIR) $(1)/lib/firmware
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/rtl8264b.bin \
                $(1)/lib/firmware/
 endef
 
-$(eval $(call BuildPackage,rtl8261n-firmware))
-$(eval $(call BuildPackage,rtl8261n-lp-firmware))
-$(eval $(call BuildPackage,rtl8264b-firmware))
+$(eval $(call BuildPackage,rtl826x-firmware))
+$(eval $(call BuildPackage,rtl826x-lp-firmware))
index cc94c7de532640758f3581e4a89560faab138197..87ed0e816442daf9e3ad2238add0ff3394945593 100644 (file)
@@ -103,7 +103,7 @@ define Device/gemtek_w1700k-ubi
        the end of flash. A reinstall including corrected chainloader is needed.
   DEVICE_PACKAGES := airoha-en7581-mt7996-npu-firmware fitblk kmod-i2c-an7581 \
                    kmod-hwmon-nct7802 kmod-mt7996-firmware wpad-basic-mbedtls \
-                   rtl8261n-firmware
+                   rtl826x-firmware
   UBINIZE_OPTS := -E 5
   BLOCKSIZE := 128k
   PAGESIZE := 2048
index 27b5d3e1b14e812d8221bbf312e5b26eba67a9ea..3c035290b2a2c8a75cc683345750f60107142025 100644 (file)
@@ -2107,7 +2107,7 @@ define Device/keenetic_kn-1812-common
   DEVICE_DTS_DIR := ../dts
   DEVICE_PACKAGES := kmod-mt7992-firmware kmod-usb3 \
                mt7988-2p5g-phy-firmware mt7988-wo-firmware \
-               kmod-phy-realtek rtl8261n-firmware
+               kmod-phy-realtek rtl826x-firmware
   UBINIZE_OPTS := -E 5
   BLOCKSIZE := 128k
   PAGESIZE := 2048
@@ -3111,7 +3111,7 @@ define Device/tplink_be450
   DEVICE_DTS_DIR := ../dts
   DEVICE_PACKAGES := kmod-mt7992-firmware kmod-usb3 \
            mt7988-2p5g-phy-firmware mt7988-wo-firmware \
-           kmod-phy-realtek rtl8261n-firmware
+           kmod-phy-realtek rtl826x-firmware
   UBINIZE_OPTS := -E 5
   BLOCKSIZE := 128k
   PAGESIZE := 2048
index f2eb8ec114f60d5b07efe74d9d2a186deab8c625..0017ff41a8e0da0b1c8fc9144d3e94941ff079ec 100644 (file)
@@ -9,7 +9,7 @@ define Device/8devices_kiwi-dvk
        SOC := ipq9570
        DEVICE_PACKAGES := kmod-ath12k ath12k-firmware-qcn9274 \
                ipq-wifi-8devices_kiwi f2fsck mkf2fs kmod-sfp \
-               kmod-phy-maxlinear kmod-phy-realtek rtl8261n-firmware
+               kmod-phy-maxlinear kmod-phy-realtek rtl826x-firmware
        IMAGE/factory.bin := qsdk-ipq-factory-nor
 endef
 TARGET_DEVICES += 8devices_kiwi-dvk
index e58020551b44444be5af7ae2d800da13bb9ef639..53f3d32d693fa70fc523a4cf1b6f6ad355726b2b 100644 (file)
@@ -17,7 +17,7 @@ define Device/sirivision_sr-st3408f
   UIMAGE_MAGIC := 0x93000000
   DEVICE_VENDOR := Sirivision
   DEVICE_MODEL := SR-ST3408F
-  DEVICE_PACKAGES := kmod-phy-realtek rtl8261n-firmware
+  DEVICE_PACKAGES := kmod-phy-realtek rtl826x-firmware
   IMAGE_SIZE := 13312k
   $(Device/kernel-lzma)
 endef
@@ -33,7 +33,7 @@ define Device/hasivo_f1100w-4sx-4xgt-common
   DEVICE_ALT1_MODEL := F1100WP-4SX-4XGT
   DEVICE_ALT2_VENDOR := Hasivo
   DEVICE_ALT2_MODEL := F1100WP-4SX-4XGT-SE
-  DEVICE_PACKAGES := kmod-phy-realtek rtl8261n-firmware
+  DEVICE_PACKAGES := kmod-phy-realtek rtl826x-firmware
   IMAGE_SIZE := 29696k
   $(Device/kernel-lzma)
 endef
@@ -57,7 +57,7 @@ define Device/hasivo_s1100w-8xgt-se
   DEVICE_VENDOR := Hasivo
   DEVICE_MODEL := S1100W-8XGT-SE
   IMAGE_SIZE := 12288k
-  DEVICE_PACKAGES := rtl8264b-firmware
+  DEVICE_PACKAGES := rtl826x-firmware
   $(Device/kernel-lzma)
 endef
 TARGET_DEVICES += hasivo_s1100w-8xgt-se
@@ -204,7 +204,7 @@ define Device/xikestor_sks8300-8t
   UIMAGE_MAGIC := 0x93000000
   DEVICE_VENDOR := XikeStor
   DEVICE_MODEL := SKS8300-8T
-  DEVICE_PACKAGES := kmod-hwmon-lm75 rtl8261n-firmware
+  DEVICE_PACKAGES := kmod-hwmon-lm75 rtl826x-firmware
   IMAGE_SIZE := 20480k
   $(Device/kernel-lzma)
   IMAGE/sysupgrade.bin := \
@@ -238,7 +238,7 @@ define Device/xikestor_sks8300-12e2t2x
   UIMAGE_MAGIC := 0x93000000
   DEVICE_VENDOR := XikeStor
   DEVICE_MODEL := SKS8300-12E2T2X
-  DEVICE_PACKAGES := rtl8261n-firmware
+  DEVICE_PACKAGES := rtl826x-firmware
   IMAGE_SIZE := 20480k
   $(Device/kernel-lzma)
   IMAGE/sysupgrade.bin := \
@@ -329,7 +329,7 @@ TARGET_DEVICES += zyxel_xgs1250-12-a1
 define Device/zyxel_xgs1250-12-b1
   $(Device/zyxel_xgs1250-12-common)
   DEVICE_VARIANT := B1
-  DEVICE_PACKAGES += rtl8261n-firmware
+  DEVICE_PACKAGES += rtl826x-firmware
 endef
 TARGET_DEVICES += zyxel_xgs1250-12-b1