From: Rany Hany Date: Sat, 4 Jul 2026 23:58:34 +0000 (+0000) Subject: intel-microcode: fix build error on rebuild X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=57b659c41dff712497f748915cdbc23e6e610a48;p=thirdparty%2Fopenwrt.git intel-microcode: fix build error on rebuild When rebuilding the package, iucode_tool fails with a "File exists" error if the directory already contained firmware from the previous build (incl. in the successful build case). Fix this by removing the directory before invoking iucode_tool. Fixes the following build error: iucode_tool: 06-0f-02: cannot write to, or create file: File exists make[2]: *** [Makefile:57: .../.built] Error 2 Signed-off-by: Rany Hany Link: https://github.com/openwrt/openwrt/pull/24077 Signed-off-by: Robert Marko --- diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index 2808aa6810d..b183f5c9d92 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -39,6 +39,7 @@ endef define Build/Compile IUCODE_TOOL=$(STAGING_DIR)/../host/bin/iucode_tool $(MAKE) -C $(PKG_BUILD_DIR) + rm -rf $(PKG_BUILD_DIR)/intel-ucode-ipkg mkdir -p $(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