From 51a2478b5542b2a1315c98d3f807535b9f0c46d2 Mon Sep 17 00:00:00 2001 From: Lauren Post Date: Fri, 7 Mar 2014 15:52:43 -0600 Subject: mtd-utils: Update version to include fixes after 1.5.0 This includes fixes on master branch not in the 1.5.0 release Signed-off-by: Lauren Post Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- .../add-exclusion-to-mkfs-jffs2-git-2.patch | 103 ---------------- ...t-cleanmarker-with-flash_erase--j-command.patch | 133 --------------------- .../add-exclusion-to-mkfs-jffs2-git-2.patch | 103 ++++++++++++++++ ...t-cleanmarker-with-flash_erase--j-command.patch | 133 +++++++++++++++++++++ meta/recipes-devtools/mtd/mtd-utils_1.5.0.bb | 32 ----- meta/recipes-devtools/mtd/mtd-utils_git.bb | 33 +++++ 6 files changed, 269 insertions(+), 268 deletions(-) delete mode 100644 meta/recipes-devtools/mtd/mtd-utils-1.5.0/add-exclusion-to-mkfs-jffs2-git-2.patch delete mode 100644 meta/recipes-devtools/mtd/mtd-utils-1.5.0/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch create mode 100644 meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch create mode 100644 meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch delete mode 100644 meta/recipes-devtools/mtd/mtd-utils_1.5.0.bb create mode 100644 meta/recipes-devtools/mtd/mtd-utils_git.bb (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/mtd/mtd-utils-1.5.0/add-exclusion-to-mkfs-jffs2-git-2.patch b/meta/recipes-devtools/mtd/mtd-utils-1.5.0/add-exclusion-to-mkfs-jffs2-git-2.patch deleted file mode 100644 index 57d6a30d82..0000000000 --- a/meta/recipes-devtools/mtd/mtd-utils-1.5.0/add-exclusion-to-mkfs-jffs2-git-2.patch +++ /dev/null @@ -1,103 +0,0 @@ -Upstream-Status: Pending - ---- /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/meta/recipes-devtools/mtd/mtd-utils-1.5.0/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch b/meta/recipes-devtools/mtd/mtd-utils-1.5.0/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch deleted file mode 100644 index a66087e301..0000000000 --- a/meta/recipes-devtools/mtd/mtd-utils-1.5.0/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch +++ /dev/null @@ -1,133 +0,0 @@ -Upstream-Status: Pending -From patchwork Mon Aug 8 08:16:43 2011 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command -Date: Sun, 07 Aug 2011 22:16:43 -0000 -From: b35362@freescale.com -X-Patchwork-Id: 108873 -Message-Id: <1312791403-13473-1-git-send-email-b35362@freescale.com> -To: -Cc: Liu Shuo , Artem.Bityutskiy@nokia.com, - Li Yang , linux-mtd@lists.infradead.org - -From: Liu Shuo - -Flash_erase -j should fill discrete freeoob areas with required bytes -of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill -the first freeoob area. - -The below is the result without this workaround: - -JFFS2: Erase block at 0x00000000 is not formatted. It will be erased -JFFS2: Erase block at 0x00004000 is not formatted. It will be erased -JFFS2: Erase block at 0x00008000 is not formatted. It will be erased -JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased -JFFS2: Erase block at 0x00010000 is not formatted. It will be erased -JFFS2: Erase block at 0x00014000 is not formatted. It will be erased -JFFS2: Erase block at 0x00018000 is not formatted. It will be erased -JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased -JFFS2: Erase block at 0x00020000 is not formatted. It will be erased -JFFS2: Erase block at 0x00024000 is not formatted. It will be erased -JFFS2: Erase block at 0x00028000 is not formatted. It will be erased -... - -Signed-off-by: Liu Shuo -Signed-off-by: Li Yang - ---- -v2 : get length of availble freeoob bytes from oobinfo information, - not use the ioctl ECCGETLAYOUT which is being deprecated. - - flash_erase.c | 46 +++++++++++++++++++++++++++++++++++++++------- - 1 files changed, 39 insertions(+), 7 deletions(-) - -diff --git a/flash_erase.c b/flash_erase.c -index fe2eaca..3e94495 100644 ---- a/flash_erase.c -+++ b/flash_erase.c -@@ -98,6 +98,7 @@ int main(int argc, char *argv[]) - int isNAND; - int error = 0; - uint64_t offset = 0; -+ void *oob_data = NULL; - - /* - * Process user arguments -@@ -197,15 +198,43 @@ int main(int argc, char *argv[]) - if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0) - return sys_errmsg("%s: unable to get NAND oobinfo", mtd_device); - -+ cleanmarker.totlen = cpu_to_je32(8); - /* Check for autoplacement */ - if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) { -- /* Get the position of the free bytes */ -- if (!oobinfo.oobfree[0][1]) -+ struct nand_ecclayout_user ecclayout; -+ int i, oobavail; -+ -+ for (i = 0, oobavail = 0; oobinfo.oobfree[i][1]; i++) -+ oobavail += oobinfo.oobfree[i][1]; -+ -+ if (!oobavail) - return errmsg(" Eeep. Autoplacement selected and no empty space in oob"); -+ -+ /* Get the position of the free bytes */ - clmpos = oobinfo.oobfree[0][0]; -- clmlen = oobinfo.oobfree[0][1]; -- if (clmlen > 8) -- clmlen = 8; -+ clmlen = MIN(oobavail, 8); -+ -+ if (oobinfo.oobfree[0][1] < 8 && oobavail >= 8) { -+ int left, n, last = 0; -+ void *cm; -+ -+ oob_data = malloc(mtd.oob_size); -+ if (!oob_data) -+ return -ENOMEM; -+ -+ memset(oob_data, 0xff, mtd.oob_size); -+ cm = &cleanmarker; -+ for (i = 0, left = clmlen; left ; i++) { -+ n = MIN(left, oobinfo.oobfree[i][1]); -+ memcpy(oob_data + oobinfo.oobfree[i][0], -+ cm, n); -+ left -= n; -+ cm += n; -+ last = oobinfo.oobfree[i][0] + n; -+ } -+ -+ clmlen = last - clmpos; -+ } - } else { - /* Legacy mode */ - switch (mtd.oob_size) { -@@ -223,7 +252,6 @@ int main(int argc, char *argv[]) - break; - } - } -- cleanmarker.totlen = cpu_to_je32(8); - } - cleanmarker.hdr_crc = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(cleanmarker) - 4)); - } -@@ -272,7 +300,8 @@ int main(int argc, char *argv[]) - - /* write cleanmarker */ - if (isNAND) { -- if (mtd_write_oob(mtd_desc, &mtd, fd, offset + clmpos, clmlen, &cleanmarker) != 0) { -+ void *data = oob_data ? oob_data + clmpos : &cleanmarker; -+ if (mtd_write_oob(mtd_desc, &mtd, fd, offset + clmpos, clmlen, data) != 0) { - sys_errmsg("%s: MTD writeoob failure", mtd_device); - continue; - } -@@ -291,5 +320,8 @@ int main(int argc, char *argv[]) - show_progress(&mtd, offset, eb, eb_start, eb_cnt); - bareverbose(!quiet, "\n"); - -+ if (oob_data) -+ free(oob_data); -+ - return 0; - } diff --git a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch new file mode 100644 index 0000000000..57d6a30d82 --- /dev/null +++ b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch @@ -0,0 +1,103 @@ +Upstream-Status: Pending + +--- /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/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch b/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch new file mode 100644 index 0000000000..a66087e301 --- /dev/null +++ b/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch @@ -0,0 +1,133 @@ +Upstream-Status: Pending +From patchwork Mon Aug 8 08:16:43 2011 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command +Date: Sun, 07 Aug 2011 22:16:43 -0000 +From: b35362@freescale.com +X-Patchwork-Id: 108873 +Message-Id: <1312791403-13473-1-git-send-email-b35362@freescale.com> +To: +Cc: Liu Shuo , Artem.Bityutskiy@nokia.com, + Li Yang , linux-mtd@lists.infradead.org + +From: Liu Shuo + +Flash_erase -j should fill discrete freeoob areas with required bytes +of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill +the first freeoob area. + +The below is the result without this workaround: + +JFFS2: Erase block at 0x00000000 is not formatted. It will be erased +JFFS2: Erase block at 0x00004000 is not formatted. It will be erased +JFFS2: Erase block at 0x00008000 is not formatted. It will be erased +JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased +JFFS2: Erase block at 0x00010000 is not formatted. It will be erased +JFFS2: Erase block at 0x00014000 is not formatted. It will be erased +JFFS2: Erase block at 0x00018000 is not formatted. It will be erased +JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased +JFFS2: Erase block at 0x00020000 is not formatted. It will be erased +JFFS2: Erase block at 0x00024000 is not formatted. It will be erased +JFFS2: Erase block at 0x00028000 is not formatted. It will be erased +... + +Signed-off-by: Liu Shuo +Signed-off-by: Li Yang + +--- +v2 : get length of availble freeoob bytes from oobinfo information, + not use the ioctl ECCGETLAYOUT which is being deprecated. + + flash_erase.c | 46 +++++++++++++++++++++++++++++++++++++++------- + 1 files changed, 39 insertions(+), 7 deletions(-) + +diff --git a/flash_erase.c b/flash_erase.c +index fe2eaca..3e94495 100644 +--- a/flash_erase.c ++++ b/flash_erase.c +@@ -98,6 +98,7 @@ int main(int argc, char *argv[]) + int isNAND; + int error = 0; + uint64_t offset = 0; ++ void *oob_data = NULL; + + /* + * Process user arguments +@@ -197,15 +198,43 @@ int main(int argc, char *argv[]) + if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0) + return sys_errmsg("%s: unable to get NAND oobinfo", mtd_device); + ++ cleanmarker.totlen = cpu_to_je32(8); + /* Check for autoplacement */ + if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) { +- /* Get the position of the free bytes */ +- if (!oobinfo.oobfree[0][1]) ++ struct nand_ecclayout_user ecclayout; ++ int i, oobavail; ++ ++ for (i = 0, oobavail = 0; oobinfo.oobfree[i][1]; i++) ++ oobavail += oobinfo.oobfree[i][1]; ++ ++ if (!oobavail) + return errmsg(" Eeep. Autoplacement selected and no empty space in oob"); ++ ++ /* Get the position of the free bytes */ + clmpos = oobinfo.oobfree[0][0]; +- clmlen = oobinfo.oobfree[0][1]; +- if (clmlen > 8) +- clmlen = 8; ++ clmlen = MIN(oobavail, 8); ++ ++ if (oobinfo.oobfree[0][1] < 8 && oobavail >= 8) { ++ int left, n, last = 0; ++ void *cm; ++ ++ oob_data = malloc(mtd.oob_size); ++ if (!oob_data) ++ return -ENOMEM; ++ ++ memset(oob_data, 0xff, mtd.oob_size); ++ cm = &cleanmarker; ++ for (i = 0, left = clmlen; left ; i++) { ++ n = MIN(left, oobinfo.oobfree[i][1]); ++ memcpy(oob_data + oobinfo.oobfree[i][0], ++ cm, n); ++ left -= n; ++ cm += n; ++ last = oobinfo.oobfree[i][0] + n; ++ } ++ ++ clmlen = last - clmpos; ++ } + } else { + /* Legacy mode */ + switch (mtd.oob_size) { +@@ -223,7 +252,6 @@ int main(int argc, char *argv[]) + break; + } + } +- cleanmarker.totlen = cpu_to_je32(8); + } + cleanmarker.hdr_crc = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(cleanmarker) - 4)); + } +@@ -272,7 +300,8 @@ int main(int argc, char *argv[]) + + /* write cleanmarker */ + if (isNAND) { +- if (mtd_write_oob(mtd_desc, &mtd, fd, offset + clmpos, clmlen, &cleanmarker) != 0) { ++ void *data = oob_data ? oob_data + clmpos : &cleanmarker; ++ if (mtd_write_oob(mtd_desc, &mtd, fd, offset + clmpos, clmlen, data) != 0) { + sys_errmsg("%s: MTD writeoob failure", mtd_device); + continue; + } +@@ -291,5 +320,8 @@ int main(int argc, char *argv[]) + show_progress(&mtd, offset, eb, eb_start, eb_cnt); + bareverbose(!quiet, "\n"); + ++ if (oob_data) ++ free(oob_data); ++ + return 0; + } diff --git a/meta/recipes-devtools/mtd/mtd-utils_1.5.0.bb b/meta/recipes-devtools/mtd/mtd-utils_1.5.0.bb deleted file mode 100644 index 94940f80fb..0000000000 --- a/meta/recipes-devtools/mtd/mtd-utils_1.5.0.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Tools for managing memory technology devices" -SECTION = "base" -DEPENDS = "zlib lzo e2fsprogs util-linux" -HOMEPAGE = "http://www.linux-mtd.infradead.org/" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ - file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" - -SRCREV = "ca39eb1d98e736109c64ff9c1aa2a6ecca222d8f" -SRC_URI = "git://git.infradead.org/mtd-utils.git \ - file://add-exclusion-to-mkfs-jffs2-git-2.patch \ - file://mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch " - -S = "${WORKDIR}/git/" - -PR = "r3" - -EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'" - -do_install () { - oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} -} - -PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc" - -FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool" -FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*" -FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image" - -PARALLEL_MAKE = "" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb new file mode 100644 index 0000000000..f1e2a8e084 --- /dev/null +++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb @@ -0,0 +1,33 @@ +SUMMARY = "Tools for managing memory technology devices" +SECTION = "base" +DEPENDS = "zlib lzo e2fsprogs util-linux" +HOMEPAGE = "http://www.linux-mtd.infradead.org/" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" + +# Use the latest version at 26 Oct, 2013 +SRCREV = "dcea43eba91642939c82739387147da26d572758" +SRC_URI = "git://git.infradead.org/mtd-utils.git \ + file://add-exclusion-to-mkfs-jffs2-git-2.patch \ +" + +PV = "1.5.0+git${SRCPV}" + +S = "${WORKDIR}/git/" + +EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'" + +do_install () { + oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} +} + +PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc" + +FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool" +FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*" +FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image" + +PARALLEL_MAKE = "" + +BBCLASSEXTEND = "native" -- cgit v1.2.3