From: Zoltan HERPAI Date: Thu, 11 Jan 2018 19:37:28 +0000 (+0100) Subject: packages: iucode-tool: collapse host/target packages into one X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=753cbcd24acb241341acf6d0859fbe1d3af804fb;p=openwrt%2Fstaging%2Fwigyori.git packages: iucode-tool: collapse host/target packages into one Collapse the package under tools/ and packages/ into one common makefile, using the host/ build stanzas, and make the intel microcode package depend on the hostbuild. Signed-off-by: Zoltan HERPAI --- diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index 59d83ac3de..996eb3e26f 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -16,12 +16,15 @@ PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/i/intel-microcode/ PKG_HASH:=7a1a8bbbc6520be14e99fab40581c471861e8d731593447dfc9e9bd6b630712d PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE) +PKG_BUILD_DEPENDS:=iucode-tool/host + ifdef CONFIG_TARGET_x86_64 MICROCODE:="intel-microcode-64" else MICROCODE:="intel-microcode" endif +include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk define Package/intel-microcode @@ -42,6 +45,17 @@ 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)/etc/init.d + $(INSTALL_BIN) ./files/intel-microcode.init $(1)/etc/init.d/intel-microcode +endef + +HOST_MAKE_FLAGS+= \ + CFLAGS="$(HOST_CFLAGS)" \ + all + +define Host/Install + $(INSTALL_BIN) $(HOST_BUILD_DIR)/iucode_tool $(STAGING_DIR_HOST)/bin/iucode_tool endef +$(eval $(call HostBuild)) $(eval $(call BuildPackage,intel-microcode)) diff --git a/package/system/iucode-tool/Makefile b/package/system/iucode-tool/Makefile new file mode 100644 index 0000000000..7a72e3a558 --- /dev/null +++ b/package/system/iucode-tool/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iucode-tool +PKG_VERSION:=2.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=iucode-tool_$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://gitlab.com/iucode-tool/releases/raw/latest +PKG_HASH:=9810daf925b8a9ca244adc4e1916bcab65601c9ebe87e91c2281f78055982971 + +PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone + +PKG_MAINTAINER:=Zoltan HERPAI +PKG_LICENSE:=GPL-2.0 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define Package/iucode-tool + SECTION:=utils + CATEGORY:=Base system + URL:=$(PKG_SOURCE_URL) + DEPENDS:=@TARGET_x86 + TITLE:=Intel microcode loader +endef + +define Package/iucode-tool/install + $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/iucode_tool $(1)/usr/bin/ +endef + +define Host/Install + $(INSTALL_BIN) $(HOST_BUILD_DIR)/iucode_tool $(STAGING_DIR_HOST)/bin/iucode_tool +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,iucode-tool)) diff --git a/tools/Makefile b/tools/Makefile index b1ec9a41eb..50bd552d75 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -28,7 +28,7 @@ tools-y += firmware-utils patch-image quilt padjffs2 tools-y += mm-macros missing-macros cmake scons bc findutils gengetopt patchelf tools-y += mtools dosfstools libressl tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2 -tools-$(CONFIG_TARGET_x86) += qemu iucode-tool +tools-$(CONFIG_TARGET_x86) += qemu tools-$(CONFIG_TARGET_mxs) += elftosb sdimage tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs tools-$(CONFIG_USES_MINOR) += kernel2minor diff --git a/tools/iucode-tool/Makefile b/tools/iucode-tool/Makefile deleted file mode 100644 index c576b61c05..0000000000 --- a/tools/iucode-tool/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=iucode-tool -PKG_VERSION:=2.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=iucode-tool_$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://gitlab.com/iucode-tool/releases/raw/latest -PKG_HASH:=9810daf925b8a9ca244adc4e1916bcab65601c9ebe87e91c2281f78055982971 - -PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone - -PKG_MAINTAINER:=Zoltan HERPAI -PKG_LICENSE:=GPL-2.0 - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/host-build.mk - -define Host/Install - $(INSTALL_BIN) $(HOST_BUILD_DIR)/iucode_tool $(STAGING_DIR_HOST)/bin/iucode_tool -endef - -$(eval $(call HostBuild))