Hi,

With 1.2.0 version of the mtd-utils comes the new ubi-utils
to deal with ubi devices.

Since they are compiled anyway, here is a patch to rules/mtd-utils.in
and rules/mtd-utils.make to make this utilities available for install.

Jean-Philippe François
Index: rules/mtd-utils.in
===================================================================
--- rules/mtd-utils.in	(révision 31)
+++ rules/mtd-utils.in	(copie de travail)
@@ -124,4 +124,66 @@
 	help
 	  Build a JFFS2 image in a file, from a given directory tree.
 
+config MTD_UTILS_UBIUTILS
+	bool
+	prompt "ubi utils"
+	help
+	  Utilities related to the new UBI devices
+
+if MTD_UTILS_UBIUTILS
+config MTD_UTILS_UBIATTACH
+	bool
+	prompt "ubiattach"
+	help 
+	  Attach an ubi device to a mtd device
+	  
+config MTD_UTILS_UBICRC32
+	bool
+	prompt "ubicrc32"
+	help 
+	  UBI CRC2 file checksum
+
+config MTD_UTILS_UBIDETACH
+	bool
+	prompt "ubidetach"
+	help 
+	  Detach an ubi device from a mtd device
+
+config MTD_UTILS_UBIFORMAT
+	bool
+	prompt "ubiformat"
+	help 
+	  format an mtd device
+
+config MTD_UTILS_UBIMKVOL
+	bool
+	prompt "ubimkvol"
+	help 
+	  Creates a volume on a UBI device
+
+config MTD_UTILS_UBINFO
+	bool
+	prompt "ubinfo"
+	help 
+	  Provides infos on UBI volumes and devices
+	  
+config MTD_UTILS_UBINIZE
+	bool
+	prompt "ubinize"
+	help 
+	  Creates UBI images. Probably more useful on host than on target
+
+config MTD_UTILS_UBIRMVOL
+	bool
+	prompt "ubirmvol"
+	help 
+	  Deletes a volume on a UBI device
+
+config MTD_UTILS_UBIUPDATEVOL
+	bool
+	prompt "ubiupdatevol"
+	help 
+	  Updates a volume with data from file
+
+endif	  
 endif
Index: rules/mtd-utils.make
===================================================================
--- rules/mtd-utils.make	(révision 31)
+++ rules/mtd-utils.make	(copie de travail)
@@ -23,6 +23,7 @@
 MTD_UTILS_URL		:= ftp://ftp.infradead.org/pub/mtd-utils/$(MTD_UTILS).$(MTD_UTILS_SUFFIX)
 MTD_UTILS_SOURCE	:= $(SRCDIR)/$(MTD_UTILS).$(MTD_UTILS_SUFFIX)
 MTD_UTILS_DIR		:= $(BUILDDIR)/$(MTD_UTILS)
+UBI_UTILS		:= ubi-utils/new-utils
 
 # ----------------------------------------------------------------------------
 # Get
@@ -136,7 +137,35 @@
 ifdef PTXCONF_MTD_UTILS_MKJFFS2
 	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/mkfs.jffs2, /sbin/mkfs.jffs2)
 endif
+ifdef PTXCONF_MTD_UTILS_UBIATTACH
+	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/$(UBI_UTILS)/ubiattach, /sbin/ubiattach)
+endif
+ifdef PTXCONF_MTD_UTILS_UBIDETACH
+	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/$(UBI_UTILS)/ubidetach, /sbin/ubidetach)
+endif
+ifdef PTXCONF_MTD_UTILS_UBICRC32
+	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/$(UBI_UTILS)/ubicrc32, /sbin/ubicrc32)
+endif
+ifdef PTXCONF_MTD_UTILS_UBIMKVOL
+	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/$(UBI_UTILS)/ubimkvol, /sbin/ubimkvol)
+endif
+ifdef PTXCONF_MTD_UTILS_UBIRMVOL
+	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/$(UBI_UTILS)/ubirmvol, /sbin/ubirmvol)
+endif
+ifdef PTXCONF_MTD_UTILS_UBIUPDATEVOL
+	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/$(UBI_UTILS)/ubirmvol, /sbin/ubiupdatevol)
+endif
+ifdef PTXCONF_MTD_UTILS_UBINFO
+	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/$(UBI_UTILS)/ubinfo, /sbin/ubinfo)
+endif
+ifdef PTXCONF_MTD_UTILS_UBIFORMAT
+	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/$(UBI_UTILS)/ubiformat, /sbin/ubiformat)
+endif
+ifdef PTXCONF_MTD_UTILS_UBINIZE
+	@$(call install_copy, mtd-utils, 0, 0, 0755, $(MTD_UTILS_DIR)/$(UBI_UTILS)/ubinize, /sbin/ubinize)
+endif
 
+
 	@$(call install_finish, mtd-utils)
 
 	@$(call touch)
--
ptxdist mailing list
[email protected]

Reply via email to