mtd: add option to build mkfs.ubifs for target
authorPaul B. Henson <henson@acm.org>
Mon, 29 Jul 2013 02:11:50 +0000 (19:11 -0700)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 29 Jul 2013 18:47:48 +0000 (20:47 +0200)
[Thomas: implement simplifications suggested by Thomas De
Schampheleire, add missing 'depends' on required toolchain features.]

Signed-off-by: Paul B. Henson <henson@acm.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/mtd/Config.in
package/mtd/mtd.mk

index ddc3737dcf65f027ea40b15b3b6e0adad8787337..d3da41344e1866478a780a65b16ae2aa0f23fd08 100644 (file)
@@ -54,6 +54,18 @@ config BR2_PACKAGE_MTD_MKFSJFFS2
        select BR2_PACKAGE_ZLIB
        select BR2_PACKAGE_LZO
 
+config BR2_PACKAGE_MTD_MKFSUBIFS
+       bool "mkfs.ubifs"
+       select BR2_PACKAGE_ZLIB
+       select BR2_PACKAGE_LZO
+       select BR2_PACKAGE_UTIL_LINUX
+       select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+       depends on BR2_LARGEFILE # util-linux
+       depends on BR2_USE_WCHAR # util-linux
+
+comment "mkfs.ubifs requires largefile and wchar support in toolchain"
+       depends on !BR2_LARGEFILE || !BR2_USE_WCHAR
+
 config BR2_PACKAGE_MTD_MTD_DEBUG
        bool "mtd_debug"
        default y
index 994a73a222a713d71a65d5f2dd5a34c714dce5e4..6b2af0dc9fff76518bebd543b9ef9ebec1db65a3 100644 (file)
@@ -14,6 +14,10 @@ ifeq ($(BR2_PACKAGE_MTD_MKFSJFFS2),y)
 MTD_DEPENDENCIES = zlib lzo
 endif
 
+ifeq ($(BR2_PACKAGE_MTD_MKFSUBIFS),y)
+MTD_DEPENDENCIES += util-linux zlib lzo
+endif
+
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 MTD_DEPENDENCIES += busybox
 endif
@@ -72,6 +76,7 @@ MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRSVOL)   += ubirsvol
 MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIUPDATEVOL)        += ubiupdatevol
 
 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),)