2 # Copyright (C) 2018 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=intel-microcode
14 PKG_SOURCE
:=intel-microcode_3.
$(PKG_VERSION
).1.
tar.xz
15 PKG_SOURCE_URL
:=@DEBIAN
/pool
/non-free-firmware
/i
/intel-microcode
/
16 PKG_HASH
:=808cbb57a790dab7060b59b31e70e54ac47d3798d75e9784ed57a65b9f951fc4
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/intel-microcode-3.
$(PKG_VERSION
).1
18 PKG_CPE_ID
:=cpe
:/a
:intel
:microcode
20 PKG_BUILD_DEPENDS
:=iucode-tool
/host
22 ifdef CONFIG_TARGET_x86_64
23 MICROCODE
:="intel-microcode-64"
25 MICROCODE
:="intel-microcode"
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/intel-microcode
35 URL
:=$(PKG_SOURCE_URL
)
37 TITLE
:=Intel x86 CPU microcode
41 IUCODE_TOOL
=$(STAGING_DIR
)/..
/host
/bin
/iucode_tool
$(MAKE
) -C
$(PKG_BUILD_DIR
)
42 mkdir
$(PKG_BUILD_DIR
)/intel-ucode-ipkg
43 $(STAGING_DIR
)/..
/host
/bin
/iucode_tool
-q \
44 --write-firmware
=$(PKG_BUILD_DIR
)/intel-ucode-ipkg
$(PKG_BUILD_DIR
)/$(MICROCODE
).bin
47 define Package
/intel-microcode
/install
48 $(INSTALL_DIR
) $(1)/lib
/firmware
/intel-ucode
49 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/intel-ucode-ipkg
/* $(1)/lib
/firmware
/intel-ucode
52 $(eval
$(call BuildPackage
,intel-microcode
))