diff mbox series

[LEDE-DEV,v2,6/6] intel-microcode: create early load microcode image

Message ID 20180417185005.5810-7-tomek_n@o2.pl
State New
Headers show
Series intel-microcode: load as early as possible | expand

Commit Message

Tomasz Maciej Nowak April 17, 2018, 6:50 p.m. UTC
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 | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile
index d2663bb901..b0c91baabb 100644
--- a/package/firmware/intel-microcode/Makefile
+++ b/package/firmware/intel-microcode/Makefile
@@ -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
-	$(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))