From 146c44ee61b939f5255a7c0935bdd121fd1e8ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DUPONCHEEL=20S=C3=A9bastien?= Date: Tue, 11 Apr 2017 12:45:16 +0200 Subject: [PATCH] tools: add sgdisk host build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a sgdisk host build to convert MBR partitions to GPT for EFI systems. Signed-off-by: DUPONCHEEL Sébastien [Jo-Philipp Wich: reword commit message, use libuuid from e2fsprogs, use libpopt host build] Signed-off-by: Jo-Philipp Wich --- tools/Makefile | 2 ++ tools/gptfdisk/Makefile | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tools/gptfdisk/Makefile diff --git a/tools/Makefile b/tools/Makefile index d0c01d9be0..499246cbc6 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -29,6 +29,7 @@ tools-y += pkgconf quilt squashfskit4 sstrip ucl upx zip zlib zstd tools-$(BUILD_B43_TOOLS) += b43-tools tools-$(BUILD_ISL) += isl tools-$(BUILD_TOOLCHAIN) += expat gmp libelf mpc mpfr +tools-$(CONFIG_EFI_IMAGES) += gptfdisk popt tools-$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini) += genext2fs tools-$(CONFIG_TARGET_ath79) += lzma-old squashfs tools-$(CONFIG_TARGET_mxs) += elftosb sdimage @@ -52,6 +53,7 @@ $(curdir)/firmware-utils/compile += $(curdir)/libressl/compile $(curdir)/zlib/co $(curdir)/flex/compile := $(curdir)/libtool/compile $(curdir)/gengetopt/compile := $(curdir)/libtool/compile $(curdir)/gmp/compile := $(curdir)/libtool/compile +$(curdir)/gptfdisk/compile += $(curdir)/e2fsprogs/compile $(curdir)/popt/compile $(curdir)/isl/compile := $(curdir)/gmp/compile $(curdir)/libelf/compile := $(curdir)/libtool/compile $(curdir)/libressl/compile := $(curdir)/pkgconf/compile diff --git a/tools/gptfdisk/Makefile b/tools/gptfdisk/Makefile new file mode 100644 index 0000000000..44315ed76a --- /dev/null +++ b/tools/gptfdisk/Makefile @@ -0,0 +1,29 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=gptfdisk +PKG_VERSION:=1.0.1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.rodsbooks.com/gdisk/ +PKG_HASH:=864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7 + +HOST_BUILD_PARALLEL := 1 + +include $(INCLUDE_DIR)/host-build.mk + +HOST_CPPFLAGS += \ + -I$(STAGING_DIR_HOST)/include/e2fsprogs + +define Host/Compile + $(call Host/Compile/Default,sgdisk) +endef + +define Host/Install + $(INSTALL_BIN) $(HOST_BUILD_DIR)/sgdisk $(STAGING_DIR_HOST)/bin/ +endef + +define Host/Clean + rm -f $(STAGING_DIR_HOST)/bin/sgdisk +endef + +$(eval $(call HostBuild))