tools: add sgdisk host build

Add a sgdisk host build to convert MBR partitions to GPT for EFI systems.

Signed-off-by: DUPONCHEEL Sébastien <sebastien.duponcheel@corp.ovh.com>
[Jo-Philipp Wich: reword commit message, use libuuid from e2fsprogs,
                  use libpopt host build]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
DUPONCHEEL Sébastien 2017-04-11 12:45:16 +02:00 committed by CN_SZTL
parent d01fb59be7
commit 146c44ee61
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 31 additions and 0 deletions

View File

@ -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

29
tools/gptfdisk/Makefile Normal file
View File

@ -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))