rtl826x-firmware: ship rtl8261n and rtl8264b in single firmware package

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>
This commit is contained in:
Sven Eckelmann authored and Jonas Jelonek committed 2026-07-01 00:13:59 +02:00
1 parent 21f3bf350d
commit 4abe97b2bc
5 files changed
+22 -32

No files matched your search

+12 -22
View 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))
+1 -1
View 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
+2 -2
View 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
+1 -1
View 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
+6 -6
View 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