linux-firmware: amd: consolidate amd's linux-firmware entries
authorChristian Lamparter <chunkeey@gmail.com>
Sun, 19 Dec 2021 12:51:41 +0000 (13:51 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Mon, 27 Dec 2021 12:51:41 +0000 (13:51 +0100)
this patch consolidates the amd64-microcode
(moved to linux-firmware.git, previously this was an extra
debian source package download), amdgpu and radeon firmwares
into a shared "amd" makefile.

With the upcoming 20211216 linux-firmware bump,
this will include a microcode update for ZEN 3 CPUs.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
package/firmware/amd64-microcode/Makefile [deleted file]
package/firmware/linux-firmware/amd.mk [new file with mode: 0644]
package/firmware/linux-firmware/amdgpu.mk [deleted file]
package/firmware/linux-firmware/radeon.mk [deleted file]

diff --git a/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile
deleted file mode 100644 (file)
index 4444883..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=amd64-microcode
-PKG_VERSION:=20191218
-PKG_RELEASE:=1
-
-PKG_SOURCE:=amd64-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
-PKG_SOURCE_URL:=@DEBIAN/pool/non-free/a/amd64-microcode/
-PKG_HASH:=f469b79348097c5f04641b67a39d0ee5a2a1916c9556281626c04f2275d4132d
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
-
-PKG_LICENSE_FILE:=LICENSE.amd-ucode
-
-PKG_FLAGS:=nonshared
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/amd64-microcode
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  URL:=$(PKG_SOURCE_URL)
-  DEPENDS:=@TARGET_x86
-  TITLE:=AMD64 CPU microcode
-endef
-
-define Build/Prepare
-       rm -rf $(PKG_BUILD_DIR)
-       mkdir -p $(PKG_BUILD_DIR)
-       $(TAR) -C $(BUILD_DIR) -xJf $(DL_DIR)/$(PKG_SOURCE)
-endef
-
-define Build/Compile
-endef
-
-define Package/amd64-microcode/install
-       $(INSTALL_DIR) $(1)/lib/firmware/amd-ucode
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/*.bin $(1)/lib/firmware/amd-ucode
-endef
-
-$(eval $(call BuildPackage,amd64-microcode))
diff --git a/package/firmware/linux-firmware/amd.mk b/package/firmware/linux-firmware/amd.mk
new file mode 100644 (file)
index 0000000..68b305e
--- /dev/null
@@ -0,0 +1,29 @@
+Package/amd64-microcode = $(call Package/firmware-default,AMD64 CPU microcode,@TARGET_x86)
+define Package/amd64-microcode/install
+       $(INSTALL_DIR) $(1)/lib/firmware/amd-ucode
+       $(CP) \
+               $(PKG_BUILD_DIR)/amd-ucode/*.bin \
+               $(1)/lib/firmware/amd-ucode
+endef
+
+$(eval $(call BuildPackage,amd64-microcode))
+
+Package/amdgpu-firmware = $(call Package/firmware-default,AMDGPU Video Driver firmware)
+define Package/amdgpu-firmware/install
+       $(INSTALL_DIR) $(1)/lib/firmware/amdgpu
+       $(CP) \
+               $(PKG_BUILD_DIR)/amdgpu/*.bin \
+               $(1)/lib/firmware/amdgpu
+endef
+
+$(eval $(call BuildPackage,amdgpu-firmware))
+
+Package/radeon-firmware = $(call Package/firmware-default,Radeon Video Driver firmware)
+define Package/radeon-firmware/install
+       $(INSTALL_DIR) $(1)/lib/firmware/radeon
+       $(CP) \
+               $(PKG_BUILD_DIR)/radeon/*.bin \
+               $(1)/lib/firmware/radeon
+endef
+
+$(eval $(call BuildPackage,radeon-firmware))
diff --git a/package/firmware/linux-firmware/amdgpu.mk b/package/firmware/linux-firmware/amdgpu.mk
deleted file mode 100644 (file)
index 89f11e7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Package/amdgpu-firmware = $(call Package/firmware-default,AMDGPU Video Driver firmware)
-define Package/amdgpu-firmware/install
-       $(INSTALL_DIR) $(1)/lib/firmware/amdgpu
-       $(CP) \
-               $(PKG_BUILD_DIR)/amdgpu/*.bin \
-               $(1)/lib/firmware/amdgpu
-endef
-
-$(eval $(call BuildPackage,amdgpu-firmware))
diff --git a/package/firmware/linux-firmware/radeon.mk b/package/firmware/linux-firmware/radeon.mk
deleted file mode 100644 (file)
index b750efb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Package/radeon-firmware = $(call Package/firmware-default,Radeon Video Driver firmware)
-define Package/radeon-firmware/install
-       $(INSTALL_DIR) $(1)/lib/firmware/radeon
-       $(CP) \
-               $(PKG_BUILD_DIR)/radeon/*.bin \
-               $(1)/lib/firmware/radeon
-endef
-
-$(eval $(call BuildPackage,radeon-firmware))