diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 15:14:24 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 15:29:45 +0100 |
commit | 29d6678fd546377459ef75cf54abeef5b969b5cf (patch) | |
tree | 8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-devtools/mtd/mtd-utils | |
parent | da49de6885ee1bc424e70bc02f21f6ab920efb55 (diff) | |
download | poky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz |
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things
and is generally overwhelming. This commit splits it into several
logical sections roughly based on function, recipes.txt gives more
information about the classifications used.
The opportunity is also used to switch from "packages" to "recipes"
as used in OpenEmbedded as the term "packages" can be confusing to
people and has many different meanings.
Not all recipes have been classified yet, this is just a first pass
at separating things out. Some packages are moved to meta-extras as
they're no longer actively used or maintained.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/mtd/mtd-utils')
3 files changed, 193 insertions, 0 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 new file mode 100644 index 0000000000..5555654490 --- /dev/null +++ b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch | |||
@@ -0,0 +1,134 @@ | |||
1 | --- | ||
2 | mkfs.jffs2.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- | ||
3 | 1 file changed, 42 insertions(+), 2 deletions(-) | ||
4 | |||
5 | --- git.orig/mkfs.jffs2.c | ||
6 | +++ git/mkfs.jffs2.c | ||
7 | @@ -98,10 +98,16 @@ struct filesystem_entry { | ||
8 | struct filesystem_entry *next; /* Only relevant to non-directories */ | ||
9 | struct filesystem_entry *files; /* Only relevant to directories */ | ||
10 | struct rb_node hardlink_rb; | ||
11 | }; | ||
12 | |||
13 | +struct ignorepath_entry { | ||
14 | + struct ignorepath_entry* next; /* Points to the next ignorepath element */ | ||
15 | + char name[PATH_MAX]; /* Name of the entry */ | ||
16 | +}; | ||
17 | + | ||
18 | +static struct ignorepath_entry* ignorepath = 0; | ||
19 | struct rb_root hardlinks; | ||
20 | static int out_fd = -1; | ||
21 | static int in_fd = -1; | ||
22 | static char default_rootdir[] = "."; | ||
23 | static char *rootdir = default_rootdir; | ||
24 | @@ -404,19 +410,28 @@ static struct filesystem_entry *recursiv | ||
25 | int i, n; | ||
26 | struct stat sb; | ||
27 | char *hpath, *tpath; | ||
28 | struct dirent *dp, **namelist; | ||
29 | struct filesystem_entry *entry; | ||
30 | - | ||
31 | + struct ignorepath_entry* element = ignorepath; | ||
32 | |||
33 | if (lstat(hostpath, &sb)) { | ||
34 | perror_msg_and_die("%s", hostpath); | ||
35 | } | ||
36 | |||
37 | entry = add_host_filesystem_entry(targetpath, hostpath, | ||
38 | sb.st_uid, sb.st_gid, sb.st_mode, 0, parent); | ||
39 | |||
40 | + while ( element ) { | ||
41 | + if ( strcmp( element->name, targetpath ) == 0 ) { | ||
42 | + printf( "Note: ignoring directories below '%s'\n", targetpath ); | ||
43 | + return entry; | ||
44 | + break; | ||
45 | + } | ||
46 | + element = element->next; | ||
47 | + } | ||
48 | + | ||
49 | n = scandir(hostpath, &namelist, 0, alphasort); | ||
50 | if (n < 0) { | ||
51 | perror_msg_and_die("opening directory %s", hostpath); | ||
52 | } | ||
53 | |||
54 | @@ -1446,10 +1461,11 @@ static void create_target_filesystem(str | ||
55 | static struct option long_options[] = { | ||
56 | {"pad", 2, NULL, 'p'}, | ||
57 | {"root", 1, NULL, 'r'}, | ||
58 | {"pagesize", 1, NULL, 's'}, | ||
59 | {"eraseblock", 1, NULL, 'e'}, | ||
60 | + {"ignore", 1, NULL, 'I'}, | ||
61 | {"output", 1, NULL, 'o'}, | ||
62 | {"help", 0, NULL, 'h'}, | ||
63 | {"verbose", 0, NULL, 'v'}, | ||
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" | ||
69 | " -L, --list-compressors Show the list of the avaiable compressors\n" | ||
70 | " -t, --test-compression Call decompress and compare with the original (for test)\n" | ||
71 | " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n" | ||
72 | +" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n" | ||
73 | " -o, --output=FILE Output to FILE (default: stdout)\n" | ||
74 | " -l, --little-endian Create a little-endian filesystem\n" | ||
75 | " -b, --big-endian Create a big-endian filesystem\n" | ||
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; | ||
80 | struct filesystem_entry *root; | ||
81 | char *compr_name = NULL; | ||
82 | int compr_prior = -1; | ||
83 | int warn_page_size = 0; | ||
84 | + struct ignorepath_entry* element = ignorepath; | ||
85 | |||
86 | page_size = sysconf(_SC_PAGESIZE); | ||
87 | if (page_size < 0) /* System doesn't know so ... */ | ||
88 | page_size = 4096; /* ... we make an educated guess */ | ||
89 | if (page_size != 4096) | ||
90 | warn_page_size = 1; /* warn user if page size not 4096 */ | ||
91 | |||
92 | jffs2_compressors_init(); | ||
93 | |||
94 | while ((opt = getopt_long(argc, argv, | ||
95 | - "D:d:r:s: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) | ||
97 | { | ||
98 | switch (opt) { | ||
99 | case 'D': | ||
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': | ||
104 | page_size = strtol(optarg, NULL, 0); | ||
105 | warn_page_size = 0; /* set by user, so don't need to warn */ | ||
106 | break; | ||
107 | |||
108 | + case 'I': | ||
109 | + printf( "Note: Adding '%s' to ignore Path\n", optarg ); | ||
110 | + element = ignorepath; | ||
111 | + if ( !ignorepath ) { | ||
112 | + ignorepath = xmalloc( sizeof( struct ignorepath_entry ) ); | ||
113 | + ignorepath->next = 0; | ||
114 | + strcpy( &ignorepath->name[0], optarg ); | ||
115 | + } else { | ||
116 | + while ( element->next ) element = element->next; | ||
117 | + element->next = xmalloc( sizeof( struct ignorepath_entry ) ); | ||
118 | + element->next->next = 0; | ||
119 | + strcpy( &element->next->name[0], optarg ); | ||
120 | + } | ||
121 | + printf( "--------- Dumping ignore path list ----------------\n" ); | ||
122 | + element = ignorepath; | ||
123 | + while ( element ) { | ||
124 | + printf( " * '%s'\n", &element->name[0] ); | ||
125 | + element = element->next; | ||
126 | + } | ||
127 | + printf( "---------------------------------------------------\n" ); | ||
128 | + break; | ||
129 | + | ||
130 | case 'o': | ||
131 | if (out_fd != -1) { | ||
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/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch b/meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch new file mode 100644 index 0000000000..bec60a18c1 --- /dev/null +++ b/meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | --- | ||
2 | nanddump.c | 4 ++-- | ||
3 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
4 | |||
5 | Index: git/nanddump.c | ||
6 | =================================================================== | ||
7 | --- git.orig/nanddump.c 2007-01-23 15:42:34.000000000 +0000 | ||
8 | +++ git/nanddump.c 2007-01-23 15:47:57.000000000 +0000 | ||
9 | @@ -281,7 +281,7 @@ int main(int argc, char **argv) | ||
10 | } | ||
11 | } | ||
12 | |||
13 | - if (badblock) { | ||
14 | + if (badblock && !ignoreerrors) { | ||
15 | if (omitbad) | ||
16 | continue; | ||
17 | memset (readbuf, 0xff, bs); | ||
18 | @@ -335,7 +335,7 @@ int main(int argc, char **argv) | ||
19 | if (omitoob) | ||
20 | continue; | ||
21 | |||
22 | - if (badblock) { | ||
23 | + if (badblock && !ignoreerrors) { | ||
24 | memset (readbuf, 0xff, meminfo.oobsize); | ||
25 | } else { | ||
26 | /* 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 new file mode 100644 index 0000000000..4928db00be --- /dev/null +++ b/meta/recipes-devtools/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 -9c mkfs.jffs2.1 > ${DESTDIR}/${MANDIR}/man1/mkfs.jffs2.1.gz | ||
33 | - make -C $(BUILDDIR)/ubi-utils install | ||