1
0
mirror of https://github.com/cjdelisle/openwrt.git synced 2025-08-27 23:25:08 +00:00
Files
openwrt/package/firmware/lantiq/lantiq-gphy-firmware/Makefile
Aleksander Jan Bajkowski a18d95f35b lantiq-gphy-firmware: add package
This has several advantages:
* reduction in the size of the kernel and the complete image. Individual
devices only need two of the four binaries. In combination with the second
commit it reduces kernel size by 64.2 kB and image size by 22.8 kB,
* the option to extend this package with firmware for future SoCs,
* combining the kernel and binary blobs with another licence may not be
fully compatible with the licence used by Linux. The current PHY firmware
is built into the kernel. This comit converts it to a package.

Tested on AVM 5490 and BT Home Hub 5A.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/17669
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:52:40 +01:00

79 lines
2.5 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
include $(TOPDIR)/rules.mk
PKG_NAME:=lantiq-gphy-firmware
PKG_RELEASE:=1
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define Package/lantiq-gphy-firmware-defaults
SECTION:=firmware
CATEGORY:=Firmware
DEPENDS:=@TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy
DEFAULT:=n
TITLE:=$(1)
endef
define Package/lantiq-gphy-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/lantiq
$(INSTALL_DATA) files/$(2) $(1)/lib/firmware/lantiq/$(3)
endef
define Package/xrx200-rev1.1-phy11g-firmware
$(call Package/lantiq-gphy-firmware-defaults, xRx200 rev 1.1 Gigabit Ethernet PHY Firmware)
endef
define Package/xrx200-rev1.1-phy11g-firmware/description
This package contains firmware for Gigabit Ethernet PHY integrated in xRx200 rev 1.1 SoC.
endef
define Package/xrx200-rev1.1-phy11g-firmware/install
$(call Package/lantiq-gphy-firmware/install,$(1),xrx200_phy11g_a14.bin,xrx200_phy11g_a14.bin)
endef
define Package/xrx200-rev1.2-phy11g-firmware
$(call Package/lantiq-gphy-firmware-defaults, xRx200 rev 1.2 Gigabit Ethernet PHY Firmware)
endef
define Package/xrx200-rev1.2-phy11g-firmware/description
This package contains firmware for Gigabit Ethernet PHY integrated in xRx200 rev 1.2 SoC.
endef
define Package/xrx200-rev1.2-phy11g-firmware/install
$(call Package/lantiq-gphy-firmware/install,$(1),xrx200_phy11g_a22.bin,xrx200_phy11g_a22.bin)
endef
define Package/xrx200-rev1.1-phy22f-firmware
$(call Package/lantiq-gphy-firmware-defaults, xRx200 rev 1.1 Fast Ethernet PHY Firmware)
endef
define Package/xrx200-rev1.1-phy22f-firmware/description
This package contains firmware for Fast Ethernet PHY integrated in xRx200 rev 1.1 SoC.
endef
define Package/xrx200-rev1.1-phy22f-firmware/install
$(call Package/lantiq-gphy-firmware/install,$(1),xrx200_phy22f_a14.bin,xrx200_phy22f_a14.bin)
endef
define Package/xrx200-rev1.2-phy22f-firmware
$(call Package/lantiq-gphy-firmware-defaults, xRx200 rev 1.2 Fast Ethernet PHY Firmware)
endef
define Package/xrx200-rev1.2-phy22f-firmware/description
This package contains firmware for Fast Ethernet PHY integrated in xRx200 rev 1.2 SoC.
endef
define Package/xrx200-rev1.2-phy22f-firmware/install
$(call Package/lantiq-gphy-firmware/install,$(1),xrx200_phy22f_a22.bin,xrx200_phy22f_a22.bin)
endef
define Build/Compile
endef
$(eval $(call BuildPackage,xrx200-rev1.1-phy11g-firmware))
$(eval $(call BuildPackage,xrx200-rev1.2-phy11g-firmware))
$(eval $(call BuildPackage,xrx200-rev1.1-phy22f-firmware))
$(eval $(call BuildPackage,xrx200-rev1.2-phy22f-firmware))