summaryrefslogtreecommitdiff
path: root/packages/system
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-03-17 00:08:29 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-03-17 00:08:29 +0100
commit778a4a5d80d79b1896a160c7c5885e1e5ecb5ee1 (patch)
tree97473af2b9f3713bc4db4c6c9c3786103d7ba880 /packages/system
parente97400b2dca787ff4993111940a19546a6000c5e (diff)
downloadembtoolkit-778a4a5d80d79b1896a160c7c5885e1e5ecb5ee1.tar.gz
embtoolkit-778a4a5d80d79b1896a160c7c5885e1e5ecb5ee1.tar.bz2
embtoolkit-778a4a5d80d79b1896a160c7c5885e1e5ecb5ee1.tar.xz
Build system: mtd-utils: split it into mtdutils and mtdutils_host
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages/system')
-rw-r--r--packages/system/mtdutils/mtdutils.kconfig53
-rw-r--r--packages/system/mtdutils/mtdutils.mk93
-rw-r--r--packages/system/system.mk3
3 files changed, 149 insertions, 0 deletions
diff --git a/packages/system/mtdutils/mtdutils.kconfig b/packages/system/mtdutils/mtdutils.kconfig
new file mode 100644
index 0000000..053a3da
--- /dev/null
+++ b/packages/system/mtdutils/mtdutils.kconfig
@@ -0,0 +1,53 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2010-2014 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file mtdutils.kconfig
+# \brief mtdutils.kconfig of Embtoolkit.
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date August 2010
+################################################################################
+
+config EMBTK_HAVE_MTDUTILS
+ bool "Have mtd-utils in your target root filesystem"
+ select EMBTK_HAVE_E2FSPROGS
+ select EMBTK_HAVE_ZLIB
+ select EMBTK_HAVE_LZO
+ select KEMBTK_UCLIBC_UCLIBC_SUSV3_LEGACY_MACROS if EMBTK_CLIB_UCLIBC
+ help
+ The MTD Utilities are a collection of tools that allow the user to
+ interact with the MTD subsystem in the kernel to perform operations on
+ Flash devices.
+
+choice
+ prompt "mtd-utils version used"
+ depends on EMBTK_HAVE_MTDUTILS
+ help
+ Version of mtd-utils to use.
+
+ config EMBTK_MTDUTILS_VERSION_1_5_0
+ bool "mtd-utils-1.5.0"
+ select EMBTK_MTDUTILS_NEED_PATCH
+endchoice
+
+config EMBTK_MTDUTILS_VERSION_STRING
+ string
+ default "1.5.0" if EMBTK_MTDUTILS_VERSION_1_5_0
+
+config EMBTK_MTDUTILS_NEED_PATCH
+ bool
diff --git a/packages/system/mtdutils/mtdutils.mk b/packages/system/mtdutils/mtdutils.mk
new file mode 100644
index 0000000..8b264ac
--- /dev/null
+++ b/packages/system/mtdutils/mtdutils.mk
@@ -0,0 +1,93 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2014 Abdoulaye Walsimou GAYE.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file mtd-utils.mk
+# \brief mtd-utils.mk of Embtoolkit.
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date June 2009
+################################################################################
+
+MTDUTILS_NAME := mtd-utils
+MTDUTILS_VERSION := $(call embtk_get_pkgversion,mtdutils)
+MTDUTILS_SITE := ftp://ftp.infradead.org/pub/mtd-utils
+MTDUTILS_PACKAGE := mtd-utils-$(MTDUTILS_VERSION).tar.bz2
+MTDUTILS_SRC_DIR := $(embtk_pkgb)/mtd-utils-$(MTDUTILS_VERSION)
+MTDUTILS_BUILD_DIR := $(embtk_pkgb)/mtd-utils-$(MTDUTILS_VERSION)
+
+MTDUTILS_DEPS := zlib_install lzo_install e2fsprogs_install
+
+__embtk_mtdutils_cflags := $(TARGET_CFLAGS)
+
+MTDUTILS_MAKE_ENV := LDFLAGS="-L$(embtk_sysroot)/lib -L$(embtk_sysroot)/usr/lib"
+MTDUTILS_MAKE_ENV += CPPFLAGS="-I. -I./include -I$(embtk_sysroot)/usr/include"
+MTDUTILS_MAKE_ENV += CFLAGS="$(__embtk_mtdutils_cflags)"
+MTDUTILS_MAKE_ENV += BUILDDIR=$(MTDUTILS_BUILD_DIR)
+MTDUTILS_MAKE_ENV += PATH=$(PATH):$(embtk_tools)/bin
+MTDUTILS_MAKE_ENV += CROSS=$(CROSS_COMPILE)
+MTDUTILS_MAKE_OPTS := CC=$(TARGETCC_CACHED)
+MTDUTILS_MAKE_OPTS += DESTDIR=$(embtk_sysroot) WITHOUT_XATTR=1
+
+define __embtk_install_mtdutils
+ $(call embtk_makeinstall_pkg,mtdutils)
+endef
+define embtk_install_mtdutils
+ $(call embtk_makeinstall_pkg,mtdutils)
+endef
+
+#
+# make these binaries selectable from kconfig
+#
+MTDUTILS_SBINS := docfdisk
+MTDUTILS_SBINS += flash_erase
+MTDUTILS_SBINS += flash_otp_dump
+MTDUTILS_SBINS += ftl_check
+MTDUTILS_SBINS += jffs2reader
+MTDUTILS_SBINS += mtd_debug
+MTDUTILS_SBINS += nandtest
+MTDUTILS_SBINS += nftl_format
+MTDUTILS_SBINS += rfdformat
+MTDUTILS_SBINS += ubiattach
+MTDUTILS_SBINS += ubiformat
+MTDUTILS_SBINS += ubinize
+MTDUTILS_SBINS += ubirsvol
+MTDUTILS_SBINS += doc_loadbios
+MTDUTILS_SBINS += flash_eraseall
+MTDUTILS_SBINS += flash_otp_info
+MTDUTILS_SBINS += ftl_format
+MTDUTILS_SBINS += mkfs.jffs2
+MTDUTILS_SBINS += mtdinfo
+MTDUTILS_SBINS += nandwrite
+MTDUTILS_SBINS += recv_image
+MTDUTILS_SBINS += serve_image
+MTDUTILS_SBINS += ubicrc32
+MTDUTILS_SBINS += ubimkvol
+MTDUTILS_SBINS += ubirename
+MTDUTILS_SBINS += ubiupdatevol
+MTDUTILS_SBINS += flashcp
+MTDUTILS_SBINS += flash_lock
+MTDUTILS_SBINS += flash_unlock
+MTDUTILS_SBINS += jffs2dump
+MTDUTILS_SBINS += mkfs.ubifs
+MTDUTILS_SBINS += nanddump
+MTDUTILS_SBINS += nftldump
+MTDUTILS_SBINS += rfddump
+MTDUTILS_SBINS += sumtool
+MTDUTILS_SBINS += ubidetach
+MTDUTILS_SBINS += ubinfo
+MTDUTILS_SBINS += ubirmvol
diff --git a/packages/system/system.mk b/packages/system/system.mk
index 5fc7188..772c96d 100644
--- a/packages/system/system.mk
+++ b/packages/system/system.mk
@@ -34,3 +34,6 @@ $(call embtk_include_hostpkg,e2fsprogs_host)
# OpenRC
$(call embtk_include_pkg,openrc)
+
+# mtd-utils
+$(call embtk_include_pkg,mtdutils)