summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/mtd/mtd-utils
diff options
context:
space:
mode:
authorJames Limbouris <james@digitalmatter.com.au>2012-02-28 14:25:46 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-13 23:18:46 +0000
commitd074b8ad6f1c6b10af79b6ed8db3b08298255a72 (patch)
tree265208f08a5fa6f315f8fefad5116e4f0bcf2636 /meta/recipes-devtools/mtd/mtd-utils
parent7e4871729574ac7a0cb2eb9fd6a5c264548f56d2 (diff)
downloadpoky-d074b8ad6f1c6b10af79b6ed8db3b08298255a72.tar.gz
mtd-utils: clean up old files
(From OE-Core rev: d3657fbd3e6cdfa0cfd355de446b474fb2f72e81) Signed-off-by: James Limbouris <james@digitalmatter.com.au> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/mtd/mtd-utils')
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch136
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch28
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/remove-ubi.patch35
3 files changed, 0 insertions, 199 deletions
diff --git a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
deleted file mode 100644
index 60edb8f9da..0000000000
--- a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
+++ /dev/null
@@ -1,136 +0,0 @@
1Upstream-Status: Pending
2
3---
4 mkfs.jffs2.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
5 1 file changed, 42 insertions(+), 2 deletions(-)
6
7--- git.orig/mkfs.jffs2.c
8+++ git/mkfs.jffs2.c
9@@ -98,10 +98,16 @@ struct filesystem_entry {
10 struct filesystem_entry *next; /* Only relevant to non-directories */
11 struct filesystem_entry *files; /* Only relevant to directories */
12 struct rb_node hardlink_rb;
13 };
14
15+struct ignorepath_entry {
16+ struct ignorepath_entry* next; /* Points to the next ignorepath element */
17+ char name[PATH_MAX]; /* Name of the entry */
18+};
19+
20+static struct ignorepath_entry* ignorepath = 0;
21 struct rb_root hardlinks;
22 static int out_fd = -1;
23 static int in_fd = -1;
24 static char default_rootdir[] = ".";
25 static char *rootdir = default_rootdir;
26@@ -404,19 +410,28 @@ static struct filesystem_entry *recursiv
27 int i, n;
28 struct stat sb;
29 char *hpath, *tpath;
30 struct dirent *dp, **namelist;
31 struct filesystem_entry *entry;
32-
33+ struct ignorepath_entry* element = ignorepath;
34
35 if (lstat(hostpath, &sb)) {
36 perror_msg_and_die("%s", hostpath);
37 }
38
39 entry = add_host_filesystem_entry(targetpath, hostpath,
40 sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
41
42+ while ( element ) {
43+ if ( strcmp( element->name, targetpath ) == 0 ) {
44+ printf( "Note: ignoring directories below '%s'\n", targetpath );
45+ return entry;
46+ break;
47+ }
48+ element = element->next;
49+ }
50+
51 n = scandir(hostpath, &namelist, 0, alphasort);
52 if (n < 0) {
53 perror_msg_and_die("opening directory %s", hostpath);
54 }
55
56@@ -1446,10 +1461,11 @@ static void create_target_filesystem(str
57 static struct option long_options[] = {
58 {"pad", 2, NULL, 'p'},
59 {"root", 1, NULL, 'r'},
60 {"pagesize", 1, NULL, 's'},
61 {"eraseblock", 1, NULL, 'e'},
62+ {"ignore", 1, NULL, 'I'},
63 {"output", 1, NULL, 'o'},
64 {"help", 0, NULL, 'h'},
65 {"verbose", 0, NULL, 'v'},
66 {"version", 0, NULL, 'V'},
67 {"big-endian", 0, NULL, 'b'},
68@@ -1493,10 +1509,11 @@ static char *helptext =
69 " -y, --compressor-priority=PRIORITY:COMPRESSOR_NAME\n"
70 " Set the priority of a compressor\n"
71 " -L, --list-compressors Show the list of the avaiable compressors\n"
72 " -t, --test-compression Call decompress and compare with the original (for test)\n"
73 " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
74+" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n"
75 " -o, --output=FILE Output to FILE (default: stdout)\n"
76 " -l, --little-endian Create a little-endian filesystem\n"
77 " -b, --big-endian Create a big-endian filesystem\n"
78 " -D, --devtable=FILE Use the named FILE as a device table file\n"
79 " -f, --faketime Change all file times to '0' for regression testing\n"
80@@ -1659,21 +1676,22 @@ int main(int argc, char **argv)
81 FILE *devtable = NULL;
82 struct filesystem_entry *root;
83 char *compr_name = NULL;
84 int compr_prior = -1;
85 int warn_page_size = 0;
86+ struct ignorepath_entry* element = ignorepath;
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
94 jffs2_compressors_init();
95
96 while ((opt = getopt_long(argc, argv,
97- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
98+ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
99 {
100 switch (opt) {
101 case 'D':
102 devtable = xfopen(optarg, "r");
103 if (fstat(fileno(devtable), &sb) < 0)
104@@ -1693,10 +1711,32 @@ int main(int argc, char **argv)
105 case 's':
106 page_size = strtol(optarg, NULL, 0);
107 warn_page_size = 0; /* set by user, so don't need to warn */
108 break;
109
110+ case 'I':
111+ printf( "Note: Adding '%s' to ignore Path\n", optarg );
112+ element = ignorepath;
113+ if ( !ignorepath ) {
114+ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) );
115+ ignorepath->next = 0;
116+ strcpy( &ignorepath->name[0], optarg );
117+ } else {
118+ while ( element->next ) element = element->next;
119+ element->next = xmalloc( sizeof( struct ignorepath_entry ) );
120+ element->next->next = 0;
121+ strcpy( &element->next->name[0], optarg );
122+ }
123+ printf( "--------- Dumping ignore path list ----------------\n" );
124+ element = ignorepath;
125+ while ( element ) {
126+ printf( " * '%s'\n", &element->name[0] );
127+ element = element->next;
128+ }
129+ printf( "---------------------------------------------------\n" );
130+ break;
131+
132 case 'o':
133 if (out_fd != -1) {
134 error_msg_and_die("output filename specified more than once");
135 }
136 out_fd = open(optarg, O_CREAT | O_TRUNC | O_RDWR, 0644);
diff --git a/meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch b/meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch
deleted file mode 100644
index f532a27e9d..0000000000
--- a/meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1Upstream-Status: Pending
2
3---
4 nanddump.c | 4 ++--
5 1 file changed, 2 insertions(+), 2 deletions(-)
6
7Index: git/nanddump.c
8===================================================================
9--- git.orig/nanddump.c 2007-01-23 15:42:34.000000000 +0000
10+++ git/nanddump.c 2007-01-23 15:47:57.000000000 +0000
11@@ -281,7 +281,7 @@ int main(int argc, char **argv)
12 }
13 }
14
15- if (badblock) {
16+ if (badblock && !ignoreerrors) {
17 if (omitbad)
18 continue;
19 memset (readbuf, 0xff, bs);
20@@ -335,7 +335,7 @@ int main(int argc, char **argv)
21 if (omitoob)
22 continue;
23
24- if (badblock) {
25+ if (badblock && !ignoreerrors) {
26 memset (readbuf, 0xff, meminfo.oobsize);
27 } else {
28 /* Read OOB data and exit on failure */
diff --git a/meta/recipes-devtools/mtd/mtd-utils/remove-ubi.patch b/meta/recipes-devtools/mtd/mtd-utils/remove-ubi.patch
deleted file mode 100644
index 24a4697222..0000000000
--- a/meta/recipes-devtools/mtd/mtd-utils/remove-ubi.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3---
4 Makefile | 3 ---
5 1 file changed, 3 deletions(-)
6
7--- git.orig/Makefile
8+++ git/Makefile
9@@ -41,19 +41,17 @@ $(BUILDDIR)/%.o: %.c
10 $(CC) $(CFLAGS) -g -c -o $@ $< -g -Wp,-MD,$(BUILDDIR)/.$(<F).dep
11
12 .SUFFIXES:
13
14 all: $(TARGETS)
15- make -C $(BUILDDIR)/ubi-utils
16
17 IGNORE=${wildcard $(BUILDDIR)/.*.c.dep}
18 -include ${IGNORE}
19
20 clean:
21 rm -f $(BUILDDIR)/*.o $(TARGETS) $(BUILDDIR)/.*.c.dep $(SYMLINKS)
22 if [ "$(BUILDDIR)x" != ".x" ]; then rm -rf $(BUILDDIR); fi
23- make -C $(BUILDDIR)/ubi-utils clean
24
25 $(SYMLINKS):
26 ln -sf ../fs/jffs2/$@ $@
27
28 $(BUILDDIR)/mkfs.jffs2: $(BUILDDIR)/crc32.o \
29@@ -91,6 +89,5 @@ $(BUILDDIR)/fectest: $(BUILDDIR)/fectest
30 install: ${TARGETS}
31 mkdir -p ${DESTDIR}/${SBINDIR}
32 install -m0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/
33 mkdir -p ${DESTDIR}/${MANDIR}/man1
34 gzip -9c mkfs.jffs2.1 > ${DESTDIR}/${MANDIR}/man1/mkfs.jffs2.1.gz
35- make -C $(BUILDDIR)/ubi-utils install