summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorPhilip Balister <philip@balister.org>2007-03-01 22:29:04 +0000
committerPhilip Balister <philip@balister.org>2007-03-01 22:29:04 +0000
commitaacbb6ba462d455f0b226c1ded6925ef163b2c3e (patch)
treec977181eb0458daa065bc8c77081600a31b575f1 /packages
parent44b318642583cbd7f902117b9e05c4cb225f30ed (diff)
parent4e41d9dd01996b7a1f49a8b33c85d68888595e9b (diff)
merge of '0aca530cedb795675036f35c32e9eca37a2c8985'
and '5ac21df7b1a77c051fd8fe1155e7a5539009e9af'
Diffstat (limited to 'packages')
-rw-r--r--packages/gcc/gcc-4.1.1/801-arm-bigendian-eabi.patch14
-rw-r--r--packages/gcc/gcc-cross_4.1.1.bb2
-rw-r--r--packages/gcc/gcc_4.1.1.bb3
-rw-r--r--packages/linux-input/files/serio.h1
-rw-r--r--packages/linux-input/files/snes232.patch20
-rw-r--r--packages/linux/linux-rp_2.6.20.bb8
-rw-r--r--packages/monotone/monotone-6_0.33.bb52
-rw-r--r--packages/mtd/mtd-utils-native.inc10
-rw-r--r--packages/mtd/mtd-utils-native_0.0.0+cvs20050801.bb12
-rw-r--r--packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb12
-rw-r--r--packages/mtd/mtd-utils-native_1.0.0+git.bb2
-rw-r--r--packages/mtd/mtd-utils-native_1.0.0.bb2
-rw-r--r--packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch106
-rw-r--r--packages/mtd/mtd-utils/add_lzo.patch220
-rw-r--r--packages/mtd/mtd-utils/favour_lzo.patch136
-rw-r--r--packages/mtd/mtd-utils/fix-ignoreerrors-git.patch26
-rw-r--r--packages/mtd/mtd-utils/more-verbosity.patch17
-rw-r--r--packages/mtd/mtd-utils/target-endian.patch11
-rw-r--r--packages/mtd/mtd-utils_0.0.0+cvs20041113.bb36
-rw-r--r--packages/mtd/mtd-utils_0.0.0+cvs20060223.bb5
-rw-r--r--packages/mtd/mtd-utils_1.0.0+git.bb (renamed from packages/mtd/mtd-utils_0.0.0+cvs20050801.bb)28
-rw-r--r--packages/mtd/mtd-utils_1.0.0.bb1
22 files changed, 610 insertions, 114 deletions
diff --git a/packages/gcc/gcc-4.1.1/801-arm-bigendian-eabi.patch b/packages/gcc/gcc-4.1.1/801-arm-bigendian-eabi.patch
new file mode 100644
index 0000000000..54490fc24f
--- /dev/null
+++ b/packages/gcc/gcc-4.1.1/801-arm-bigendian-eabi.patch
@@ -0,0 +1,14 @@
+Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100
++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
diff --git a/packages/gcc/gcc-cross_4.1.1.bb b/packages/gcc/gcc-cross_4.1.1.bb
index f69ab5c8b3..42e9d151b1 100644
--- a/packages/gcc/gcc-cross_4.1.1.bb
+++ b/packages/gcc/gcc-cross_4.1.1.bb
@@ -5,7 +5,7 @@ inherit cross
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
# NOTE: split PR. If the main .oe changes something that affects its *build*
# remember to increment this one too.
-PR = "r10"
+PR = "r11"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
diff --git a/packages/gcc/gcc_4.1.1.bb b/packages/gcc/gcc_4.1.1.bb
index 48827cc902..104a8abb76 100644
--- a/packages/gcc/gcc_4.1.1.bb
+++ b/packages/gcc/gcc_4.1.1.bb
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "r10"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
@@ -20,6 +20,7 @@ SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.1/gcc-4.1.1.tar.bz2 \
file://602-sdk-libstdc++-includes.patch;patch=1 \
file://740-sh-pr24836.patch;patch=1 \
file://800-arm-bigendian.patch;patch=1 \
+ file://801-arm-bigendian-eabi.patch;patch=1 \
file://arm-nolibfloat.patch;patch=1 \
file://arm-softfloat.patch;patch=1 \
file://gcc41-configure.in.patch;patch=1 \
diff --git a/packages/linux-input/files/serio.h b/packages/linux-input/files/serio.h
index 82670ed3f5..375f1e2716 100644
--- a/packages/linux-input/files/serio.h
+++ b/packages/linux-input/files/serio.h
@@ -55,6 +55,7 @@
#define SERIO_SNES232 0x26
#define SERIO_SEMTECH 0x27
#define SERIO_LKKBD 0x28
+#define SERIO_ELO 0x29
#define SERIO_ID 0xff00UL
#define SERIO_EXTRA 0xff0000UL
diff --git a/packages/linux-input/files/snes232.patch b/packages/linux-input/files/snes232.patch
index 95523e4569..349a4aac08 100644
--- a/packages/linux-input/files/snes232.patch
+++ b/packages/linux-input/files/snes232.patch
@@ -1,10 +1,10 @@
---- inputattach.c.old 2004-10-09 23:17:27.000000000 +0100
-+++ inputattach.c 2004-10-09 23:17:37.000000000 +0100
-@@ -369,6 +369,7 @@
- { "--ps2serkbd", "-ps2ser", B1200, CS8, SERIO_PS2SER, 0x00, 1, NULL },
- { "--twiddler", "-twid", B2400, CS8, SERIO_TWIDKBD, 0x00, 0, twiddler_init },
- { "--twiddler-joy", "-twidjoy", B2400, CS8, SERIO_TWIDJOY, 0x00, 0, twiddler_init },
-+{ "--snes232", "-pad", B115200, CS8, SERIO_SNES232, 0x00, 0, NULL },
- { "--dump", "-dump", B2400, CS8, 0, 0x00, 0, dump_init },
- { "", "", 0, 0 }
-
+--- inputattach.c~org 2007-02-24 10:13:34.000000000 -0500
++++ inputattach.c 2007-02-24 10:17:01.000000000 -0500
+@@ -372,6 +372,7 @@
+ { "--ps2serkbd", "-ps2ser", B1200, CS8, SERIO_PS2SER, 0, 0, 1, NULL },
+ { "--twiddler", "-twid", B2400, CS8, SERIO_TWIDKBD, 0, 0, 0, twiddler_init },
+ { "--twiddler-joy", "-twidjoy", B2400, CS8, SERIO_TWIDJOY, 0, 0, 0, twiddler_init },
++{ "--snes232", "-pad", B115200, CS8, SERIO_SNES232, 0x00, 0, 0, NULL },
+ { "--elotouch", "-elo", B9600, CS8 | CRTSCTS, SERIO_ELO, 0, 0, 0, NULL },
+ { "--elo4002", "-elo6b", B9600, CS8 | CRTSCTS, SERIO_ELO, 1, 0, 0, NULL },
+ { "--elo271-140", "-elo4b", B9600, CS8 | CRTSCTS, SERIO_ELO, 2, 0, 0, NULL },
diff --git a/packages/linux/linux-rp_2.6.20.bb b/packages/linux/linux-rp_2.6.20.bb
index fbe82c3b7c..13ceaa0a19 100644
--- a/packages/linux/linux-rp_2.6.20.bb
+++ b/packages/linux/linux-rp_2.6.20.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r3"
+PR = "r4"
# Handy URLs
# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
@@ -15,6 +15,12 @@ PR = "r3"
# Hacks should clearly named and at the bottom
SRC_URI = "http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2 \
http://opensource.wolfsonmicro.com/~lg/asoc/asoc-v0.13.3.patch;patch=1;status=merged \
+ ${RPSRC}/oprofile_always_bt_arm-r0.patch;patch=1 \
+ ${RPSRC}/lzo_kernel-r0.patch;patch=1 \
+ ${RPSRC}/lzo_jffs2-r0.patch;patch=1 \
+ ${RPSRC}/lzo_crypto-r0a.patch;patch=1 \
+ ${RPSRC}/lzo_jffs2_lzomode-r0.patch;patch=1 \
+ ${RPSRC}/lzo_jffs2_sysfs-r0.patch;patch=1 \
${RPSRC}/hx2750_base-r28.patch;patch=1 \
${RPSRC}/hx2750_bl-r8.patch;patch=1 \
${RPSRC}/hx2750_pcmcia-r2.patch;patch=1 \
diff --git a/packages/monotone/monotone-6_0.33.bb b/packages/monotone/monotone-6_0.33.bb
new file mode 100644
index 0000000000..47e58a48c6
--- /dev/null
+++ b/packages/monotone/monotone-6_0.33.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "Monotone is a distributed Source Control System"
+HOMEPAGE = "http://www.monotone.ca/"
+SECTION = "devel"
+PRIORITY = "optional"
+LICENSE = "MIT"
+DEPENDS = "boost"
+
+PROVIDES = "monotone"
+RPROVIDES = "monotone"
+
+S = "${WORKDIR}/monotone-${PV}"
+# no cross compile support - it tries to run the test program even with
+# --enable_ipv6=yes
+EXTRA_OECONF = "--disable-ipv6 \
+ --disable-dependency-tracking \
+ --disable-rpath \
+ --disable-nls \
+ --with-gnu-ld \
+ --with-bundled-lua --with-bundled-sqlite"
+
+inherit autotools
+
+# Release 0.22 reveals bugs in g++ for thumb (g++ generates
+# relocations which the linker cannot represent)
+#FIXME: remove the following
+ARM_INSTRUCTION_SET = "arm"
+
+PR = "r0"
+
+SRC_URI = "http://monotone.ca/downloads/${PV}/monotone-${PV}.tar.gz \
+ file://txt2c-cross-post-0.22.patch;patch=1 \
+ file://uclibc.database.hh.stdarg.patch;patch=1 \
+ file://configure.ac-no-sync-with-stdio-0.31.patch;patch=1 \
+ "
+do_compile_append() {
+ touch testsuite
+}
+
+# This makes the testsuite as a package and renames the monotone executable
+# to include the netsync suffix.
+do_install_append() {
+ install -d ${D}${tsd}
+ install -c -m 755 testsuite ${D}${tsd}/testsuite
+ cp -pPR tests ${D}${tsd}/tests
+ rm ${D}/home/monotone/monotone-6/tests/tests/diff_a_binary_file/binary
+}
+
+PACKAGES = "${PN} ${PN}-doc ${PN}-testsuite"
+tsd = "/home/monotone/${PN}"
+FILES_${PN}-testsuite = "${tsd}/testsuite ${tsd}/tests"
+RDEPENDS_${PN}-testsuite += "bash sed grep cvs patch perl perl-modules"
+
diff --git a/packages/mtd/mtd-utils-native.inc b/packages/mtd/mtd-utils-native.inc
new file mode 100644
index 0000000000..edccb2bb5d
--- /dev/null
+++ b/packages/mtd/mtd-utils-native.inc
@@ -0,0 +1,10 @@
+inherit native
+DEPENDS = "zlib-native"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/mtd-utils"
+
+do_stage () {
+ for binary in ${mtd_utils}; do
+ install -m 0755 $binary ${STAGING_BINDIR}
+ done
+}
+ \ No newline at end of file
diff --git a/packages/mtd/mtd-utils-native_0.0.0+cvs20050801.bb b/packages/mtd/mtd-utils-native_0.0.0+cvs20050801.bb
deleted file mode 100644
index ac060ecef2..0000000000
--- a/packages/mtd/mtd-utils-native_0.0.0+cvs20050801.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-LICENSE = "GPLv2"
-SECTION = "base"
-require mtd-utils_${PV}.bb
-inherit native
-DEPENDS = "zlib-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/mtd-utils"
-
-do_stage () {
- for binary in ${mtd_utils}; do
- install -m 0755 util/$binary ${STAGING_BINDIR}/
- done
-}
diff --git a/packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb b/packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb
index ac060ecef2..6f9d71e10c 100644
--- a/packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb
+++ b/packages/mtd/mtd-utils-native_0.0.0+cvs20060223.bb
@@ -1,12 +1,2 @@
-LICENSE = "GPLv2"
-SECTION = "base"
require mtd-utils_${PV}.bb
-inherit native
-DEPENDS = "zlib-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/mtd-utils"
-
-do_stage () {
- for binary in ${mtd_utils}; do
- install -m 0755 util/$binary ${STAGING_BINDIR}/
- done
-}
+require mtd-utils-native.inc
diff --git a/packages/mtd/mtd-utils-native_1.0.0+git.bb b/packages/mtd/mtd-utils-native_1.0.0+git.bb
new file mode 100644
index 0000000000..6f9d71e10c
--- /dev/null
+++ b/packages/mtd/mtd-utils-native_1.0.0+git.bb
@@ -0,0 +1,2 @@
+require mtd-utils_${PV}.bb
+require mtd-utils-native.inc
diff --git a/packages/mtd/mtd-utils-native_1.0.0.bb b/packages/mtd/mtd-utils-native_1.0.0.bb
new file mode 100644
index 0000000000..6f9d71e10c
--- /dev/null
+++ b/packages/mtd/mtd-utils-native_1.0.0.bb
@@ -0,0 +1,2 @@
+require mtd-utils_${PV}.bb
+require mtd-utils-native.inc
diff --git a/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch b/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
new file mode 100644
index 0000000000..5504a11e8a
--- /dev/null
+++ b/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
@@ -0,0 +1,106 @@
+---
+ mkfs.jffs2.c | 45 ++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 42 insertions(+), 3 deletions(-)
+
+Index: git/mkfs.jffs2.c
+===================================================================
+--- git.orig/mkfs.jffs2.c 2007-01-23 15:42:34.000000000 +0000
++++ git/mkfs.jffs2.c 2007-01-23 15:46:08.000000000 +0000
+@@ -97,7 +97,12 @@ struct filesystem_entry {
+ struct filesystem_entry *files; /* Only relevant to directories */
+ };
+
+-
++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;
+ static int out_fd = -1;
+ static int in_fd = -1;
+ static char default_rootdir[] = ".";
+@@ -372,7 +377,7 @@ static struct filesystem_entry *recursiv
+ 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);
+@@ -381,6 +386,15 @@ static struct filesystem_entry *recursiv
+ 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);
+@@ -1405,6 +1419,7 @@ static struct option long_options[] = {
+ {"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'},
+@@ -1452,6 +1467,7 @@ static char *helptext =
+ " -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"
+@@ -1617,11 +1633,12 @@ int main(int argc, char **argv)
+ struct filesystem_entry *root;
+ char *compr_name = NULL;
+ int compr_prior = -1;
++ struct ignorepath_entry* element = ignorepath;
+
+ 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':
+@@ -1644,6 +1661,28 @@ int main(int argc, char **argv)
+ page_size = strtol(optarg, NULL, 0);
+ 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/packages/mtd/mtd-utils/add_lzo.patch b/packages/mtd/mtd-utils/add_lzo.patch
new file mode 100644
index 0000000000..9afd1ca46b
--- /dev/null
+++ b/packages/mtd/mtd-utils/add_lzo.patch
@@ -0,0 +1,220 @@
+Add LZO support to mtd-utils to generate LZO compressed jffs2 images
+
+Unlike the kernel version, the standard lzo userspace library is used
+along with lzo1x_999_compress rather than the lzo1x_1_compress version
+since better compression ratios can be obtained (at no significant cost
+to decompression time).
+
+Signed-off-by: Richard Purdie <rpurdie@openedhand.com>
+
+---
+ Makefile | 3 -
+ compr.c | 6 ++
+ compr.h | 6 ++
+ compr_lzo.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/jffs2.h | 1
+ 5 files changed, 135 insertions(+), 1 deletion(-)
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile 2007-03-01 11:57:58.000000000 +0000
++++ git/Makefile 2007-03-01 11:58:01.000000000 +0000
+@@ -58,8 +58,9 @@ $(BUILDDIR)/mkfs.jffs2: $(BUILDDIR)/crc3
+ $(BUILDDIR)/compr_rtime.o \
+ $(BUILDDIR)/mkfs.jffs2.o \
+ $(BUILDDIR)/compr_zlib.o \
++ $(BUILDDIR)/compr_lzo.o \
+ $(BUILDDIR)/compr.o
+- $(CC) $(LDFLAGS) -o $@ $^ -lz
++ $(CC) $(LDFLAGS) -o $@ $^ -lz -llzo
+
+ $(BUILDDIR)/flash_eraseall: $(BUILDDIR)/crc32.o $(BUILDDIR)/flash_eraseall.o
+ $(CC) $(LDFLAGS) -o $@ $^
+Index: git/compr.c
+===================================================================
+--- git.orig/compr.c 2007-03-01 11:57:58.000000000 +0000
++++ git/compr.c 2007-03-01 11:58:01.000000000 +0000
+@@ -474,6 +474,9 @@ int jffs2_compressors_init(void)
+ #ifdef CONFIG_JFFS2_RTIME
+ jffs2_rtime_init();
+ #endif
++#ifdef CONFIG_JFFS2_LZO
++ jffs2_lzo_init();
++#endif
+ return 0;
+ }
+
+@@ -485,5 +488,8 @@ int jffs2_compressors_exit(void)
+ #ifdef CONFIG_JFFS2_ZLIB
+ jffs2_zlib_exit();
+ #endif
++#ifdef CONFIG_JFFS2_LZO
++ jffs2_lzo_exit();
++#endif
+ return 0;
+ }
+Index: git/compr.h
+===================================================================
+--- git.orig/compr.h 2007-03-01 11:57:58.000000000 +0000
++++ git/compr.h 2007-03-01 11:58:01.000000000 +0000
+@@ -21,11 +21,13 @@
+
+ #define CONFIG_JFFS2_ZLIB
+ #define CONFIG_JFFS2_RTIME
++#define CONFIG_JFFS2_LZO
+
+ #define JFFS2_RUBINMIPS_PRIORITY 10
+ #define JFFS2_DYNRUBIN_PRIORITY 20
+ #define JFFS2_RTIME_PRIORITY 50
+ #define JFFS2_ZLIB_PRIORITY 60
++#define JFFS2_LZO_PRIORITY 80
+
+ #define JFFS2_COMPR_MODE_NONE 0
+ #define JFFS2_COMPR_MODE_PRIORITY 1
+@@ -111,5 +113,9 @@ void jffs2_zlib_exit(void);
+ int jffs2_rtime_init(void);
+ void jffs2_rtime_exit(void);
+ #endif
++#ifdef CONFIG_JFFS2_LZO
++int jffs2_lzo_init(void);
++void jffs2_lzo_exit(void);
++#endif
+
+ #endif /* __JFFS2_COMPR_H__ */
+Index: git/compr_lzo.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ git/compr_lzo.c 2007-03-01 11:58:01.000000000 +0000
+@@ -0,0 +1,120 @@
++/*
++ * JFFS2 LZO Compression Interface.
++ *
++ * Copyright (C) 2007 Nokia Corporation. All rights reserved.
++ *
++ * Author: Richard Purdie <rpurdie@openedhand.com>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
++ * 02110-1301 USA
++ *
++ */
++
++#include <stdint.h>
++#include <stdio.h>
++#include <string.h>
++#include <asm/types.h>
++#include <linux/jffs2.h>
++#include <lzo1x.h>
++#include "compr.h"
++
++extern int page_size;
++
++static void *lzo_mem;
++static void *lzo_compress_buf;
++
++/*
++ * Note about LZO compression.
++ *
++ * We want to use the _999_ compression routine which gives better compression
++ * rates at the expense of time. Decompression time is unaffected. We might as
++ * well use the standard lzo library routines for this but they will overflow
++ * the destination buffer since they don't check the destination size.
++ *
++ * We therefore compress to a temporary buffer and copy if it will fit.
++ *
++ */
++static int jffs2_lzo_cmpr(unsigned char *data_in, unsigned char *cpage_out,
++ uint32_t *sourcelen, uint32_t *dstlen, void *model)
++{
++ uint32_t compress_size;
++ int ret;
++
++ ret = lzo1x_999_compress(data_in, *sourcelen, lzo_compress_buf, &compress_size, lzo_mem);
++
++ if (ret != LZO_E_OK)
++ return -1;
++
++ if (compress_size > *dstlen)
++ return -1;
++
++ memcpy(cpage_out, lzo_compress_buf, compress_size);
++ *dstlen = compress_size;
++
++ return 0;
++}
++
++static int jffs2_lzo_decompress(unsigned char *data_in, unsigned char *cpage_out,
++ uint32_t srclen, uint32_t destlen, void *model)
++{
++ int ret;
++ uint32_t dl;
++
++ ret = lzo1x_decompress_safe(data_in,srclen,cpage_out,&dl,NULL);
++
++ if (ret != LZO_E_OK || dl != destlen)
++ return -1;
++
++ return 0;
++}
++
++static struct jffs2_compressor jffs2_lzo_comp = {
++ .priority = JFFS2_LZO_PRIORITY,
++ .name = "lzo",
++ .compr = JFFS2_COMPR_LZO,
++ .compress = &jffs2_lzo_cmpr,
++ .decompress = &jffs2_lzo_decompress,
++ .disabled = 0,
++};
++
++int jffs2_lzo_init(void)
++{
++ int ret;
++
++ lzo_mem = malloc(LZO1X_999_MEM_COMPRESS);
++ if (!lzo_mem)
++ return -1;
++
++ /* Worse case LZO compression size from their FAQ */
++ lzo_compress_buf = malloc(page_size + (page_size / 64) + 16 + 3);
++ if (!lzo_compress_buf) {
++ free(lzo_mem);
++ return -1;
++ }
++
++ ret = jffs2_register_compressor(&jffs2_lzo_comp);
++ if (ret < 0) {
++ free(lzo_compress_buf);
++ free(lzo_mem);
++ }
++
++ return ret;
++}
++
++void jffs2_lzo_exit(void)
++{
++ jffs2_unregister_compressor(&jffs2_lzo_comp);
++ free(lzo_compress_buf);
++ free(lzo_mem);
++}
+Index: git/include/linux/jffs2.h
+===================================================================
+--- git.orig/include/linux/jffs2.h 2007-03-01 11:57:58.000000000 +0000
++++ git/include/linux/jffs2.h 2007-03-01 11:58:01.000000000 +0000
+@@ -46,6 +46,7 @@
+ #define JFFS2_COMPR_COPY 0x04
+ #define JFFS2_COMPR_DYNRUBIN 0x05
+ #define JFFS2_COMPR_ZLIB 0x06
++#define JFFS2_COMPR_LZO 0x07
+ /* Compatibility flags. */
+ #define JFFS2_COMPAT_MASK 0xc000 /* What do to if an unknown nodetype is found */
+ #define JFFS2_NODE_ACCURATE 0x2000
diff --git a/packages/mtd/mtd-utils/favour_lzo.patch b/packages/mtd/mtd-utils/favour_lzo.patch
new file mode 100644
index 0000000000..9e55d5f4b3
--- /dev/null
+++ b/packages/mtd/mtd-utils/favour_lzo.patch
@@ -0,0 +1,136 @@
+Add a favourlzo compression mode to mtd-utils
+
+This allows lzo compression to be used in the cases where the
+compression ratio isn't quite as good zlib. This can make sense in
+certain use cases because LZO decompression is much faster than zlib.
+
+Signed-off-by: Richard Purdie <rpurdie@openedhand.com>
+
+---
+ compr.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++---
+ compr.h | 1 +
+ 2 files changed, 50 insertions(+), 3 deletions(-)
+
+Index: git/compr.c
+===================================================================
+--- git.orig/compr.c 2007-03-01 11:58:01.000000000 +0000
++++ git/compr.c 2007-03-01 11:58:09.000000000 +0000
+@@ -16,6 +16,8 @@
+ #include <stdlib.h>
+ #include <linux/jffs2.h>
+
++#define FAVOUR_LZO_PERCENT 80
++
+ extern int page_size;
+
+ /* LIST IMPLEMENTATION (from linux/list.h) */
+@@ -166,6 +168,33 @@ static void jffs2_decompression_test(str
+ }
+ }
+
++/*
++ * Return 1 to use this compression
++ */
++static int jffs2_is_best_compression(struct jffs2_compressor *this,
++ struct jffs2_compressor *best, uint32_t size, uint32_t bestsize)
++{
++ switch (jffs2_compression_mode) {
++ case JFFS2_COMPR_MODE_SIZE:
++ if (bestsize > size)
++ return 1;
++ return 0;
++ case JFFS2_COMPR_MODE_FAVOURLZO:
++ if ((this->compr == JFFS2_COMPR_LZO) && (bestsize > size))
++ return 1;
++ if ((best->compr != JFFS2_COMPR_LZO) && (bestsize > size))
++ return 1;
++ if ((this->compr == JFFS2_COMPR_LZO) && (bestsize > (size * FAVOUR_LZO_PERCENT / 100)))
++ return 1;
++ if ((bestsize * FAVOUR_LZO_PERCENT / 100) > size)
++ return 1;
++
++ return 0;
++ }
++ /* Shouldn't happen */
++ return 0;
++}
++
+ /* jffs2_compress:
+ * @data: Pointer to uncompressed data
+ * @cdata: Pointer to returned pointer to buffer for compressed data
+@@ -231,21 +260,29 @@ uint16_t jffs2_compress( unsigned char *
+ }
+ if (ret == JFFS2_COMPR_NONE) free(output_buf);
+ break;
++ case JFFS2_COMPR_MODE_FAVOURLZO:
+ case JFFS2_COMPR_MODE_SIZE:
+ orig_slen = *datalen;
+ orig_dlen = *cdatalen;
+ list_for_each_entry(this, &jffs2_compressor_list, list) {
++ uint32_t needed_buf_size;
++
++ if (jffs2_compression_mode == JFFS2_COMPR_MODE_FAVOURLZO)
++ needed_buf_size = orig_slen+jffs2_compression_check;
++ else
++ needed_buf_size = orig_dlen+jffs2_compression_check;
++
+ /* Skip decompress-only backwards-compatibility and disabled modules */
+ if ((!this->compress)||(this->disabled))
+ continue;
+ /* Allocating memory for output buffer if necessary */
+- if ((this->compr_buf_size<orig_dlen+jffs2_compression_check)&&(this->compr_buf)) {
++ if ((this->compr_buf_size < needed_buf_size) && (this->compr_buf)) {
+ free(this->compr_buf);
+ this->compr_buf_size=0;
+ this->compr_buf=NULL;
+ }
+ if (!this->compr_buf) {
+- tmp_buf = malloc(orig_dlen+jffs2_compression_check);
++ tmp_buf = malloc(needed_buf_size);
+ if (!tmp_buf) {
+ fprintf(stderr,"mkfs.jffs2: No memory for compressor allocation. (%d bytes)\n",orig_dlen);
+ continue;
+@@ -265,7 +302,8 @@ uint16_t jffs2_compress( unsigned char *
+ if (!compr_ret) {
+ if (jffs2_compression_check)
+ jffs2_decompression_test(this, data_in, this->compr_buf, *cdatalen, *datalen, this->compr_buf_size);
+- if ((!best_dlen)||(best_dlen>*cdatalen)) {
++ if (((!best_dlen) || jffs2_is_best_compression(this, best, *cdatalen, best_dlen))
++ && (*cdatalen < *datalen)) {
+ best_dlen = *cdatalen;
+ best_slen = *datalen;
+ best = this;
+@@ -377,6 +415,9 @@ char *jffs2_stats(void)
+ case JFFS2_COMPR_MODE_SIZE:
+ act_buf += sprintf(act_buf,"size");
+ break;
++ case JFFS2_COMPR_MODE_FAVOURLZO:
++ act_buf += sprintf(act_buf,"favourlzo");
++ break;
+ default:
+ act_buf += sprintf(act_buf,"unkown");
+ break;
+@@ -413,6 +454,11 @@ int jffs2_set_compression_mode_name(cons
+ jffs2_compression_mode = JFFS2_COMPR_MODE_SIZE;
+ return 0;
+ }
++ if (!strcmp("favourlzo", name)) {
++ jffs2_compression_mode = JFFS2_COMPR_MODE_FAVOURLZO;
++ return 0;
++ }
++
+ return 1;
+ }
+
+Index: git/compr.h
+===================================================================
+--- git.orig/compr.h 2007-03-01 11:58:01.000000000 +0000
++++ git/compr.h 2007-03-01 11:58:09.000000000 +0000
+@@ -32,6 +32,7 @@
+ #define JFFS2_COMPR_MODE_NONE 0
+ #define JFFS2_COMPR_MODE_PRIORITY 1
+ #define JFFS2_COMPR_MODE_SIZE 2
++#define JFFS2_COMPR_MODE_FAVOURLZO 3
+
+ #define kmalloc(a,b) malloc(a)
+ #define kfree(a) free(a)
diff --git a/packages/mtd/mtd-utils/fix-ignoreerrors-git.patch b/packages/mtd/mtd-utils/fix-ignoreerrors-git.patch
new file mode 100644
index 0000000000..bec60a18c1
--- /dev/null
+++ b/packages/mtd/mtd-utils/fix-ignoreerrors-git.patch
@@ -0,0 +1,26 @@
+---
+ nanddump.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: git/nanddump.c
+===================================================================
+--- git.orig/nanddump.c 2007-01-23 15:42:34.000000000 +0000
++++ git/nanddump.c 2007-01-23 15:47:57.000000000 +0000
+@@ -281,7 +281,7 @@ int main(int argc, char **argv)
+ }
+ }
+
+- if (badblock) {
++ if (badblock && !ignoreerrors) {
+ if (omitbad)
+ continue;
+ memset (readbuf, 0xff, bs);
+@@ -335,7 +335,7 @@ int main(int argc, char **argv)
+ if (omitoob)
+ continue;
+
+- if (badblock) {
++ if (badblock && !ignoreerrors) {
+ memset (readbuf, 0xff, meminfo.oobsize);
+ } else {
+ /* Read OOB data and exit on failure */
diff --git a/packages/mtd/mtd-utils/more-verbosity.patch b/packages/mtd/mtd-utils/more-verbosity.patch
deleted file mode 100644
index cdc842a8f9..0000000000
--- a/packages/mtd/mtd-utils/more-verbosity.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
---- mtd/util/mkfs.jffs2.c~more-verbosity.patch
-+++ mtd/util/mkfs.jffs2.c
-@@ -374,6 +374,9 @@
- struct filesystem_entry *entry;
- struct ignorepath_entry* element = ignorepath;
-
-+ if (verbose) {
-+ printf( "mkfs.jffs2: scanning '%s'...\n", targetpath );
-+ }
-
- if (lstat(hostpath, &sb)) {
- perror_msg_and_die("%s", hostpath);
diff --git a/packages/mtd/mtd-utils/target-endian.patch b/packages/mtd/mtd-utils/target-endian.patch
deleted file mode 100644
index 567730ce31..0000000000
--- a/packages/mtd/mtd-utils/target-endian.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mtd/util/flash_eraseall.c 2004-09-12 00:00:13.000000000 +0200
-+++ mtd-new/util/flash_eraseall.c 2005-08-16 11:36:46.262783496 +0200
-@@ -54,7 +54,7 @@
- static void display_help (void);
- static void display_version (void);
- static struct jffs2_unknown_node cleanmarker;
--static int target_endian = __BYTE_ORDER;
-+int target_endian = __BYTE_ORDER;
-
- int main (int argc, char *argv[])
- {
diff --git a/packages/mtd/mtd-utils_0.0.0+cvs20041113.bb b/packages/mtd/mtd-utils_0.0.0+cvs20041113.bb
deleted file mode 100644
index 3cc1878431..0000000000
--- a/packages/mtd/mtd-utils_0.0.0+cvs20041113.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-DESCRIPTION = "Tools for managing memory technology devices."
-SECTION = "base"
-DEPENDS = "zlib"
-HOMEPAGE = "http://www.linux-mtd.infradead.org/"
-LICENSE = "GPLv2"
-PR = "r2"
-SRCDATE = "20041113"
-
-SRC_URI = "cvs://anoncvs:anoncvs@cvs.infradead.org/home/cvs;module=mtd \
- file://add-exclusion-to-mkfs-jffs2-20041113.patch;patch=1" \
- file://target-endian.patch;patch=1"
-
-S = "${WORKDIR}/mtd"
-
-
-CFLAGS_prepend = "-I${S}/include "
-
-do_compile () {
- oe_runmake -C util
-}
-
-do_stage () {
- install -d ${STAGING_INCDIR}/mtd
- for f in ${S}/include/mtd/*.h; do
- install -m 0644 $f ${STAGING_INCDIR}/mtd/
- done
-}
-
-do_install () {
- install -d ${D}${bindir}
- for binary in ftl_format flash_erase flash_eraseall nanddump doc_loadbios \
- mkfs.jffs ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info mtd_debug \
- flashcp nandwrite jffs2dump; do
- install -m 0755 util/$binary ${D}${bindir}
- done
-}
diff --git a/packages/mtd/mtd-utils_0.0.0+cvs20060223.bb b/packages/mtd/mtd-utils_0.0.0+cvs20060223.bb
index 7ace1c194c..96199f1602 100644
--- a/packages/mtd/mtd-utils_0.0.0+cvs20060223.bb
+++ b/packages/mtd/mtd-utils_0.0.0+cvs20060223.bb
@@ -6,7 +6,7 @@ LICENSE = "GPLv2"
PR = "r0"
SRCDATE = "20060223"
-SRC_URI = "cvs://anoncvs:anoncvs@cvs.infradead.org/home/cvs;module=mtd \
+SRC_URI = "cvs://anoncvs:anoncvs@cvs.infradead.org/home/cvs;module=mtd \
file://add-exclusion-to-mkfs-jffs2-20060131.patch;patch=1 \
file://fix-ignoreerrors-20060131.patch;patch=1"
S = "${WORKDIR}/mtd/"
@@ -22,6 +22,9 @@ do_stage () {
for f in ${S}/include/mtd/*.h; do
install -m 0644 $f ${STAGING_INCDIR}/mtd/
done
+ for binary in ${mtd_utils}; do
+ install -m 0755 util/$binary ${STAGING_BINDIR}
+ done
}
mtd_utils = "ftl_format flash_erase flash_eraseall nanddump doc_loadbios \
diff --git a/packages/mtd/mtd-utils_0.0.0+cvs20050801.bb b/packages/mtd/mtd-utils_1.0.0+git.bb
index d66ca4bb7c..e15a40046f 100644
--- a/packages/mtd/mtd-utils_0.0.0+cvs20050801.bb
+++ b/packages/mtd/mtd-utils_1.0.0+git.bb
@@ -3,35 +3,37 @@ SECTION = "base"
DEPENDS = "zlib"
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
LICENSE = "GPLv2"
-PR = "r0"
-SRCDATE = "20050801"
+PR = "r1"
-SRC_URI = "cvs://anoncvs:anoncvs@cvs.infradead.org/home/cvs;module=mtd \
- file://add-exclusion-to-mkfs-jffs2.patch;patch=1 \
- file://more-verbosity.patch;patch=1 \
- file://fix-ignoreerrors.patch;patch=1"
-S = "${WORKDIR}/mtd/"
+SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=master \
+ file://add_lzo.patch;patch=1 \
+ file://favour_lzo.patch;patch=1 \
+ file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \
+ file://fix-ignoreerrors-git.patch;patch=1"
-CFLAGS_prepend = "-I${S}/include "
+S = "${WORKDIR}/git/"
-do_compile () {
- oe_runmake -C util ${mtd_utils}
-}
+EXTRA_OEMAKE = "WITHOUT_XATTR=1"
+
+#CFLAGS_prepend = "-I${S}/include "
do_stage () {
install -d ${STAGING_INCDIR}/mtd
for f in ${S}/include/mtd/*.h; do
install -m 0644 $f ${STAGING_INCDIR}/mtd/
done
+ for binary in ${mtd_utils}; do
+ install -m 0755 $binary ${STAGING_BINDIR}
+ done
}
mtd_utils = "ftl_format flash_erase flash_eraseall nanddump doc_loadbios \
mkfs.jffs ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info mtd_debug \
- flashcp nandwrite jffs2dump"
+ flashcp nandwrite jffs2dump sumtool"
do_install () {
install -d ${D}${bindir}
for binary in ${mtd_utils}; do
- install -m 0755 util/$binary ${D}${bindir}
+ install -m 0755 $binary ${D}${bindir}
done
}
diff --git a/packages/mtd/mtd-utils_1.0.0.bb b/packages/mtd/mtd-utils_1.0.0.bb
index aae722b987..0ebb47fb22 100644
--- a/packages/mtd/mtd-utils_1.0.0.bb
+++ b/packages/mtd/mtd-utils_1.0.0.bb
@@ -10,6 +10,7 @@ PR = "r0"
DEFAULT_PREFERENCE = "-1"
SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.0.0.tar.gz"
+S = "${WORKDIR}/mtd-utils-${PV}"
CFLAGS_prepend = "-I${WORKDIR}/mtd-utils-${PV}/include "