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
11 PKG_VERSION
:=20180807a
14 PKG_SOURCE
:=intel-microcode_3.
$(PKG_VERSION
).
$(PKG_RELEASE
).
tar.xz
15 PKG_SOURCE_URL
:=http
://ftp.debian.org
/debian
/pool
/non-free
/i
/intel-microcode
/
16 PKG_HASH
:=1a7cb96d5c6a4abac2936236223d9bea79d7442dc1cfe9b712ff8e35374f0f9f
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-3.
$(PKG_VERSION
).
$(PKG_RELEASE
)
19 PKG_BUILD_DEPENDS
:=iucode-tool
/host
21 ifdef CONFIG_TARGET_x86_64
22 MICROCODE
:="intel-microcode-64"
24 MICROCODE
:="intel-microcode"
27 include $(INCLUDE_DIR
)/package.mk
29 define Package
/intel-microcode
32 URL
:=$(PKG_SOURCE_URL
)
34 TITLE
:=Intel x86 CPU microcode
38 IUCODE_TOOL
=$(STAGING_DIR
)/..
/host
/bin
/iucode_tool
$(MAKE
) -C
$(PKG_BUILD_DIR
)
39 mkdir
$(PKG_BUILD_DIR
)/intel-ucode-ipkg
40 $(STAGING_DIR
)/..
/host
/bin
/iucode_tool
-q \
41 --write-firmware
=$(PKG_BUILD_DIR
)/intel-ucode-ipkg
$(PKG_BUILD_DIR
)/$(MICROCODE
).bin
44 define Package
/intel-microcode
/install
45 $(INSTALL_DIR
) $(1)/lib
/firmware
/intel-ucode
46 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/intel-ucode-ipkg
/* $(1)/lib
/firmware
/intel-ucode
49 $(eval
$(call BuildPackage
,intel-microcode
))