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 \
39 $(MAKE
) -C
$(PKG_BUILD_DIR
)
40 $(STAGING_DIR
)/..
/host
/bin
/iucode_tool
-q
--mini-earlyfw \
41 --write-earlyfw
=$(PKG_BUILD_DIR
)/intel-ucode.cpio \
42 $(PKG_BUILD_DIR
)/$(MICROCODE
).bin
45 define Package
/intel-microcode
/install
46 $(INSTALL_DIR
) $(1)/boot
47 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/intel-ucode.cpio \
48 $(1)/boot
/intel-ucode.img
51 $(eval
$(call BuildPackage
,intel-microcode
))