Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/mtd: install libubi.a and libmtd.a to staging
@ 2014-09-07  9:35 Romain Naour
  2014-09-28 19:49 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Romain Naour @ 2014-09-07  9:35 UTC (permalink / raw)
  To: buildroot

Currently, the mtd package only installs the mtd utilities into the
target directory. However, the mtd-utils also provide two
static libraries (libmtd.a and libubi.a) that can be used by other
packages or tools.

Therefore, this commit extends the mtd package by adding the
installation to the staging directory of those two libraries.

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
v2: rewrite the commit message (Thomas Petazzoni)
    fix coding style (Thomas Petazzoni)
---
 package/mtd/mtd.mk | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk
index 80928b6..1d92f81 100644
--- a/package/mtd/mtd.mk
+++ b/package/mtd/mtd.mk
@@ -10,6 +10,8 @@ MTD_SITE = ftp://ftp.infradead.org/pub/mtd-utils
 MTD_LICENSE = GPLv2
 MTD_LICENSE_FILES = COPYING
 
+MTD_INSTALL_STAGING = YES
+
 ifeq ($(BR2_PACKAGE_MTD_MKFSJFFS2),y)
 MTD_DEPENDENCIES = zlib lzo
 endif
@@ -36,6 +38,7 @@ endef
 MKFS_JFFS2 = $(HOST_DIR)/usr/sbin/mkfs.jffs2
 SUMTOOL = $(HOST_DIR)/usr/sbin/sumtool
 
+MTD_STAGING_y = lib/libmtd.a ubi-utils/libubi.a
 MTD_TARGETS_$(BR2_PACKAGE_MTD_DOCFDISK)		+= docfdisk
 MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS)	+= doc_loadbios
 MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASHCP)		+= flashcp
@@ -79,16 +82,17 @@ MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIBLOCK)	+= ubiblock
 MTD_TARGETS_y += $(addprefix ubi-utils/,$(MTD_TARGETS_UBI_y))
 MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs/mkfs.ubifs
 
-# only call make if atleast a single tool is enabled
-ifneq ($(MTD_TARGETS_y),)
-
 define MTD_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \
 		BUILDDIR=$(@D) WITHOUT_XATTR=1 WITHOUT_LARGEFILE=1 -C $(@D) \
-		$(addprefix $(@D)/,$(MTD_TARGETS_y))
+		$(addprefix $(@D)/,$(MTD_TARGETS_y)) \
+		$(addprefix $(@D)/,$(MTD_STAGING_y))
 endef
 
-endif
+define MTD_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/lib/libmtd.a $(STAGING_DIR)/usr/lib/libmtd.a
+	$(INSTALL) -D -m 0755 $(@D)/ubi-utils/libubi.a $(STAGING_DIR)/usr/lib/libubi.a
+endef
 
 define MTD_INSTALL_TARGET_CMDS
  for f in $(MTD_TARGETS_y) ; do \
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH v2] package/mtd: install libubi.a and libmtd.a to staging
  2014-09-07  9:35 [Buildroot] [PATCH v2] package/mtd: install libubi.a and libmtd.a to staging Romain Naour
@ 2014-09-28 19:49 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2014-09-28 19:49 UTC (permalink / raw)
  To: buildroot

>>>>> "Romain" == Romain Naour <romain.naour@openwide.fr> writes:

 > Currently, the mtd package only installs the mtd utilities into the
 > target directory. However, the mtd-utils also provide two
 > static libraries (libmtd.a and libubi.a) that can be used by other
 > packages or tools.

 > Therefore, this commit extends the mtd package by adding the
 > installation to the staging directory of those two libraries.

 > Signed-off-by: Romain Naour <romain.naour@openwide.fr>
 > ---
 > v2: rewrite the commit message (Thomas Petazzoni)
 >     fix coding style (Thomas Petazzoni)

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-28 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-07  9:35 [Buildroot] [PATCH v2] package/mtd: install libubi.a and libmtd.a to staging Romain Naour
2014-09-28 19:49 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox