diff options
| author | Enric Balletbo i Serra <eballetbo@gmail.com> | 2010-06-13 11:58:31 +0200 |
|---|---|---|
| committer | Joshua Lock <josh@linux.intel.com> | 2010-07-05 15:49:32 +0100 |
| commit | f594a1145eb5b952265a3fdf6b158ef41b148b12 (patch) | |
| tree | ee664a4bb012160ccf7611158c5b5873503b7490 /meta | |
| parent | 1d22846b489a2bbf925d9c58618ec7b8769460c6 (diff) | |
| download | poky-f594a1145eb5b952265a3fdf6b158ef41b148b12.tar.gz | |
mtd-utils: update to 1.3.1 to allow UBI support.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Diffstat (limited to 'meta')
3 files changed, 152 insertions, 0 deletions
diff --git a/meta/packages/mtd/mtd-utils-1.3.1/add-exclusion-to-mkfs-jffs2-git-2.patch b/meta/packages/mtd/mtd-utils-1.3.1/add-exclusion-to-mkfs-jffs2-git-2.patch new file mode 100644 index 0000000000..fb776fddce --- /dev/null +++ b/meta/packages/mtd/mtd-utils-1.3.1/add-exclusion-to-mkfs-jffs2-git-2.patch | |||
| @@ -0,0 +1,101 @@ | |||
| 1 | --- /tmp/mkfs.jffs2.c 2009-01-11 15:28:41.000000000 +0100 | ||
| 2 | +++ git/mkfs.jffs2.c 2009-01-11 15:59:29.000000000 +0100 | ||
| 3 | @@ -100,6 +100,11 @@ | ||
| 4 | struct rb_node hardlink_rb; | ||
| 5 | }; | ||
| 6 | |||
| 7 | +struct ignorepath_entry { | ||
| 8 | + struct ignorepath_entry* next; /* Points to the next ignorepath element */ | ||
| 9 | + char name[PATH_MAX]; /* Name of the entry */ | ||
| 10 | +}; | ||
| 11 | +static struct ignorepath_entry* ignorepath = 0; | ||
| 12 | struct rb_root hardlinks; | ||
| 13 | static int out_fd = -1; | ||
| 14 | static int in_fd = -1; | ||
| 15 | @@ -408,7 +413,7 @@ | ||
| 16 | char *hpath, *tpath; | ||
| 17 | struct dirent *dp, **namelist; | ||
| 18 | struct filesystem_entry *entry; | ||
| 19 | - | ||
| 20 | + struct ignorepath_entry* element = ignorepath; | ||
| 21 | |||
| 22 | if (lstat(hostpath, &sb)) { | ||
| 23 | perror_msg_and_die("%s", hostpath); | ||
| 24 | @@ -417,6 +422,15 @@ | ||
| 25 | entry = add_host_filesystem_entry(targetpath, hostpath, | ||
| 26 | sb.st_uid, sb.st_gid, sb.st_mode, 0, parent); | ||
| 27 | |||
| 28 | + while ( element ) { | ||
| 29 | + if ( strcmp( element->name, targetpath ) == 0 ) { | ||
| 30 | + printf( "Note: ignoring directories below '%s'\n", targetpath ); | ||
| 31 | + return entry; | ||
| 32 | + break; | ||
| 33 | + } | ||
| 34 | + element = element->next; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | n = scandir(hostpath, &namelist, 0, alphasort); | ||
| 38 | if (n < 0) { | ||
| 39 | perror_msg_and_die("opening directory %s", hostpath); | ||
| 40 | @@ -1453,6 +1467,7 @@ | ||
| 41 | {"root", 1, NULL, 'r'}, | ||
| 42 | {"pagesize", 1, NULL, 's'}, | ||
| 43 | {"eraseblock", 1, NULL, 'e'}, | ||
| 44 | + {"ignore", 1, NULL, 'I'}, | ||
| 45 | {"output", 1, NULL, 'o'}, | ||
| 46 | {"help", 0, NULL, 'h'}, | ||
| 47 | {"verbose", 0, NULL, 'v'}, | ||
| 48 | @@ -1500,6 +1515,7 @@ | ||
| 49 | " -L, --list-compressors Show the list of the avaiable compressors\n" | ||
| 50 | " -t, --test-compression Call decompress and compare with the original (for test)\n" | ||
| 51 | " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n" | ||
| 52 | +" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n" | ||
| 53 | " -o, --output=FILE Output to FILE (default: stdout)\n" | ||
| 54 | " -l, --little-endian Create a little-endian filesystem\n" | ||
| 55 | " -b, --big-endian Create a big-endian filesystem\n" | ||
| 56 | @@ -1666,6 +1682,7 @@ | ||
| 57 | char *compr_name = NULL; | ||
| 58 | int compr_prior = -1; | ||
| 59 | int warn_page_size = 0; | ||
| 60 | + struct ignorepath_entry* element = ignorepath; | ||
| 61 | |||
| 62 | page_size = sysconf(_SC_PAGESIZE); | ||
| 63 | if (page_size < 0) /* System doesn't know so ... */ | ||
| 64 | @@ -1676,7 +1693,7 @@ | ||
| 65 | jffs2_compressors_init(); | ||
| 66 | |||
| 67 | while ((opt = getopt_long(argc, argv, | ||
| 68 | - "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) | ||
| 69 | + "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) | ||
| 70 | { | ||
| 71 | switch (opt) { | ||
| 72 | case 'D': | ||
| 73 | @@ -1700,6 +1717,28 @@ | ||
| 74 | warn_page_size = 0; /* set by user, so don't need to warn */ | ||
| 75 | break; | ||
| 76 | |||
| 77 | + case 'I': | ||
| 78 | + printf( "Note: Adding '%s' to ignore Path\n", optarg ); | ||
| 79 | + element = ignorepath; | ||
| 80 | + if ( !ignorepath ) { | ||
| 81 | + ignorepath = xmalloc( sizeof( struct ignorepath_entry ) ); | ||
| 82 | + ignorepath->next = 0; | ||
| 83 | + strcpy( &ignorepath->name[0], optarg ); | ||
| 84 | + } else { | ||
| 85 | + while ( element->next ) element = element->next; | ||
| 86 | + element->next = xmalloc( sizeof( struct ignorepath_entry ) ); | ||
| 87 | + element->next->next = 0; | ||
| 88 | + strcpy( &element->next->name[0], optarg ); | ||
| 89 | + } | ||
| 90 | + printf( "--------- Dumping ignore path list ----------------\n" ); | ||
| 91 | + element = ignorepath; | ||
| 92 | + while ( element ) { | ||
| 93 | + printf( " * '%s'\n", &element->name[0] ); | ||
| 94 | + element = element->next; | ||
| 95 | + } | ||
| 96 | + printf( "---------------------------------------------------\n" ); | ||
| 97 | + break; | ||
| 98 | + | ||
| 99 | case 'o': | ||
| 100 | if (out_fd != -1) { | ||
| 101 | error_msg_and_die("output filename specified more than once"); | ||
diff --git a/meta/packages/mtd/mtd-utils-1.3.1/add-oobsize-64-and-writesize-4096-as-normal-nand.patch b/meta/packages/mtd/mtd-utils-1.3.1/add-oobsize-64-and-writesize-4096-as-normal-nand.patch new file mode 100644 index 0000000000..64f25f79e1 --- /dev/null +++ b/meta/packages/mtd/mtd-utils-1.3.1/add-oobsize-64-and-writesize-4096-as-normal-nand.patch | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | Index: git/nanddump.c | ||
| 2 | =================================================================== | ||
| 3 | --- git.orig/nanddump.c 2010-04-29 10:24:15.000000000 +0200 | ||
| 4 | +++ git/nanddump.c 2010-04-29 10:28:45.000000000 +0200 | ||
| 5 | @@ -210,6 +210,7 @@ | ||
| 6 | |||
| 7 | /* Make sure device page sizes are valid */ | ||
| 8 | if (!(meminfo.oobsize == 128 && meminfo.writesize == 4096) && | ||
| 9 | + !(meminfo.oobsize == 64 && meminfo.writesize == 4096) && | ||
| 10 | !(meminfo.oobsize == 64 && meminfo.writesize == 2048) && | ||
| 11 | !(meminfo.oobsize == 32 && meminfo.writesize == 1024) && | ||
| 12 | !(meminfo.oobsize == 16 && meminfo.writesize == 512) && | ||
| 13 | Index: git/nandwrite.c | ||
| 14 | =================================================================== | ||
| 15 | --- git.orig/nandwrite.c 2010-04-29 09:59:30.000000000 +0200 | ||
| 16 | +++ git/nandwrite.c 2010-04-29 10:27:51.000000000 +0200 | ||
| 17 | @@ -294,6 +294,7 @@ | ||
| 18 | if (!(meminfo.oobsize == 16 && meminfo.writesize == 512) && | ||
| 19 | !(meminfo.oobsize == 8 && meminfo.writesize == 256) && | ||
| 20 | !(meminfo.oobsize == 64 && meminfo.writesize == 2048) && | ||
| 21 | + !(meminfo.oobsize == 64 && meminfo.writesize == 4096) && | ||
| 22 | !(meminfo.oobsize == 128 && meminfo.writesize == 4096)) { | ||
| 23 | fprintf(stderr, "Unknown flash (not normal NAND)\n"); | ||
| 24 | close(fd); | ||
diff --git a/meta/packages/mtd/mtd-utils_1.3.1.bb b/meta/packages/mtd/mtd-utils_1.3.1.bb new file mode 100644 index 0000000000..909b28b21c --- /dev/null +++ b/meta/packages/mtd/mtd-utils_1.3.1.bb | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | DESCRIPTION = "Tools for managing memory technology devices." | ||
| 2 | SECTION = "base" | ||
| 3 | DEPENDS = "zlib lzo e2fsprogs util-linux" | ||
| 4 | HOMEPAGE = "http://www.linux-mtd.infradead.org/" | ||
| 5 | LICENSE = "GPLv2" | ||
| 6 | |||
| 7 | SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=v${PV} \ | ||
| 8 | file://add-exclusion-to-mkfs-jffs2-git-2.patch;patch=1 \ | ||
| 9 | file://fix-ignoreerrors-git.patch;patch=1 \ | ||
| 10 | file://add-oobsize-64-and-writesize-4096-as-normal-nand.patch;patch=1" | ||
| 11 | |||
| 12 | S = "${WORKDIR}/git/" | ||
| 13 | |||
| 14 | EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'" | ||
| 15 | |||
| 16 | do_install () { | ||
| 17 | oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} | ||
| 18 | install -d ${D}${includedir}/mtd/ | ||
| 19 | for f in ${S}/include/mtd/*.h; do | ||
| 20 | install -m 0644 $f ${D}${includedir}/mtd/ | ||
| 21 | done | ||
| 22 | } | ||
| 23 | |||
| 24 | PARALLEL_MAKE = "" | ||
| 25 | |||
| 26 | BBCLASSEXTEND = "native" | ||
| 27 | NATIVE_INSTALL_WORKS = "1" | ||
