summaryrefslogtreecommitdiff
path: root/package/gptfdisk
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@kymetacorp.com>2015-12-08 15:20:23 -0800
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-15 22:33:33 +0100
commit3d5f55867a0c310bd8f268bdba19d986f5e3fc34 (patch)
treee1809ac45dc1d27bc013519043b49dd8e68673bd /package/gptfdisk
parentea614ccdc7dcb866f8b2e1993af54670da02c236 (diff)
gptfdisk: Add host package
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>
Diffstat (limited to 'package/gptfdisk')
-rw-r--r--package/gptfdisk/Config.in.host11
-rw-r--r--package/gptfdisk/gptfdisk.mk11
2 files changed, 22 insertions, 0 deletions
diff --git a/package/gptfdisk/Config.in.host b/package/gptfdisk/Config.in.host
new file mode 100644
index 000000000..fb7c682d0
--- /dev/null
+++ b/package/gptfdisk/Config.in.host
@@ -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/
diff --git a/package/gptfdisk/gptfdisk.mk b/package/gptfdisk/gptfdisk.mk
index abfddfb97..274591c7d 100644
--- a/package/gptfdisk/gptfdisk.mk
+++ b/package/gptfdisk/gptfdisk.mk
@@ -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))