aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf_samuelsson@telia.com>2011-11-16 15:11:04 +0100
committerUlf Samuelsson <ulf_samuelsson@telia.com>2011-11-21 16:38:02 +0100
commita80b9dbc7fa0b19806966f3e26798d488b7e0316 (patch)
tree383da8f68e6229e228571e3123f0efb0ddb0896d
parent00fcaf3267a79b81bd0c128d2692d8f2d2e5753d (diff)
downloadopenembedded-a80b9dbc7fa0b19806966f3e26798d488b7e0316.zip
openembedded-a80b9dbc7fa0b19806966f3e26798d488b7e0316.tar.gz
openembedded-a80b9dbc7fa0b19806966f3e26798d488b7e0316.tar.bz2
mtd-support-native: new recipe
Signed-off-by: Ulf Samuelsson <ulf.samuelsson@telia.com>
-rw-r--r--recipes/mtd/mtd-utils-native.inc5
-rw-r--r--recipes/mtd/mtd-utils-native_git.bb4
-rw-r--r--recipes/mtd/mtd-utils.inc87
-rw-r--r--recipes/mtd/mtd-utils_git.bb16
4 files changed, 112 insertions, 0 deletions
diff --git a/recipes/mtd/mtd-utils-native.inc b/recipes/mtd/mtd-utils-native.inc
new file mode 100644
index 0000000..aaef4ac
--- /dev/null
+++ b/recipes/mtd/mtd-utils-native.inc
@@ -0,0 +1,5 @@
+inherit native
+DEPENDS = "zlib-native lzo-native"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/mtd-utils"
+
+NATIVE_INSTALL_WORKS = "1"
diff --git a/recipes/mtd/mtd-utils-native_git.bb b/recipes/mtd/mtd-utils-native_git.bb
new file mode 100644
index 0000000..94ad2be
--- /dev/null
+++ b/recipes/mtd/mtd-utils-native_git.bb
@@ -0,0 +1,4 @@
+DEFAULT_PREFERENCE = "1"
+require mtd-utils_${PV}.bb
+require mtd-utils-native.inc
+DEPENDS += "util-linux-ng-native lzo2-native"
diff --git a/recipes/mtd/mtd-utils.inc b/recipes/mtd/mtd-utils.inc
new file mode 100644
index 0000000..74c4cf0
--- /dev/null
+++ b/recipes/mtd/mtd-utils.inc
@@ -0,0 +1,87 @@
+DESCRIPTION = "Tools for managing memory technology devices."
+SECTION = "base"
+DEPENDS = "zlib"
+HOMEPAGE = "http://www.linux-mtd.infradead.org/"
+LICENSE = "GPLv2"
+PR = "r0"
+
+SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.bz2"
+
+S = "${WORKDIR}/mtd-utils-${PV}"
+
+EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR'"
+
+do_install () {
+ install -d ${D}${bindir}
+ install -d ${D}${includedir}/mtd
+ for binary in ${mtd_utils}; do
+ if [ -f $binary ]; then
+ install -m 0755 $binary ${D}${bindir}
+ fi
+ done
+ for f in ${S}/include/mtd/*.h; do
+ install -m 0644 $f ${D}${includedir}/mtd
+ done
+}
+
+mtd_utils = " docfdisk \
+ doc_loadbios \
+ flashcp \
+ flash_erase \
+ flash_eraseall \
+ flash_info \
+ flash_lock \
+ flash_otp_dump \
+ flash_otp_info \
+ flash_unlock \
+ ftl_check \
+ ftl_format \
+ jffs2dump \
+ mkfs.jffs2 \
+ mtd_debug \
+ nanddump \
+ nandtest \
+ nandwrite \
+ nftldump \
+ nftl_format \
+ recv_image \
+ rfddump \
+ rfdformat \
+ serve_image \
+ sumtool \
+ mkfs.ubifs/mkfs.ubifs \
+ ubi-utils/bin2nand \
+ ubi-utils/mkbootenv \
+ ubi-utils/nand2bin \
+ ubi-utils/pddcustomize \
+ ubi-utils/pfi2bin \
+ ubi-utils/pfiflash \
+ ubi-utils/ubigen \
+ ubi-utils/ubimirror \
+ ubi-utils/unubi \
+ ubi-utils/new-utils/ubiattach \
+ ubi-utils/new-utils/ubicrc32 \
+ ubi-utils/new-utils/ubidetach \
+ ubi-utils/new-utils/ubiformat \
+ ubi-utils/new-utils/ubimkvol \
+ ubi-utils/new-utils/ubinfo \
+ ubi-utils/new-utils/ubinize \
+ ubi-utils/new-utils/ubirmvol \
+ ubi-utils/new-utils/ubirsvol \
+ ubi-utils/new-utils/ubiupdatevol \
+ ubi-utils/ubiattach \
+ ubi-utils/ubicrc32 \
+ ubi-utils/ubidetach \
+ ubi-utils/ubiformat \
+ ubi-utils/ubimkvol \
+ ubi-utils/ubinfo \
+ ubi-utils/ubinize \
+ ubi-utils/ubirmvol \
+ ubi-utils/ubirsvol \
+ ubi-utils/ubiupdatevol \
+"
+
+PACKAGES =+ "mkfs-jffs mkfs-jffs2 mkfs-ubifs"
+FILES_mkfs-jffs = "${bindir}/mkfs.jffs"
+FILES_mkfs-jffs2 = "${bindir}/mkfs.jffs2"
+FILES_mkfs-ubifs = "${bindir}/mkfs.ubifs"
diff --git a/recipes/mtd/mtd-utils_git.bb b/recipes/mtd/mtd-utils_git.bb
new file mode 100644
index 0000000..d38fff3
--- /dev/null
+++ b/recipes/mtd/mtd-utils_git.bb
@@ -0,0 +1,16 @@
+require mtd-utils.inc
+
+DEPENDS += "util-linux-ng lzo2"
+
+PARALLEL_MAKE = ""
+ARM_INSTRUCTION_SET = "arm"
+DEFAULT_PREFERENCE = "1"
+
+# This is the default package, thus we lock to a specific git version so
+# upstream changes will not break builds.
+
+SRCREV = "7df62e8e9bb1f77ca0890cc757bd20a6f33a7fbc"
+
+SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git"
+
+S = "${WORKDIR}/git/"