summaryrefslogtreecommitdiff
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
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>
-rw-r--r--kconfig/packages.kconfig24
-rw-r--r--kconfig/rootfs/rootfs.kconfig1
-rw-r--r--mk/packages.mk1
-rw-r--r--packages/htools/hosttools-buildopts.kconfig5
-rw-r--r--packages/htools/hosttools-buildopts.mk3
-rw-r--r--packages/htools/mtdutils/mtdutils.kconfig40
-rw-r--r--packages/htools/mtdutils/mtdutils.mk42
-rw-r--r--packages/system/mtdutils/mtdutils.kconfig (renamed from kconfig/mtdutils.kconfig)28
-rw-r--r--packages/system/mtdutils/mtdutils.mk (renamed from mk/mtd-utils.mk)27
-rw-r--r--packages/system/system.mk3
10 files changed, 108 insertions, 66 deletions
diff --git a/kconfig/packages.kconfig b/kconfig/packages.kconfig
index dd818f6..b35bfbc 100644
--- a/kconfig/packages.kconfig
+++ b/kconfig/packages.kconfig
@@ -37,29 +37,7 @@ endif
menu "Packages to include in your root filesystem"
menu "Flash manipulation tools"
-#mtd-utils on target
-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. The most commonly used utilities are:
- * flash_erase - Erases an erase block of flash
- * flash_eraseall - Erases the entire flash device
- * flashcp - Copies data into NOR flash
- * flash_info - Displays information about Flash devices
- * flash_lock - Lock flash pages to prevent writing
- * flash_unlock - Unlock flash pages to allow writing
- * mkfs.jffs2 - Create a JFFS2 file system image from an existing file
- system
- * nandwrite - Write an input file (i.e. JFFS2 or YAFFS2 image) to the
- NAND Flash device
- These utilities are often used to write file system images to the Flash
- device on an embedded system.
+source packages/system/mtdutils/mtdutils.kconfig
endmenu
menu "Compression packages"
diff --git a/kconfig/rootfs/rootfs.kconfig b/kconfig/rootfs/rootfs.kconfig
index 07b88a9..6ccd5e5 100644
--- a/kconfig/rootfs/rootfs.kconfig
+++ b/kconfig/rootfs/rootfs.kconfig
@@ -24,6 +24,5 @@
################################################################################
source "kconfig/rootfs/fs.kconfig"
-source "kconfig/mtdutils.kconfig"
source "kconfig/squashfs.kconfig"
source "kconfig/packages.kconfig"
diff --git a/mk/packages.mk b/mk/packages.mk
index 9ff4313..56fb111 100644
--- a/mk/packages.mk
+++ b/mk/packages.mk
@@ -40,7 +40,6 @@ HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_LIBELF) += libelf_host_install
include mk/makedevs.mk
include mk/mkimage.mk
-include mk/mtd-utils.mk
include mk/squashfs.mk
# Install various tools in case of FreeBSD host development machine
diff --git a/packages/htools/hosttools-buildopts.kconfig b/packages/htools/hosttools-buildopts.kconfig
index 1f7eced..ab16f6c 100644
--- a/packages/htools/hosttools-buildopts.kconfig
+++ b/packages/htools/hosttools-buildopts.kconfig
@@ -123,6 +123,11 @@ source kconfig/bmake.kconfig
source kconfig/gmake.kconfig
#
+# mtd-utils
+#
+source packages/htools/mtdutils/mtdutils.kconfig
+
+#
# pkgconf
#
source packages/htools/pkgconf/pkgconf.kconfig
diff --git a/packages/htools/hosttools-buildopts.mk b/packages/htools/hosttools-buildopts.mk
index 56df4f5..31527c4 100644
--- a/packages/htools/hosttools-buildopts.mk
+++ b/packages/htools/hosttools-buildopts.mk
@@ -32,6 +32,9 @@ $(call embtk_include_hostpkg,ccache_host)
include packages/htools/fakeroot/vars.mk
$(call embtk_include_hostpkg,fakeroot_host)
+# mtd-utils
+$(call embtk_include_hostpkg,mtdutils_host)
+
# pkgconf
include packages/htools/pkgconf/vars.mk
$(call embtk_include_hostpkg,pkgconf_host)
diff --git a/packages/htools/mtdutils/mtdutils.kconfig b/packages/htools/mtdutils/mtdutils.kconfig
new file mode 100644
index 0000000..59d96c3
--- /dev/null
+++ b/packages/htools/mtdutils/mtdutils.kconfig
@@ -0,0 +1,40 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 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 Marsh 2014
+################################################################################
+
+config EMBTK_HOST_HAVE_MTDUTILS
+ bool
+ select EMBTK_HOST_HAVE_E2FSPROGS
+ select EMBTK_HOST_HAVE_ZLIB
+ select EMBTK_HOST_HAVE_LZO
+ select EMBTK_MTDUTILS_HOST_NEED_PATCH
+ help
+ mtd-utils intented to run on the host development machine.
+
+config EMBTK_MTDUTILS_HOST_VERSION_STRING
+ string
+ default "1.5.0"
+
+config EMBTK_MTDUTILS_HOST_NEED_PATCH
+ bool
diff --git a/packages/htools/mtdutils/mtdutils.mk b/packages/htools/mtdutils/mtdutils.mk
new file mode 100644
index 0000000..0cef6f4
--- /dev/null
+++ b/packages/htools/mtdutils/mtdutils.mk
@@ -0,0 +1,42 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 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.mk
+# \brief mtd-utils for host
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date Marsh 2014
+################################################################################
+
+MTDUTILS_HOST_NAME := mtd-utils
+MTDUTILS_HOST_VERSION := $(call embtk_get_pkgversion,mtdutils)
+MTDUTILS_HOST_SITE := ftp://ftp.infradead.org/pub/mtd-utils
+MTDUTILS_HOST_PACKAGE := mtd-utils-$(MTDUTILS_HOST_VERSION).tar.bz2
+MTDUTILS_HOST_SRC_DIR := $(embtk_toolsb)/mtd-utils-$(MTDUTILS_HOST_VERSION)
+MTDUTILS_HOST_BUILD_DIR := $(embtk_toolsb)/mtd-utils-$(MTDUTILS_HOST_VERSION)
+
+MTDUTILS_HOST_DEPS := zlib_host_install lzo_host_install e2fsprogs_host_install
+
+MTDUTILS_HOST_MAKE_ENV := LDFLAGS="-L$(embtk_htools)/usr/lib"
+MTDUTILS_HOST_MAKE_ENV += CPPFLAGS="-I. -Iinclude -I../include -I$(embtk_htools)/usr/include"
+MTDUTILS_HOST_MAKE_ENV += BUILDDIR=$(MTDUTILS_HOST_BUILD_DIR)
+MTDUTILS_HOST_MAKE_OPTS := DESTDIR=$(embtk_htools) WITHOUT_XATTR=1
+
+define embtk_install_mtdutils_host
+ $(call embtk_makeinstall_hostpkg,mtdutils_host)
+endef
diff --git a/kconfig/mtdutils.kconfig b/packages/system/mtdutils/mtdutils.kconfig
index e0dd14a..053a3da 100644
--- a/kconfig/mtdutils.kconfig
+++ b/packages/system/mtdutils/mtdutils.kconfig
@@ -1,6 +1,6 @@
################################################################################
# Embtoolkit
-# Copyright(C) 2010-2013 Abdoulaye Walsimou GAYE.
+# 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
@@ -23,20 +23,22 @@
# \date August 2010
################################################################################
-config EMBTK_HOST_HAVE_MTDUTILS
- bool
- select EMBTK_HOST_HAVE_E2FSPROGS
- select EMBTK_HOST_HAVE_ZLIB
- select EMBTK_HOST_HAVE_LZO
+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
- mtd-utils intented to run on the host development machine.
+ 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_HOST_HAVE_MTDUTILS || EMBTK_HAVE_MTDUTILS
+ depends on EMBTK_HAVE_MTDUTILS
help
- mtd-utils version used
- NOTE: This version of mtd-utils is patched to fix various issue,
- these patches come from mtd-utils git repository.
+ Version of mtd-utils to use.
config EMBTK_MTDUTILS_VERSION_1_5_0
bool "mtd-utils-1.5.0"
@@ -49,7 +51,3 @@ config EMBTK_MTDUTILS_VERSION_STRING
config EMBTK_MTDUTILS_NEED_PATCH
bool
- select EMBTK_MTDUTILS_HOST_NEED_PATCH
-
-config EMBTK_MTDUTILS_HOST_NEED_PATCH
- bool
diff --git a/mk/mtd-utils.mk b/packages/system/mtdutils/mtdutils.mk
index 5003802..8b264ac 100644
--- a/mk/mtd-utils.mk
+++ b/packages/system/mtdutils/mtdutils.mk
@@ -1,6 +1,6 @@
################################################################################
# Embtoolkit
-# Copyright(C) 2009-2013 Abdoulaye Walsimou GAYE.
+# 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
@@ -91,28 +91,3 @@ MTDUTILS_SBINS += sumtool
MTDUTILS_SBINS += ubidetach
MTDUTILS_SBINS += ubinfo
MTDUTILS_SBINS += ubirmvol
-
-#
-# mtd-utils for host development machine.
-#
-MTDUTILS_HOST_NAME := $(MTDUTILS_NAME)
-MTDUTILS_HOST_VERSION := $(MTDUTILS_VERSION)
-MTDUTILS_HOST_SITE := $(MTDUTILS_SITE)
-MTDUTILS_HOST_SITE_MIRROR1 := $(MTDUTILS_SITE_MIRROR1)
-MTDUTILS_SITE_MIRROR2 := $(MTDUTILS_SITE_MIRROR2)
-MTDUTILS_HOST_SITE_MIRROR3 := $(MTDUTILS_SITE_MIRROR3)
-MTDUTILS_HOST_PACKAGE := $(MTDUTILS_PACKAGE)
-MTDUTILS_HOST_SRC_DIR := $(embtk_toolsb)/mtd-utils-$(MTDUTILS_VERSION)
-MTDUTILS_HOST_BUILD_DIR := $(embtk_toolsb)/mtd-utils-$(MTDUTILS_VERSION)
-
-MTDUTILS_HOST_DEPS := zlib_host_install lzo_host_install \
- e2fsprogs_host_install
-
-MTDUTILS_HOST_MAKE_ENV := LDFLAGS="-L$(embtk_htools)/usr/lib"
-MTDUTILS_HOST_MAKE_ENV += CPPFLAGS="-I. -Iinclude -I../include -I$(embtk_htools)/usr/include"
-MTDUTILS_HOST_MAKE_ENV += BUILDDIR=$(MTDUTILS_HOST_BUILD_DIR)
-MTDUTILS_HOST_MAKE_OPTS := DESTDIR=$(embtk_htools) WITHOUT_XATTR=1
-
-define embtk_install_mtdutils_host
- $(call embtk_makeinstall_hostpkg,mtdutils_host)
-endef
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)