* [Buildroot] Patch: parted support
@ 2009-10-08 15:30 Igor Serebryany
2009-10-08 17:45 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 3+ messages in thread
From: Igor Serebryany @ 2009-10-08 15:30 UTC (permalink / raw)
To: buildroot
This patch adds GNU parted to buildroot. It's against the 2009.08
release. The makefile could probaby be improved significantly, for
instance enabling readline support if it's present in buildroot. But it
works for now, and I've tested it under i686 and x86_64.
Most of the credit should go to Marco Lazzarotto (m.lazzarotto at
robox.it) who originally wrote the makefile. I simply modified it to use
the latest version.
To apply: "cd buildroot-2009.08; patch -p1 < parted.patch".
--Igor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parted.patch
Type: text/x-diff
Size: 3440 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20091008/c9098d28/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20091008/c9098d28/attachment.pgp>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Patch: parted support
2009-10-08 15:30 [Buildroot] Patch: parted support Igor Serebryany
@ 2009-10-08 17:45 ` Bernhard Reutner-Fischer
2009-10-09 10:04 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Reutner-Fischer @ 2009-10-08 17:45 UTC (permalink / raw)
To: buildroot
On Thu, Oct 08, 2009 at 10:30:36AM -0500, Igor Serebryany wrote:
>This patch adds GNU parted to buildroot. It's against the 2009.08
>release. The makefile could probaby be improved significantly, for
>instance enabling readline support if it's present in buildroot. But it
>works for now, and I've tested it under i686 and x86_64.
>
>Most of the credit should go to Marco Lazzarotto (m.lazzarotto at
>robox.it) who originally wrote the makefile. I simply modified it to use
>the latest version.
>
>To apply: "cd buildroot-2009.08; patch -p1 < parted.patch".
>
>--Igor
>diff -rpuN buildroot-2009.08/package/Config.in buildroot-2009.08.new/package/Config.in
>--- buildroot-2009.08/package/Config.in 2009-09-01 03:44:24.000000000 -0500
>+++ buildroot-2009.08.new/package/Config.in 2009-10-08 09:56:23.000000000 -0500
>@@ -264,6 +264,7 @@ source "package/memtester/Config.in"
> source "package/mtd/Config.in"
> source "package/ntfs-3g/Config.in"
> source "package/ntfsprogs/Config.in"
>+source "package/parted/Config.in"
> source "package/pciutils/Config.in"
> source "package/pcmcia/Config.in"
> source "package/setserial/Config.in"
>diff -rpuN buildroot-2009.08/package/parted/Config.in buildroot-2009.08.new/package/parted/Config.in
>--- buildroot-2009.08/package/parted/Config.in 1969-12-31 18:00:00.000000000 -0600
>+++ buildroot-2009.08.new/package/parted/Config.in 2009-10-08 09:55:48.000000000 -0500
>@@ -0,0 +1,6 @@
>+config BR2_PACKAGE_PARTED
>+ bool "parted"
>+ default n
>+ help
>+ GNU parted
>+ http://ftp.gnu.org/gnu/parted
>diff -rpuN buildroot-2009.08/package/parted/parted.mk buildroot-2009.08.new/package/parted/parted.mk
>--- buildroot-2009.08/package/parted/parted.mk 1969-12-31 18:00:00.000000000 -0600
>+++ buildroot-2009.08.new/package/parted/parted.mk 2009-10-08 09:55:48.000000000 -0500
>@@ -0,0 +1,70 @@
>+#############################################################
>+#
>+# parted
>+#
>+#############################################################
>+PARTED_VERSION:=1.9.0
nowadays packages have to be written differently, like (completely
untested):
cat >package/parted/parted.mk<<EOF
#############################################################
#
# parted
#
#############################################################
PARTED_VERSION:=1.9.0
PARTED_SOURCE:=parted-$(PARTED_VERSION).tar.gz
PARTED_SITE:=$(BR2_GNU_MIRROR)/parted
PARTED_CONF_OPT=$(if $(BR2_ENABLE_DEBUG),--enable-debug,--disable-debug)
ifeq ($(BR2_ENABLE_DEBUG),y)
PARTED_INSTALL_TARGET_OPT:=DESTDIR=$(TARGET_DIR)
INSTALLCMD='./install-sh -c' \
install
else
PARTED_INSTALL_TARGET_OPT:=DESTDIR=$(TARGET_DIR)
INSTALLCMD='./install-sh -c' \
STRIPPROG="$(TARGET_STRIP)" install-strip
endif
PARTED_CONF_OPT:= \
$(if $(BR2_PACKAGE_READLINE),,--without-readline) \
--disable-dynamic-loading \
--without-included-regex
$(eval $(call AUTOTARGETS,package,parted))
EOF
Can you please try to use this type of makefile?
See package/rsync/rsync.mk and others as examples.
TIA,
>+PARTED_SOURCE:=parted-$(PARTED_VERSION).tar.gz
>+PARTED_SITE:=http://ftp.gnu.org/gnu/parted/
>+PARTED_DIR:=$(BUILD_DIR)/parted-$(PARTED_VERSION)
>+PARTED_BINARY:=parted/parted
>+PARTED_TARGET_BINARY:=sbin/parted
>+PARTED_COMPILE_OPT:=--without-readline --disable-dynamic-loading --disable-nls --without-included-regex --disable-shared
>+
>+$(DL_DIR)/$(PARTED_SOURCE):
>+ $(WGET) -P $(DL_DIR) $(PARTED_SITE)/$(PARTED_SOURCE)
>+
>+$(PARTED_DIR)/.source: $(DL_DIR)/$(PARTED_SOURCE)
>+ $(ZCAT) $(DL_DIR)/$(PARTED_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
>+ touch $@
>+
>+parted-source: $(DL_DIR)/$(PARTED_SOURCE)
>+
>+$(PARTED_DIR)/.unpacked: $(DL_DIR)/$(PARTED_SOURCE)
>+ $(ZCAT) $(DL_DIR)/$(PARTED_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
>+ toolchain/patch-kernel.sh $(PARTED_DIR) package/parted/ parted\*.patch
>+ touch $@
>+
>+$(PARTED_DIR)/.configured: $(PARTED_DIR)/.unpacked
>+ (cd $(PARTED_DIR); rm -rf config.cache; \
>+ $(TARGET_CONFIGURE_OPTS) \
>+ $(TARGET_CONFIGURE_ARGS) \
>+ CFLAGS="$(TARGET_CFLAGS)" \
>+ ./configure \
>+ --target=$(GNU_TARGET_NAME) \
>+ --host=$(GNU_TARGET_NAME) \
>+ --build=$(GNU_HOST_NAME) \
>+ --prefix=/ \
>+ --sbindir=/sbin \
>+ $(PARTED_COMPILE_OPT) \
>+ )
>+ touch $@
>+
>+$(PARTED_DIR)/$(PARTED_BINARY): $(PARTED_DIR)/.configured
>+ $(MAKE) CC=$(TARGET_CC) -C $(PARTED_DIR)
>+
>+$(TARGET_DIR)/$(PARTED_TARGET_BINARY): $(PARTED_DIR)/$(PARTED_BINARY)
>+ $(MAKE1) PATH=$(TARGET_PATH) DESTDIR=$(TARGET_DIR) -C $(PARTED_DIR) install-exec
>+ rm -rf $(TARGET_DIR)/usr/man
>+ rm -rf $(TARGET_DIR)/usr/include
>+
>+parted: uclibc e2fsprogs $(TARGET_DIR)/$(PARTED_TARGET_BINARY)
>+
>+parted-source: $(DL_DIR)/$(PARTED_SOURCE)
>+
>+parted-clean:
>+ $(MAKE1) PATH=$(TARGET_PATH) DESTDIR=$(TARGET_DIR) -C $(PARTED_DIR) uninstall
>+ -$(MAKE) -C $(PARTED_DIR) clean
>+
>+parted-dirclean:
>+ rm -rf $(PARTED_DIR)
>+
>+#############################################################
>+#
>+# Toplevel Makefile options
>+#
>+#############################################################
>+
>+ifeq ($(strip $(BR2_PACKAGE_PARTED)),y)
>+TARGETS+=parted
>+endif
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Patch: parted support
2009-10-08 17:45 ` Bernhard Reutner-Fischer
@ 2009-10-09 10:04 ` Thomas Petazzoni
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2009-10-09 10:04 UTC (permalink / raw)
To: buildroot
Le Thu, 8 Oct 2009 19:45:44 +0200,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> a ?crit :
> nowadays packages have to be written differently, like (completely
> untested):
Yes.
> ($(BR2_ENABLE_DEBUG),y)
> PARTED_INSTALL_TARGET_OPT:=DESTDIR=$(TARGET_DIR)
> INSTALLCMD='./install-sh -c' \ install
> else
> PARTED_INSTALL_TARGET_OPT:=DESTDIR=$(TARGET_DIR)
> INSTALLCMD='./install-sh -c' \
> STRIPPROG="$(TARGET_STRIP)" install-strip
> endif
What is this INSTALLCMD thing ?
Concerning the ENABLE_DEBUG test, it is not necessary.
Makefile.autotools.in already does:
ifeq ($(BR2_ENABLE_DEBUG),y)
$(2)_INSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) install-exec
else
$(2)_INSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) install-strip
endif
Sincerly,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-09 10:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08 15:30 [Buildroot] Patch: parted support Igor Serebryany
2009-10-08 17:45 ` Bernhard Reutner-Fischer
2009-10-09 10:04 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox