From 709c4d66e0b107ca606941b988bad717c0b45d9b Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 17 Mar 2009 14:32:59 -0400 Subject: rename packages/ to recipes/ per earlier agreement See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko Acked-by: Mike Westerhof Acked-by: Philip Balister Acked-by: Khem Raj Acked-by: Marcin Juszkiewicz Acked-by: Koen Kooi Acked-by: Frans Meulenbroeks --- recipes/mtd/mtd-utils-native.inc | 13 +++ recipes/mtd/mtd-utils-native_1.0.0+git.bb | 3 + recipes/mtd/mtd-utils-native_1.0.0.bb | 2 + recipes/mtd/mtd-utils-native_1.1.0.bb | 5 + recipes/mtd/mtd-utils-native_1.2.0+git.bb | 6 ++ recipes/mtd/mtd-utils-tests_1.0.0+git.bb | 59 ++++++++++++ .../add-exclusion-to-mkfs-jffs2-git-2.patch | 101 ++++++++++++++++++++ .../add-exclusion-to-mkfs-jffs2-git.patch | 106 +++++++++++++++++++++ recipes/mtd/mtd-utils/fix-ignoreerrors-git.patch | 26 +++++ recipes/mtd/mtd-utils/lzo_1x-git.patch | 13 +++ recipes/mtd/mtd-utils/lzo_1x.patch | 26 +++++ recipes/mtd/mtd-utils_1.0.0+git.bb | 51 ++++++++++ recipes/mtd/mtd-utils_1.0.0.bb | 19 ++++ recipes/mtd/mtd-utils_1.1.0.bb | 45 +++++++++ recipes/mtd/mtd-utils_1.2.0+git.bb | 102 ++++++++++++++++++++ 15 files changed, 577 insertions(+) create mode 100644 recipes/mtd/mtd-utils-native.inc create mode 100644 recipes/mtd/mtd-utils-native_1.0.0+git.bb create mode 100644 recipes/mtd/mtd-utils-native_1.0.0.bb create mode 100644 recipes/mtd/mtd-utils-native_1.1.0.bb create mode 100644 recipes/mtd/mtd-utils-native_1.2.0+git.bb create mode 100644 recipes/mtd/mtd-utils-tests_1.0.0+git.bb create mode 100644 recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch create mode 100644 recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch create mode 100644 recipes/mtd/mtd-utils/fix-ignoreerrors-git.patch create mode 100644 recipes/mtd/mtd-utils/lzo_1x-git.patch create mode 100644 recipes/mtd/mtd-utils/lzo_1x.patch create mode 100644 recipes/mtd/mtd-utils_1.0.0+git.bb create mode 100644 recipes/mtd/mtd-utils_1.0.0.bb create mode 100644 recipes/mtd/mtd-utils_1.1.0.bb create mode 100644 recipes/mtd/mtd-utils_1.2.0+git.bb (limited to 'recipes/mtd') diff --git a/recipes/mtd/mtd-utils-native.inc b/recipes/mtd/mtd-utils-native.inc new file mode 100644 index 0000000000..28696b46d5 --- /dev/null +++ b/recipes/mtd/mtd-utils-native.inc @@ -0,0 +1,13 @@ +inherit native +DEPENDS = "zlib-native lzo-native" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/mtd-utils" + +do_stage () { + install -d ${STAGING_INCDIR}/mtd + for f in ${S}/include/mtd/*.h; do + install -m 0644 $f ${STAGING_INCDIR}/mtd/ + done + for binary in ${mtd_utils}; do + install -m 0755 $binary ${STAGING_BINDIR} + done +} diff --git a/recipes/mtd/mtd-utils-native_1.0.0+git.bb b/recipes/mtd/mtd-utils-native_1.0.0+git.bb new file mode 100644 index 0000000000..6e310cb1b4 --- /dev/null +++ b/recipes/mtd/mtd-utils-native_1.0.0+git.bb @@ -0,0 +1,3 @@ +require mtd-utils_${PV}.bb +require mtd-utils-native.inc + diff --git a/recipes/mtd/mtd-utils-native_1.0.0.bb b/recipes/mtd/mtd-utils-native_1.0.0.bb new file mode 100644 index 0000000000..6f9d71e10c --- /dev/null +++ b/recipes/mtd/mtd-utils-native_1.0.0.bb @@ -0,0 +1,2 @@ +require mtd-utils_${PV}.bb +require mtd-utils-native.inc diff --git a/recipes/mtd/mtd-utils-native_1.1.0.bb b/recipes/mtd/mtd-utils-native_1.1.0.bb new file mode 100644 index 0000000000..2b8d925c90 --- /dev/null +++ b/recipes/mtd/mtd-utils-native_1.1.0.bb @@ -0,0 +1,5 @@ +# scheduled to enable 15-03-2008 +DEFAULT_PREFERENCE = "-1" + +require mtd-utils_${PV}.bb +require mtd-utils-native.inc diff --git a/recipes/mtd/mtd-utils-native_1.2.0+git.bb b/recipes/mtd/mtd-utils-native_1.2.0+git.bb new file mode 100644 index 0000000000..6135d7f4d0 --- /dev/null +++ b/recipes/mtd/mtd-utils-native_1.2.0+git.bb @@ -0,0 +1,6 @@ +# Doesn't build for everyone, errors range from missing includes to linking errors +DEFAULT_PREFERENCE = "-1" + +require mtd-utils_${PV}.bb +require mtd-utils-native.inc +DEPENDS += "e2fsprogs-libs-native" diff --git a/recipes/mtd/mtd-utils-tests_1.0.0+git.bb b/recipes/mtd/mtd-utils-tests_1.0.0+git.bb new file mode 100644 index 0000000000..b5240009a7 --- /dev/null +++ b/recipes/mtd/mtd-utils-tests_1.0.0+git.bb @@ -0,0 +1,59 @@ +require mtd-utils_1.0.0+git.bb + +# this can probably be integrated into the main mtd-utils package +# but I did not want to risk breakage -- but would be glad to +# integrate them if that is best -- cbrake + +SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=${TAG}" + +PR = "r1" + +S = "${WORKDIR}/git/tests/fs-tests" + +FILES_${PN} = "${datadir}/mtd-utils" + +do_compile () { + make || die "Make failed" +} + +do_stage () { +} + +INHIBIT_PACKAGE_STRIP = "1" + +mtd_utils_tests = " \ + help_all.sh \ + run_all.sh \ + integrity/integck \ + simple/ftrunc \ + simple/test_1 \ + simple/test_2 \ + stress/stress00.sh \ + stress/stress01.sh \ + stress/atoms/fwrite00 \ + stress/atoms/gcd_hupper \ + stress/atoms/pdfrun \ + stress/atoms/rmdir00 \ + stress/atoms/rndrm00 \ + stress/atoms/rndrm99 \ + stress/atoms/rndwrite00 \ + stress/atoms/stress_1 \ + stress/atoms/stress_2 \ + stress/atoms/stress_3 \ + utils/free_space \ + utils/fstest_monitor \ + " + +do_install () { + install -d ${D}${datadir}/mtd-utils/tests + install -d ${D}${datadir}/mtd-utils/tests/integrity + install -d ${D}${datadir}/mtd-utils/tests/simple + install -d ${D}${datadir}/mtd-utils/tests/stress + install -d ${D}${datadir}/mtd-utils/tests/stress/atoms + install -d ${D}${datadir}/mtd-utils/tests/utils + for app in ${mtd_utils_tests}; do + install -m 0755 $app ${D}${datadir}/mtd-utils/tests/$app + done +} + + diff --git a/recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch b/recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch new file mode 100644 index 0000000000..fb776fddce --- /dev/null +++ b/recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch @@ -0,0 +1,101 @@ +--- /tmp/mkfs.jffs2.c 2009-01-11 15:28:41.000000000 +0100 ++++ git/mkfs.jffs2.c 2009-01-11 15:59:29.000000000 +0100 +@@ -100,6 +100,11 @@ + struct rb_node hardlink_rb; + }; + ++struct ignorepath_entry { ++ struct ignorepath_entry* next; /* Points to the next ignorepath element */ ++ char name[PATH_MAX]; /* Name of the entry */ ++}; ++static struct ignorepath_entry* ignorepath = 0; + struct rb_root hardlinks; + static int out_fd = -1; + static int in_fd = -1; +@@ -408,7 +413,7 @@ + char *hpath, *tpath; + struct dirent *dp, **namelist; + struct filesystem_entry *entry; +- ++ struct ignorepath_entry* element = ignorepath; + + if (lstat(hostpath, &sb)) { + perror_msg_and_die("%s", hostpath); +@@ -417,6 +422,15 @@ + entry = add_host_filesystem_entry(targetpath, hostpath, + sb.st_uid, sb.st_gid, sb.st_mode, 0, parent); + ++ while ( element ) { ++ if ( strcmp( element->name, targetpath ) == 0 ) { ++ printf( "Note: ignoring directories below '%s'\n", targetpath ); ++ return entry; ++ break; ++ } ++ element = element->next; ++ } ++ + n = scandir(hostpath, &namelist, 0, alphasort); + if (n < 0) { + perror_msg_and_die("opening directory %s", hostpath); +@@ -1453,6 +1467,7 @@ + {"root", 1, NULL, 'r'}, + {"pagesize", 1, NULL, 's'}, + {"eraseblock", 1, NULL, 'e'}, ++ {"ignore", 1, NULL, 'I'}, + {"output", 1, NULL, 'o'}, + {"help", 0, NULL, 'h'}, + {"verbose", 0, NULL, 'v'}, +@@ -1500,6 +1515,7 @@ + " -L, --list-compressors Show the list of the avaiable compressors\n" + " -t, --test-compression Call decompress and compare with the original (for test)\n" + " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n" ++" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n" + " -o, --output=FILE Output to FILE (default: stdout)\n" + " -l, --little-endian Create a little-endian filesystem\n" + " -b, --big-endian Create a big-endian filesystem\n" +@@ -1666,6 +1682,7 @@ + char *compr_name = NULL; + int compr_prior = -1; + int warn_page_size = 0; ++ struct ignorepath_entry* element = ignorepath; + + page_size = sysconf(_SC_PAGESIZE); + if (page_size < 0) /* System doesn't know so ... */ +@@ -1676,7 +1693,7 @@ + jffs2_compressors_init(); + + while ((opt = getopt_long(argc, argv, +- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) ++ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) + { + switch (opt) { + case 'D': +@@ -1700,6 +1717,28 @@ + warn_page_size = 0; /* set by user, so don't need to warn */ + break; + ++ case 'I': ++ printf( "Note: Adding '%s' to ignore Path\n", optarg ); ++ element = ignorepath; ++ if ( !ignorepath ) { ++ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) ); ++ ignorepath->next = 0; ++ strcpy( &ignorepath->name[0], optarg ); ++ } else { ++ while ( element->next ) element = element->next; ++ element->next = xmalloc( sizeof( struct ignorepath_entry ) ); ++ element->next->next = 0; ++ strcpy( &element->next->name[0], optarg ); ++ } ++ printf( "--------- Dumping ignore path list ----------------\n" ); ++ element = ignorepath; ++ while ( element ) { ++ printf( " * '%s'\n", &element->name[0] ); ++ element = element->next; ++ } ++ printf( "---------------------------------------------------\n" ); ++ break; ++ + case 'o': + if (out_fd != -1) { + error_msg_and_die("output filename specified more than once"); diff --git a/recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch b/recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch new file mode 100644 index 0000000000..5504a11e8a --- /dev/null +++ b/recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch @@ -0,0 +1,106 @@ +--- + mkfs.jffs2.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 42 insertions(+), 3 deletions(-) + +Index: git/mkfs.jffs2.c +=================================================================== +--- git.orig/mkfs.jffs2.c 2007-01-23 15:42:34.000000000 +0000 ++++ git/mkfs.jffs2.c 2007-01-23 15:46:08.000000000 +0000 +@@ -97,7 +97,12 @@ struct filesystem_entry { + struct filesystem_entry *files; /* Only relevant to directories */ + }; + +- ++struct ignorepath_entry { ++ struct ignorepath_entry* next; /* Points to the next ignorepath element */ ++ char name[PATH_MAX]; /* Name of the entry */ ++}; ++ ++static struct ignorepath_entry* ignorepath = 0; + static int out_fd = -1; + static int in_fd = -1; + static char default_rootdir[] = "."; +@@ -372,7 +377,7 @@ static struct filesystem_entry *recursiv + char *hpath, *tpath; + struct dirent *dp, **namelist; + struct filesystem_entry *entry; +- ++ struct ignorepath_entry* element = ignorepath; + + if (lstat(hostpath, &sb)) { + perror_msg_and_die("%s", hostpath); +@@ -381,6 +386,15 @@ static struct filesystem_entry *recursiv + entry = add_host_filesystem_entry(targetpath, hostpath, + sb.st_uid, sb.st_gid, sb.st_mode, 0, parent); + ++ while ( element ) { ++ if ( strcmp( element->name, targetpath ) == 0 ) { ++ printf( "Note: ignoring directories below '%s'\n", targetpath ); ++ return entry; ++ break; ++ } ++ element = element->next; ++ } ++ + n = scandir(hostpath, &namelist, 0, alphasort); + if (n < 0) { + perror_msg_and_die("opening directory %s", hostpath); +@@ -1405,6 +1419,7 @@ static struct option long_options[] = { + {"root", 1, NULL, 'r'}, + {"pagesize", 1, NULL, 's'}, + {"eraseblock", 1, NULL, 'e'}, ++ {"ignore", 1, NULL, 'I'}, + {"output", 1, NULL, 'o'}, + {"help", 0, NULL, 'h'}, + {"verbose", 0, NULL, 'v'}, +@@ -1452,6 +1467,7 @@ static char *helptext = + " -L, --list-compressors Show the list of the avaiable compressors\n" + " -t, --test-compression Call decompress and compare with the original (for test)\n" + " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n" ++" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n" + " -o, --output=FILE Output to FILE (default: stdout)\n" + " -l, --little-endian Create a little-endian filesystem\n" + " -b, --big-endian Create a big-endian filesystem\n" +@@ -1617,11 +1633,12 @@ int main(int argc, char **argv) + struct filesystem_entry *root; + char *compr_name = NULL; + int compr_prior = -1; ++ struct ignorepath_entry* element = ignorepath; + + jffs2_compressors_init(); + + while ((opt = getopt_long(argc, argv, +- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) ++ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) + { + switch (opt) { + case 'D': +@@ -1644,6 +1661,28 @@ int main(int argc, char **argv) + page_size = strtol(optarg, NULL, 0); + break; + ++ case 'I': ++ printf( "Note: Adding '%s' to ignore Path\n", optarg ); ++ element = ignorepath; ++ if ( !ignorepath ) { ++ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) ); ++ ignorepath->next = 0; ++ strcpy( &ignorepath->name[0], optarg ); ++ } else { ++ while ( element->next ) element = element->next; ++ element->next = xmalloc( sizeof( struct ignorepath_entry ) ); ++ element->next->next = 0; ++ strcpy( &element->next->name[0], optarg ); ++ } ++ printf( "--------- Dumping ignore path list ----------------\n" ); ++ element = ignorepath; ++ while ( element ) { ++ printf( " * '%s'\n", &element->name[0] ); ++ element = element->next; ++ } ++ printf( "---------------------------------------------------\n" ); ++ break; ++ + case 'o': + if (out_fd != -1) { + error_msg_and_die("output filename specified more than once"); diff --git a/recipes/mtd/mtd-utils/fix-ignoreerrors-git.patch b/recipes/mtd/mtd-utils/fix-ignoreerrors-git.patch new file mode 100644 index 0000000000..bec60a18c1 --- /dev/null +++ b/recipes/mtd/mtd-utils/fix-ignoreerrors-git.patch @@ -0,0 +1,26 @@ +--- + nanddump.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: git/nanddump.c +=================================================================== +--- git.orig/nanddump.c 2007-01-23 15:42:34.000000000 +0000 ++++ git/nanddump.c 2007-01-23 15:47:57.000000000 +0000 +@@ -281,7 +281,7 @@ int main(int argc, char **argv) + } + } + +- if (badblock) { ++ if (badblock && !ignoreerrors) { + if (omitbad) + continue; + memset (readbuf, 0xff, bs); +@@ -335,7 +335,7 @@ int main(int argc, char **argv) + if (omitoob) + continue; + +- if (badblock) { ++ if (badblock && !ignoreerrors) { + memset (readbuf, 0xff, meminfo.oobsize); + } else { + /* Read OOB data and exit on failure */ diff --git a/recipes/mtd/mtd-utils/lzo_1x-git.patch b/recipes/mtd/mtd-utils/lzo_1x-git.patch new file mode 100644 index 0000000000..e5306875da --- /dev/null +++ b/recipes/mtd/mtd-utils/lzo_1x-git.patch @@ -0,0 +1,13 @@ +Index: git/compr_lzo.c +=================================================================== +--- git.orig/compr_lzo.c ++++ git/compr_lzo.c +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include + #include "compr.h" + + extern int page_size; diff --git a/recipes/mtd/mtd-utils/lzo_1x.patch b/recipes/mtd/mtd-utils/lzo_1x.patch new file mode 100644 index 0000000000..b882d9f504 --- /dev/null +++ b/recipes/mtd/mtd-utils/lzo_1x.patch @@ -0,0 +1,26 @@ +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -60,7 +60,7 @@ $(BUILDDIR)/mkfs.jffs2: $(BUILDDIR)/crc3 + $(BUILDDIR)/compr_zlib.o \ + $(BUILDDIR)/compr_lzo.o \ + $(BUILDDIR)/compr.o +- $(CC) $(LDFLAGS) -o $@ $^ -lz -llzo2 ++ $(CC) $(LDFLAGS) -o $@ $^ -lz -llzo + + $(BUILDDIR)/flash_eraseall: $(BUILDDIR)/crc32.o $(BUILDDIR)/flash_eraseall.o + $(CC) $(LDFLAGS) -o $@ $^ +Index: git/compr_lzo.c +=================================================================== +--- git.orig/compr_lzo.c ++++ git/compr_lzo.c +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include + #include "compr.h" + + extern int page_size; diff --git a/recipes/mtd/mtd-utils_1.0.0+git.bb b/recipes/mtd/mtd-utils_1.0.0+git.bb new file mode 100644 index 0000000000..b325bb03d3 --- /dev/null +++ b/recipes/mtd/mtd-utils_1.0.0+git.bb @@ -0,0 +1,51 @@ +DESCRIPTION = "Tools for managing memory technology devices." +SECTION = "base" +DEPENDS = "zlib lzo" +HOMEPAGE = "http://www.linux-mtd.infradead.org/" +LICENSE = "GPLv2" +PR = "r8" + +# This is the default package, thus we lock to a specific git version so +# upstream changes will not break builds. + +TAG = "9845d92440bd87739c89edd000fd6e0c47fab185" +# As of 2007/27/07, see http://git.infradead.org/?p=mtd-utils.git;a=shortlog + +SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=${TAG} \ + file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \ + file://fix-ignoreerrors-git.patch;patch=1 \ + file://lzo_1x.patch;patch=1" + +S = "${WORKDIR}/git/" + +EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR'" + +do_stage () { + install -d ${STAGING_INCDIR}/mtd + for f in ${S}/include/mtd/*.h; do + install -m 0644 $f ${STAGING_INCDIR}/mtd/ + done + for binary in ${mtd_utils}; do + install -m 0755 $binary ${STAGING_BINDIR} + done +} + +mtd_utils = "ftl_format flash_erase flash_eraseall nanddump doc_loadbios \ + mkfs.jffs ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info mtd_debug \ + flashcp nandwrite jffs2dump sumtool" + +do_install () { + install -d ${D}${bindir} + install -d ${D}${includedir}/mtd + for binary in ${mtd_utils}; do + install -m 0755 $binary ${D}${bindir} + done + for f in ${S}/include/mtd/*.h; do + install -m 0644 $f ${D}${includedir}/mtd + done +} + +PACKAGES =+ "mkfs-jffs mkfs-jffs2" +FILES_mkfs-jffs = "${bindir}/mkfs.jffs" +FILES_mkfs-jffs2 = "${bindir}/mkfs.jffs2" + diff --git a/recipes/mtd/mtd-utils_1.0.0.bb b/recipes/mtd/mtd-utils_1.0.0.bb new file mode 100644 index 0000000000..0ebb47fb22 --- /dev/null +++ b/recipes/mtd/mtd-utils_1.0.0.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Tools for managing memory technology devices." +SECTION = "base" +DEPENDS = "zlib" +HOMEPAGE = "http://www.linux-mtd.infradead.org/" +LICENSE = "GPLv2" +PR = "r0" + +# RP/kergoth: Builds seem to break with recent mtd-utils +# Can't pin down the exact problems +DEFAULT_PREFERENCE = "-1" + +SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.0.0.tar.gz" +S = "${WORKDIR}/mtd-utils-${PV}" + +CFLAGS_prepend = "-I${WORKDIR}/mtd-utils-${PV}/include " + +do_install() { + oe_runmake install DESTDIR=${D} +} diff --git a/recipes/mtd/mtd-utils_1.1.0.bb b/recipes/mtd/mtd-utils_1.1.0.bb new file mode 100644 index 0000000000..e585cf5ab8 --- /dev/null +++ b/recipes/mtd/mtd-utils_1.1.0.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "Tools for managing memory technology devices." +SECTION = "base" +DEPENDS = "zlib lzo" +HOMEPAGE = "http://www.linux-mtd.infradead.org/" +LICENSE = "GPLv2" +PR = "r3" + +SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.bz2 \ + file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \ + file://fix-ignoreerrors-git.patch;patch=1 \ + file://lzo_1x.patch;patch=1" + +S = "${WORKDIR}/mtd-utils-${PV}/" + +EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR'" + +do_stage () { + install -d ${STAGING_INCDIR}/mtd + for f in ${S}/include/mtd/*.h; do + install -m 0644 $f ${STAGING_INCDIR}/mtd/ + done + for binary in ${mtd_utils}; do + install -m 0755 $binary ${STAGING_BINDIR} + done +} + +mtd_utils = "ftl_format flash_erase flash_eraseall nanddump doc_loadbios \ + mkfs.jffs ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info mtd_debug \ + flashcp nandwrite jffs2dump sumtool" + +do_install () { + install -d ${D}${bindir} + install -d ${D}${includedir}/mtd + for binary in ${mtd_utils}; do + install -m 0755 $binary ${D}${bindir} + done + for f in ${S}/include/mtd/*.h; do + install -m 0644 $f ${D}${includedir}/mtd + done +} + +PACKAGES =+ "mkfs-jffs mkfs-jffs2" +FILES_mkfs-jffs = "${bindir}/mkfs.jffs" +FILES_mkfs-jffs2 = "${bindir}/mkfs.jffs2" + diff --git a/recipes/mtd/mtd-utils_1.2.0+git.bb b/recipes/mtd/mtd-utils_1.2.0+git.bb new file mode 100644 index 0000000000..04b8b29ce8 --- /dev/null +++ b/recipes/mtd/mtd-utils_1.2.0+git.bb @@ -0,0 +1,102 @@ +DESCRIPTION = "Tools for managing memory technology devices." +SECTION = "base" +DEPENDS = "e2fsprogs-libs zlib lzo" +HOMEPAGE = "http://www.linux-mtd.infradead.org/" +LICENSE = "GPLv2" +PR = "r3" + +ARM_INSTRUCTION_SET = "arm" + +# This is the default package, thus we lock to a specific git version so +# upstream changes will not break builds. + +TAG = "ea429635388f7bb53f62c41ec3d5ccf5fa207370" + +SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=${TAG} \ + file://add-exclusion-to-mkfs-jffs2-git-2.patch;patch=1 \ + file://fix-ignoreerrors-git.patch;patch=1 \ + file://lzo_1x-git.patch;patch=1" + +S = "${WORKDIR}/git/" + +EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR'" + +do_configure_prepend() { + for i in $(find . -name "Makefile") ; do + sed -i -e s:lzo2:lzo:g $i + done + sed -i -e s:lzo/::g mkfs.ubifs/compr.c +} + +do_stage () { + install -d ${STAGING_INCDIR}/mtd + for f in ${S}/include/mtd/*.h; do + install -m 0644 $f ${STAGING_INCDIR}/mtd/ + done + for binary in ${mtd_utils}; do + install -m 0755 $binary ${STAGING_BINDIR} + 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/ubiupdatevol" + + + +do_install () { + install -d ${D}${bindir} + install -d ${D}${includedir}/mtd + for binary in ${mtd_utils}; do + install -m 0755 $binary ${D}${bindir} + done + for f in ${S}/include/mtd/*.h; do + install -m 0644 $f ${D}${includedir}/mtd + done +} + +PACKAGES =+ "mkfs-jffs mkfs-jffs2" +FILES_mkfs-jffs = "${bindir}/mkfs.jffs" +FILES_mkfs-jffs2 = "${bindir}/mkfs.jffs2" + -- cgit 1.2.3-korg