intel-microcode: create early load microcode image
[openwrt/.git] / package / firmware / intel-microcode / Makefile
index b5ebddd7b922b07b8189d76bd5725da1f9e0bbbf..4bd47b087aa6a7a8c33450ae303ca5e1f3c8b4fc 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=intel-microcode
-PKG_VERSION:=20170707
-PKG_RELEASE:=1~deb9u1
+PKG_VERSION:=20180807a
+PKG_RELEASE:=1
 
 PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/i/intel-microcode/
-PKG_HASH:=6e288b687077cbb678c90a1c2ab0cfba43ee46e8645dc3791884278f6453e927
+PKG_HASH:=1a7cb96d5c6a4abac2936236223d9bea79d7442dc1cfe9b712ff8e35374f0f9f
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
 
 PKG_BUILD_DEPENDS:=iucode-tool/host
@@ -30,20 +30,22 @@ define Package/intel-microcode
   SECTION:=firmware
   CATEGORY:=Firmware
   URL:=$(PKG_SOURCE_URL)
-  DEPENDS:=@TARGET_x86 +iucode-tool
+  DEPENDS:=@TARGET_x86
   TITLE:=Intel x86 CPU microcode
 endef
 
 define Build/Compile
-       IUCODE_TOOL=$(STAGING_DIR)/../host/bin/iucode_tool $(MAKE) -C $(PKG_BUILD_DIR)
-       mkdir $(PKG_BUILD_DIR)/intel-ucode
-       $(STAGING_DIR)/../host/bin/iucode_tool -q \
-               --write-firmware=$(PKG_BUILD_DIR)/intel-ucode $(PKG_BUILD_DIR)/$(MICROCODE).bin
+       IUCODE_TOOL=$(STAGING_DIR)/../host/bin/iucode_tool \
+               $(MAKE) -C $(PKG_BUILD_DIR)
+       $(STAGING_DIR)/../host/bin/iucode_tool -q --mini-earlyfw \
+               --write-earlyfw=$(PKG_BUILD_DIR)/intel-ucode.cpio \
+               $(PKG_BUILD_DIR)/$(MICROCODE).bin
 endef
 
 define Package/intel-microcode/install
-       $(INSTALL_DIR) $(1)/lib/firmware/intel-ucode
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/intel-ucode/* $(1)/lib/firmware/intel-ucode
+       $(INSTALL_DIR) $(1)/boot
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/intel-ucode.cpio \
+               $(1)/boot/intel-ucode.img
 endef
 
 $(eval $(call BuildPackage,intel-microcode))