gptfdisk: Add host package
authorTrent Piepho <tpiepho@kymetacorp.com>
Tue, 8 Dec 2015 23:20:23 +0000 (15:20 -0800)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 15 Dec 2015 21:33:33 +0000 (22:33 +0100)
This tool which is useful for scripts that create flash images with
multiple partitions.  The host-parted package can do this too, but is
missing a number of features that the gptfdisk program has for dealing
with GPT.

The interactive gdisk and curses based sgdisk aren't built.  Just the
scriptable tool sgdisk.  The target package allows configuring which
tools are built, but this seem unnecessarily complex for the host
tool.

[Thomas: minor reformatting tweaks.]

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/Config.in.host
package/gptfdisk/Config.in.host [new file with mode: 0644]
package/gptfdisk/gptfdisk.mk

index ce1b6bcad84ef6110856f1aa87a57dcd9e5bffd6..d757316c18b682c456194785c8530e1c5feddf4e 100644 (file)
@@ -12,6 +12,7 @@ menu "Host utilities"
        source "package/genext2fs/Config.in.host"
        source "package/genimage/Config.in.host"
        source "package/genpart/Config.in.host"
+       source "package/gptfdisk/Config.in.host"
        source "package/imx-usb-loader/Config.in.host"
        source "package/jq/Config.in.host"
        source "package/lpc3250loader/Config.in.host"
diff --git a/package/gptfdisk/Config.in.host b/package/gptfdisk/Config.in.host
new file mode 100644 (file)
index 0000000..fb7c682
--- /dev/null
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_HOST_GPTFDISK
+       bool "host gptfdisk"
+       select BR2_PACKAGE_HOST_UTIL_LINUX
+       help
+          GPT fdisk (consisting of the gdisk and sgdisk programs) is a
+          text-mode partitioning tool that works on Globally Unique
+          Identifier (GUID) Partition Table (GPT) disks, rather than
+          on the more common (through 2010) Master Boot Record (MBR)
+          partition tables.
+
+          http://www.rodsbooks.com/gdisk/
index abfddfb9789212b83e0025b84ecf9b267873b172..274591c7d42925365fdf08bb0815e10b7e7adeb5 100644 (file)
@@ -46,4 +46,15 @@ define GPTFDISK_INSTALL_TARGET_CMDS
        done
 endef
 
+HOST_GPTFDISK_DEPENDENCIES = host-util-linux host-popt
+
+define HOST_GPTFDISK_BUILD_CMDS
+       $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) sgdisk
+endef
+
+define HOST_GPTFDISK_INSTALL_CMDS
+       $(INSTALL) -D -m 0755 $(@D)/sgdisk $(HOST_DIR)/usr/sbin/sgdisk
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))