aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2018-02-10 19:06:56 +0100
committerZoltan HERPAI <wigyori@uid0.hu>2018-02-11 14:39:18 +0100
commit8fb34763453d305365947bfca9766bf8a7150d2c (patch)
tree64ac1bec38bef43a0e86426a6f207f4dedb9e638
parentd3da2fcb8b93387d844eb2a47542154383857dd5 (diff)
downloadupstream-8fb34763453d305365947bfca9766bf8a7150d2c.tar.gz
upstream-8fb34763453d305365947bfca9766bf8a7150d2c.tar.bz2
upstream-8fb34763453d305365947bfca9766bf8a7150d2c.zip
firmware: add microcode package for AMD
Use the Debian repository for sourcing the ucode files. Current (20171205) includes support for fam17h CPUs already. The microcodes will be updated from preinit via a common script - that's the earliest place where we can do it. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
-rw-r--r--package/firmware/amd64-microcode/Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile
new file mode 100644
index 0000000000..e88b02950f
--- /dev/null
+++ b/package/firmware/amd64-microcode/Makefile
@@ -0,0 +1,45 @@
+#
+# 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:=20171205
+PKG_RELEASE:=1
+
+PKG_SOURCE:=amd64-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
+PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/a/amd64-microcode/
+PKG_HASH:=a38bc072f535a3d3c1bf4e9e545197aa5114e979e94ef7e4a67e615df2f853a7
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
+
+PKG_LICENSE_FILE:=LICENSE.amd-ucode
+
+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))