summaryrefslogtreecommitdiffstats
path: root/meta/packages/mtd
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2008-04-09 15:04:39 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2008-04-09 15:04:39 +0000
commit26a637aed7bbed1c0c8f736b08e9ac0783823798 (patch)
treeff72be25b8935b94f2f0db4cd53d0b6fc5d462be /meta/packages/mtd
parent6c55027ce945943d8c1ccb89c3b632dfab05325d (diff)
downloadpoky-26a637aed7bbed1c0c8f736b08e9ac0783823798.tar.gz
mtd-utils: update to git HEAD
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4221 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/mtd')
-rw-r--r--meta/packages/mtd/mtd-utils-native_1.0.0.bb2
-rw-r--r--meta/packages/mtd/mtd-utils-native_1.1.0+git.bb (renamed from meta/packages/mtd/mtd-utils-native_1.0.0+git.bb)0
-rw-r--r--meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch62
-rw-r--r--meta/packages/mtd/mtd-utils/remove-ubi.patch33
-rw-r--r--meta/packages/mtd/mtd-utils_1.0.0.bb19
-rw-r--r--meta/packages/mtd/mtd-utils_1.1.0+git.bb (renamed from meta/packages/mtd/mtd-utils_1.0.0+git.bb)13
6 files changed, 84 insertions, 45 deletions
diff --git a/meta/packages/mtd/mtd-utils-native_1.0.0.bb b/meta/packages/mtd/mtd-utils-native_1.0.0.bb
deleted file mode 100644
index 6f9d71e10c..0000000000
--- a/meta/packages/mtd/mtd-utils-native_1.0.0.bb
+++ /dev/null
@@ -1,2 +0,0 @@
1require mtd-utils_${PV}.bb
2require mtd-utils-native.inc
diff --git a/meta/packages/mtd/mtd-utils-native_1.0.0+git.bb b/meta/packages/mtd/mtd-utils-native_1.1.0+git.bb
index 6f9d71e10c..6f9d71e10c 100644
--- a/meta/packages/mtd/mtd-utils-native_1.0.0+git.bb
+++ b/meta/packages/mtd/mtd-utils-native_1.1.0+git.bb
diff --git a/meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch b/meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
index 5504a11e8a..2789fcc531 100644
--- a/meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
+++ b/meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
@@ -1,26 +1,29 @@
1--- 1---
2 mkfs.jffs2.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- 2 mkfs.jffs2.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
3 1 file changed, 42 insertions(+), 3 deletions(-) 3 1 file changed, 42 insertions(+), 2 deletions(-)
4 4
5Index: git/mkfs.jffs2.c 5--- git.orig/mkfs.jffs2.c
6=================================================================== 6+++ git/mkfs.jffs2.c
7--- git.orig/mkfs.jffs2.c 2007-01-23 15:42:34.000000000 +0000 7@@ -98,10 +98,16 @@ struct filesystem_entry {
8+++ git/mkfs.jffs2.c 2007-01-23 15:46:08.000000000 +0000 8 struct filesystem_entry *next; /* Only relevant to non-directories */
9@@ -97,7 +97,12 @@ struct filesystem_entry {
10 struct filesystem_entry *files; /* Only relevant to directories */ 9 struct filesystem_entry *files; /* Only relevant to directories */
10 struct rb_node hardlink_rb;
11 }; 11 };
12 12
13-
14+struct ignorepath_entry { 13+struct ignorepath_entry {
15+ struct ignorepath_entry* next; /* Points to the next ignorepath element */ 14+ struct ignorepath_entry* next; /* Points to the next ignorepath element */
16+ char name[PATH_MAX]; /* Name of the entry */ 15+ char name[PATH_MAX]; /* Name of the entry */
17+}; 16+};
18+ 17+
19+static struct ignorepath_entry* ignorepath = 0; 18+static struct ignorepath_entry* ignorepath = 0;
19 struct rb_root hardlinks;
20 static int out_fd = -1; 20 static int out_fd = -1;
21 static int in_fd = -1; 21 static int in_fd = -1;
22 static char default_rootdir[] = "."; 22 static char default_rootdir[] = ".";
23@@ -372,7 +377,7 @@ static struct filesystem_entry *recursiv 23 static char *rootdir = default_rootdir;
24@@ -404,19 +410,28 @@ static struct filesystem_entry *recursiv
25 int i, n;
26 struct stat sb;
24 char *hpath, *tpath; 27 char *hpath, *tpath;
25 struct dirent *dp, **namelist; 28 struct dirent *dp, **namelist;
26 struct filesystem_entry *entry; 29 struct filesystem_entry *entry;
@@ -29,7 +32,8 @@ Index: git/mkfs.jffs2.c
29 32
30 if (lstat(hostpath, &sb)) { 33 if (lstat(hostpath, &sb)) {
31 perror_msg_and_die("%s", hostpath); 34 perror_msg_and_die("%s", hostpath);
32@@ -381,6 +386,15 @@ static struct filesystem_entry *recursiv 35 }
36
33 entry = add_host_filesystem_entry(targetpath, hostpath, 37 entry = add_host_filesystem_entry(targetpath, hostpath,
34 sb.st_uid, sb.st_gid, sb.st_mode, 0, parent); 38 sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
35 39
@@ -45,7 +49,11 @@ Index: git/mkfs.jffs2.c
45 n = scandir(hostpath, &namelist, 0, alphasort); 49 n = scandir(hostpath, &namelist, 0, alphasort);
46 if (n < 0) { 50 if (n < 0) {
47 perror_msg_and_die("opening directory %s", hostpath); 51 perror_msg_and_die("opening directory %s", hostpath);
48@@ -1405,6 +1419,7 @@ static struct option long_options[] = { 52 }
53
54@@ -1446,10 +1461,11 @@ static void create_target_filesystem(str
55 static struct option long_options[] = {
56 {"pad", 2, NULL, 'p'},
49 {"root", 1, NULL, 'r'}, 57 {"root", 1, NULL, 'r'},
50 {"pagesize", 1, NULL, 's'}, 58 {"pagesize", 1, NULL, 's'},
51 {"eraseblock", 1, NULL, 'e'}, 59 {"eraseblock", 1, NULL, 'e'},
@@ -53,7 +61,11 @@ Index: git/mkfs.jffs2.c
53 {"output", 1, NULL, 'o'}, 61 {"output", 1, NULL, 'o'},
54 {"help", 0, NULL, 'h'}, 62 {"help", 0, NULL, 'h'},
55 {"verbose", 0, NULL, 'v'}, 63 {"verbose", 0, NULL, 'v'},
56@@ -1452,6 +1467,7 @@ static char *helptext = 64 {"version", 0, NULL, 'V'},
65 {"big-endian", 0, NULL, 'b'},
66@@ -1493,10 +1509,11 @@ static char *helptext =
67 " -y, --compressor-priority=PRIORITY:COMPRESSOR_NAME\n"
68 " Set the priority of a compressor\n"
57 " -L, --list-compressors Show the list of the avaiable compressors\n" 69 " -L, --list-compressors Show the list of the avaiable compressors\n"
58 " -t, --test-compression Call decompress and compare with the original (for test)\n" 70 " -t, --test-compression Call decompress and compare with the original (for test)\n"
59 " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n" 71 " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
@@ -61,22 +73,36 @@ Index: git/mkfs.jffs2.c
61 " -o, --output=FILE Output to FILE (default: stdout)\n" 73 " -o, --output=FILE Output to FILE (default: stdout)\n"
62 " -l, --little-endian Create a little-endian filesystem\n" 74 " -l, --little-endian Create a little-endian filesystem\n"
63 " -b, --big-endian Create a big-endian filesystem\n" 75 " -b, --big-endian Create a big-endian filesystem\n"
64@@ -1617,11 +1633,12 @@ int main(int argc, char **argv) 76 " -D, --devtable=FILE Use the named FILE as a device table file\n"
77 " -f, --faketime Change all file times to '0' for regression testing\n"
78@@ -1659,21 +1676,22 @@ int main(int argc, char **argv)
79 FILE *devtable = NULL;
65 struct filesystem_entry *root; 80 struct filesystem_entry *root;
66 char *compr_name = NULL; 81 char *compr_name = NULL;
67 int compr_prior = -1; 82 int compr_prior = -1;
68+ struct ignorepath_entry* element = ignorepath; 83 int warn_page_size = 0;
84+ struct ignorepath_entry* element = ignorepath;
69 85
70 jffs2_compressors_init(); 86 jffs2_compressors_init();
71 87
88 page_size = sysconf(_SC_PAGESIZE);
89 if (page_size < 0) /* System doesn't know so ... */
90 page_size = 4096; /* ... we make an educated guess */
91 if (page_size != 4096)
92 warn_page_size = 1; /* warn user if page size not 4096 */
93
72 while ((opt = getopt_long(argc, argv, 94 while ((opt = getopt_long(argc, argv,
73- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) 95- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
74+ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) 96+ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
75 { 97 {
76 switch (opt) { 98 switch (opt) {
77 case 'D': 99 case 'D':
78@@ -1644,6 +1661,28 @@ int main(int argc, char **argv) 100 devtable = xfopen(optarg, "r");
101 if (fstat(fileno(devtable), &sb) < 0)
102@@ -1693,10 +1711,32 @@ int main(int argc, char **argv)
103 case 's':
79 page_size = strtol(optarg, NULL, 0); 104 page_size = strtol(optarg, NULL, 0);
105 warn_page_size = 0; /* set by user, so don't need to warn */
80 break; 106 break;
81 107
82+ case 'I': 108+ case 'I':
@@ -104,3 +130,5 @@ Index: git/mkfs.jffs2.c
104 case 'o': 130 case 'o':
105 if (out_fd != -1) { 131 if (out_fd != -1) {
106 error_msg_and_die("output filename specified more than once"); 132 error_msg_and_die("output filename specified more than once");
133 }
134 out_fd = open(optarg, O_CREAT | O_TRUNC | O_RDWR, 0644);
diff --git a/meta/packages/mtd/mtd-utils/remove-ubi.patch b/meta/packages/mtd/mtd-utils/remove-ubi.patch
new file mode 100644
index 0000000000..a788fd0fd5
--- /dev/null
+++ b/meta/packages/mtd/mtd-utils/remove-ubi.patch
@@ -0,0 +1,33 @@
1---
2 Makefile | 3 ---
3 1 file changed, 3 deletions(-)
4
5--- git.orig/Makefile
6+++ git/Makefile
7@@ -41,19 +41,17 @@ $(BUILDDIR)/%.o: %.c
8 $(CC) $(CFLAGS) -g -c -o $@ $< -g -Wp,-MD,$(BUILDDIR)/.$(<F).dep
9
10 .SUFFIXES:
11
12 all: $(TARGETS)
13- make -C $(BUILDDIR)/ubi-utils
14
15 IGNORE=${wildcard $(BUILDDIR)/.*.c.dep}
16 -include ${IGNORE}
17
18 clean:
19 rm -f $(BUILDDIR)/*.o $(TARGETS) $(BUILDDIR)/.*.c.dep $(SYMLINKS)
20 if [ "$(BUILDDIR)x" != ".x" ]; then rm -rf $(BUILDDIR); fi
21- make -C $(BUILDDIR)/ubi-utils clean
22
23 $(SYMLINKS):
24 ln -sf ../fs/jffs2/$@ $@
25
26 $(BUILDDIR)/mkfs.jffs2: $(BUILDDIR)/crc32.o \
27@@ -91,6 +89,5 @@ $(BUILDDIR)/fectest: $(BUILDDIR)/fectest
28 install: ${TARGETS}
29 mkdir -p ${DESTDIR}/${SBINDIR}
30 install -m0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/
31 mkdir -p ${DESTDIR}/${MANDIR}/man1
32 gzip -c mkfs.jffs2.1 > ${DESTDIR}/${MANDIR}/man1/mkfs.jffs2.1.gz
33- make -C $(BUILDDIR)/ubi-utils install
diff --git a/meta/packages/mtd/mtd-utils_1.0.0.bb b/meta/packages/mtd/mtd-utils_1.0.0.bb
deleted file mode 100644
index 9c493298f6..0000000000
--- a/meta/packages/mtd/mtd-utils_1.0.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
1DESCRIPTION = "Tools for managing memory technology devices."
2SECTION = "base"
3DEPENDS = "zlib"
4HOMEPAGE = "http://www.linux-mtd.infradead.org/"
5LICENSE = "GPLv2"
6PR = "r1"
7
8# RP/kergoth: Builds seem to break with recent mtd-utils
9# Can't pin down the exact problems
10DEFAULT_PREFERENCE = "-1"
11
12SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.0.0.tar.gz"
13S = "${WORKDIR}/mtd-utils-${PV}"
14
15CFLAGS_prepend = "-I${WORKDIR}/mtd-utils-${PV}/include "
16
17do_install() {
18 oe_runmake install DESTDIR=${D}
19}
diff --git a/meta/packages/mtd/mtd-utils_1.0.0+git.bb b/meta/packages/mtd/mtd-utils_1.1.0+git.bb
index 81eaefad74..ce1477ee70 100644
--- a/meta/packages/mtd/mtd-utils_1.0.0+git.bb
+++ b/meta/packages/mtd/mtd-utils_1.1.0+git.bb
@@ -3,10 +3,10 @@ SECTION = "base"
3DEPENDS = "zlib lzo" 3DEPENDS = "zlib lzo"
4HOMEPAGE = "http://www.linux-mtd.infradead.org/" 4HOMEPAGE = "http://www.linux-mtd.infradead.org/"
5LICENSE = "GPLv2" 5LICENSE = "GPLv2"
6PR = "r6"
7 6
8SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=2a032bca585e27ceb0f293905718b416bc297ce2 \ 7SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=e6088d987c545d60a86e1f44836ab8ba072fffd9 \
9 file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \ 8 file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \
9 file://remove-ubi.patch;patch=1 \
10 file://fix-ignoreerrors-git.patch;patch=1" 10 file://fix-ignoreerrors-git.patch;patch=1"
11 11
12S = "${WORKDIR}/git/" 12S = "${WORKDIR}/git/"
@@ -24,12 +24,11 @@ do_stage () {
24} 24}
25 25
26mtd_utils = "ftl_format flash_erase flash_eraseall nanddump doc_loadbios \ 26mtd_utils = "ftl_format flash_erase flash_eraseall nanddump doc_loadbios \
27 mkfs.jffs ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info mtd_debug \ 27 ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info mtd_debug \
28 flashcp nandwrite jffs2dump sumtool" 28 flashcp nandwrite jffs2dump sumtool"
29 29
30do_install () { 30do_install () {
31 install -d ${D}${bindir} 31 oe_runmake install DESTDIR=${D}
32 for binary in ${mtd_utils}; do
33 install -m 0755 $binary ${D}${bindir}
34 done
35} 32}
33
34PARALLEL_MAKE = ""