intel-microcode: create early load microcode image
authorTomasz Maciej Nowak <tomek_n@o2.pl>
Tue, 20 Nov 2018 16:20:44 +0000 (17:20 +0100)
committerJohn Crispin <john@phrozen.org>
Mon, 26 Nov 2018 11:05:44 +0000 (12:05 +0100)
Create initrd image with packed microcode. This'll allow to load it at
early boot stage.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
package/firmware/intel-microcode/Makefile

index 07db9b1f9616ebe4f1866f3b9fdcaa2842e8fdc6..4bd47b087aa6a7a8c33450ae303ca5e1f3c8b4fc 100644 (file)
@@ -35,15 +35,17 @@ define Package/intel-microcode
 endef
 
 define Build/Compile
-       IUCODE_TOOL=$(STAGING_DIR)/../host/bin/iucode_tool $(MAKE) -C $(PKG_BUILD_DIR)
-       mkdir $(PKG_BUILD_DIR)/intel-ucode-ipkg
-       $(STAGING_DIR)/../host/bin/iucode_tool -q \
-               --write-firmware=$(PKG_BUILD_DIR)/intel-ucode-ipkg $(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-ipkg/* $(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))