diff --git a/CHANGELOG b/CHANGELOG
index f7b1eb8..19c7262 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
 Changes since U-Boot 1.0.0:
 ======================================================================
 
+* Patch by Robert Schwebel, 15 Dec 2003:
+  add support for cramfs (uses JFFS2 command interface)
+
 * Patches by Stephan Linz, 11 Dec 2003:
   - more documentation for NIOS port
   - new struct nios_pio_t, struct nios_spi_t
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c
index e674ef4..325fdd1 100644
--- a/common/cmd_fpga.c
+++ b/common/cmd_fpga.c
@@ -158,7 +158,7 @@
 }
 
 U_BOOT_CMD (fpga, 6, 1, do_fpga,
-	    "fpga   - loadable FPGA image support\n",
+	    "fpga    - loadable FPGA image support\n",
 	    "fpga [operation type] [device number] [image address] [image size]\n"
 	    "fpga operations:\n"
 	    "\tinfo\tlist known device information.\n"
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
index 3301bd9..a581e6f 100644
--- a/common/cmd_jffs2.c
+++ b/common/cmd_jffs2.c
@@ -1,6 +1,10 @@
 /*
  * (C) Copyright 2002
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ * (C) Copyright 2002
+ * Robert Schwebel, Pengutronix, <r.schwebel@pengutronix.de>
+ * (C) Copyright 2003
+ * Kai-Uwe Bloem, Auerswald GmbH & Co KG, <linux-development@auerswald.de>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -31,6 +35,9 @@
 #include <net.h>
 
 #if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
+
+#include <cramfs/cramfs_fs.h>
+
 static int part_num=0;
 
 #ifndef CFG_JFFS_CUSTOM_PART
@@ -77,11 +84,13 @@
 	return 0;
 }
 #endif /* ifndef CFG_JFFS_CUSTOM_PART */
+
 int
 do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
     struct part_info* jffs2_part_info(int);
     int jffs2_1pass_load(char *, struct part_info *,const char *);
+    char *fsname;
 
 	char *filename = "uImage";
 	ulong offset = CFG_LOAD_ADDR;
@@ -98,17 +107,25 @@
 
 	if (0 != (part=jffs2_part_info(part_num))){
 
-		printf("### JFFS2 loading '%s' to 0x%lx\n", filename, offset);
-		size = jffs2_1pass_load((char *)offset, part, filename);
+		/* check partition type for cramfs */
+		fsname = (cramfs_check(part) ? "CRAMFS" : "JFFS2");
+		printf("### %s loading '%s' to 0x%lx\n", fsname, filename, offset);
+
+		if (cramfs_check(part)) {
+			size = cramfs_load ((char *) offset, part, filename);
+		} else {
+			/* if this is not cramfs assume jffs2 */
+			size = jffs2_1pass_load((char *)offset, part, filename);
+		}
 
 		if (size > 0) {
 			char buf[10];
-			printf("### JFFS2 load complete: %d bytes loaded to 0x%lx\n",
-				size, offset);
+			printf("### %s load complete: %d bytes loaded to 0x%lx\n",
+				fsname, size, offset);
 			sprintf(buf, "%x", size);
 			setenv("filesize", buf);
 		} else {
-			printf("### JFFS2 LOAD ERROR<%x> for %s!\n", size, filename);
+			printf("### %s LOAD ERROR<%x> for %s!\n", fsname, size, filename);
 		}
 
 		return !(size > 0);
@@ -132,7 +149,13 @@
 
 	if (0 != (part=jffs2_part_info(part_num))){
 
-		ret = jffs2_1pass_ls(jffs2_part_info(part_num), filename);
+		/* check partition type for cramfs */
+		if (cramfs_check(part)) {
+			ret = cramfs_ls (part, filename);
+		} else {
+			/* if this is not cramfs assume jffs2 */
+			ret = jffs2_1pass_ls(part, filename);
+		}
 
 		return (ret == 1);
 	}
@@ -143,15 +166,24 @@
 int
 do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
-   struct part_info* jffs2_part_info(int);
-   int jffs2_1pass_info(struct part_info *);
-
-	int ret;
+	struct part_info* jffs2_part_info(int);
+	int jffs2_1pass_info(struct part_info *);
 	struct part_info *part;
+	char *fsname;
+	int ret;
 
-	if (0 != (part=jffs2_part_info(part_num))){
+	if ((part=jffs2_part_info(part_num))){
 
-		ret = jffs2_1pass_info(jffs2_part_info(part_num));
+		/* check partition type for cramfs */
+		fsname = (cramfs_check(part) ? "CRAMFS" : "JFFS2");
+		printf("### filesystem type is %s\n", fsname);
+
+		if (cramfs_check(part)) {
+			ret = cramfs_info (part);
+		} else {
+			/* if this is not cramfs assume jffs2 */
+			ret = jffs2_1pass_info(part);
+		}
 
 		return (ret == 1);
 	}
@@ -163,6 +195,7 @@
 do_jffs2_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 	int tmp_part;
+	char str_part_num[3];
    struct part_info* jffs2_part_info(int);
 
    if (argc >= 2) {
@@ -176,6 +209,8 @@
 	if (jffs2_part_info(tmp_part)){
 		printf("Partition changed to %d\n",tmp_part);
 		part_num=tmp_part;
+		sprintf(str_part_num, "%d", part_num);
+		setenv("partition", str_part_num);
 		return 0;
 	}
 
diff --git a/fs/Makefile b/fs/Makefile
index 204be2c..c773003 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -22,7 +22,7 @@
 #
 #
 
-SUBDIRS	:= jffs2 fdos fat
+SUBDIRS	:= jffs2 cramfs fdos fat
 
 .depend all:
 	@for dir in $(SUBDIRS) ; do \
diff --git a/fs/cramfs/Makefile b/fs/cramfs/Makefile
new file mode 100644
index 0000000..54a475e
--- /dev/null
+++ b/fs/cramfs/Makefile
@@ -0,0 +1,47 @@
+#
+# (C) Copyright 2000, 2001
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# 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., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= libcramfs.a
+
+AOBJS	=
+COBJS	= cramfs.o uncompress.o
+OBJS	= $(AOBJS) $(COBJS)
+
+#CPPFLAGS +=
+
+all:	$(LIB) $(AOBJS)
+
+$(LIB):	.depend $(OBJS)
+	$(AR) crv $@ $(OBJS)
+
+
+#########################################################################
+
+.depend:	Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c)
+		$(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@
+
+sinclude .depend
+
+#########################################################################
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
new file mode 100644
index 0000000..1e35104
--- /dev/null
+++ b/fs/cramfs/cramfs.c
@@ -0,0 +1,368 @@
+/*
+ * cramfs.c
+ *
+ * Copyright (C) 1999 Linus Torvalds
+ *
+ * Copyright (C) 2000-2002 Transmeta Corporation
+ *
+ * Copyright (C) 2003 Kai-Uwe Bloem,
+ * Auerswald GmbH & Co KG, <linux-development@auerswald.de>
+ * - adapted from the www.tuxbox.org u-boot tree, added "ls" command
+ *
+ * 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.
+ *
+ * Compressed ROM filesystem for Linux.
+ *
+ * TODO:
+ * add support for resolving symbolic links
+ */
+
+/*
+ * These are the VFS interfaces to the compressed ROM filesystem.
+ * The actual compression is based on zlib, see the other files.
+ */
+
+#include <common.h>
+#include <malloc.h>
+
+#if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
+
+#include <asm/byteorder.h>
+#include <linux/stat.h>
+#include <jffs2/load_kernel.h>
+#include "cramfs_fs.h"
+
+/* These two macros may change in future, to provide better st_ino
+   semantics. */
+#define CRAMINO(x)	(CRAMFS_GET_OFFSET(x) ? CRAMFS_GET_OFFSET(x)<<2 : 1)
+#define OFFSET(x)	((x)->i_ino)
+
+struct cramfs_super super;
+
+static int cramfs_read_super (struct part_info *info)
+{
+	unsigned long root_offset;
+
+	/* Read the first block and get the superblock from it */
+	memcpy (&super, (void *) info->offset, sizeof (super));
+
+	/* Do sanity checks on the superblock */
+	if (super.magic != CRAMFS_32 (CRAMFS_MAGIC)) {
+		/* check at 512 byte offset */
+		memcpy (&super, (void *) info->offset + 512, sizeof (super));
+		if (super.magic != CRAMFS_32 (CRAMFS_MAGIC)) {
+			printf ("cramfs: wrong magic\n");
+			return -1;
+		}
+	}
+
+	/* flags is reused several times, so swab it once */
+	super.flags = CRAMFS_32 (super.flags);
+	super.size = CRAMFS_32 (super.size);
+
+	/* get feature flags first */
+	if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) {
+		printf ("cramfs: unsupported filesystem features\n");
+		return -1;
+	}
+
+	/* Check that the root inode is in a sane state */
+	if (!S_ISDIR (CRAMFS_16 (super.root.mode))) {
+		printf ("cramfs: root is not a directory\n");
+		return -1;
+	}
+	root_offset = CRAMFS_GET_OFFSET (&(super.root)) << 2;
+	if (root_offset == 0) {
+		printf ("cramfs: empty filesystem");
+	} else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) &&
+		   ((root_offset != sizeof (struct cramfs_super)) &&
+		    (root_offset != 512 + sizeof (struct cramfs_super)))) {
+		printf ("cramfs: bad root offset %lu\n", root_offset);
+		return -1;
+	}
+
+	return 0;
+}
+
+static unsigned long cramfs_resolve (char *begin, unsigned long offset,
+				     unsigned long size, int raw,
+				     char *filename)
+{
+	unsigned long inodeoffset = 0, nextoffset;
+
+	while (inodeoffset < size) {
+		struct cramfs_inode *inode;
+		char *name;
+		int namelen;
+
+		inode = (struct cramfs_inode *) (begin + offset +
+						 inodeoffset);
+
+		/*
+		 * Namelengths on disk are shifted by two
+		 * and the name padded out to 4-byte boundaries
+		 * with zeroes.
+		 */
+		namelen = CRAMFS_GET_NAMELEN (inode) << 2;
+		name = (char *) inode + sizeof (struct cramfs_inode);
+
+		nextoffset =
+			inodeoffset + sizeof (struct cramfs_inode) + namelen;
+
+		for (;;) {
+			if (!namelen)
+				return -1;
+			if (name[namelen - 1])
+				break;
+			namelen--;
+		}
+
+		if (!strncmp (filename, name, namelen)) {
+			char *p = strtok (NULL, "/");
+
+			if (raw && (p == NULL || *p == '\0'))
+				return offset + inodeoffset;
+
+			if (S_ISDIR (CRAMFS_16 (inode->mode))) {
+				return cramfs_resolve (begin,
+						       CRAMFS_GET_OFFSET
+						       (inode) << 2,
+						       CRAMFS_24 (inode->
+								  size), raw,
+						       p);
+			} else if (S_ISREG (CRAMFS_16 (inode->mode))) {
+				return offset + inodeoffset;
+			} else {
+				printf ("%*.*s: unsupported file type (%x)\n",
+					namelen, namelen, name,
+					CRAMFS_16 (inode->mode));
+				return 0;
+			}
+		}
+
+		inodeoffset = nextoffset;
+	}
+
+	printf ("can't find corresponding entry\n");
+	return 0;
+}
+
+static int cramfs_uncompress (char *begin, unsigned long offset,
+			      unsigned long loadoffset)
+{
+	struct cramfs_inode *inode = (struct cramfs_inode *) (begin + offset);
+	unsigned long *block_ptrs = (unsigned long *)
+		(begin + (CRAMFS_GET_OFFSET (inode) << 2));
+	unsigned long curr_block = (CRAMFS_GET_OFFSET (inode) +
+				    (((CRAMFS_24 (inode->size)) +
+				      4095) >> 12)) << 2;
+	int size, total_size = 0;
+	int i;
+
+	cramfs_uncompress_init ();
+
+	for (i = 0; i < ((CRAMFS_24 (inode->size) + 4095) >> 12); i++) {
+		size = cramfs_uncompress_block ((void *) loadoffset,
+						(void *) (begin + curr_block),
+						(CRAMFS_32 (block_ptrs[i]) -
+						 curr_block));
+		if (size < 0)
+			return size;
+		loadoffset += size;
+		total_size += size;
+		curr_block = CRAMFS_32 (block_ptrs[i]);
+	}
+
+	cramfs_uncompress_exit ();
+	return total_size;
+}
+
+int cramfs_load (char *loadoffset, struct part_info *info, char *filename)
+{
+	unsigned long offset;
+
+	if (cramfs_read_super (info))
+		return -1;
+
+	offset = cramfs_resolve (info->offset,
+				 CRAMFS_GET_OFFSET (&(super.root)) << 2,
+				 CRAMFS_24 (super.root.size), 0,
+				 strtok (filename, "/"));
+
+	if (offset <= 0)
+		return offset;
+
+	return cramfs_uncompress (info->offset, offset,
+				  (unsigned long) loadoffset);
+}
+
+static char *mkmodestr (unsigned long mode, char *str)
+{
+	static const char *l = "xwr";
+	int mask = 1, i;
+	char c;
+
+	switch (mode & S_IFMT) {
+	case S_IFDIR:	str[0] = 'd'; break;
+	case S_IFBLK:	str[0] = 'b'; break;
+	case S_IFCHR:	str[0] = 'c'; break;
+	case S_IFIFO:	str[0] = 'f'; break;
+	case S_IFLNK:	str[0] = 'l'; break;
+	case S_IFSOCK:	str[0] = 's'; break;
+	case S_IFREG:	str[0] = '-'; break;
+	default: str[0] = '?'; break;
+	}
+
+	for (i = 0; i < 9; i++) {
+		c = l[i % 3];
+		str[9 - i] = (mode & mask) ? c : '-';
+		mask = mask << 1;
+	}
+
+	if (mode & S_ISUID) str[3] = (mode & S_IXUSR) ? 's' : 'S';
+	if (mode & S_ISGID) str[6] = (mode & S_IXGRP) ? 's' : 'S';
+	if (mode & S_ISVTX) str[9] = (mode & S_IXOTH) ? 't' : 'T';
+	str[10] = '\0';
+	return str;
+}
+
+static int cramfs_list_inode (struct part_info *info, unsigned long offset)
+{
+	struct cramfs_inode *inode = (struct cramfs_inode *)
+		(info->offset + offset);
+	char *name, str[20];
+	int namelen, nextoff;
+
+	/*
+	 * Namelengths on disk are shifted by two
+	 * and the name padded out to 4-byte boundaries
+	 * with zeroes.
+	 */
+	namelen = CRAMFS_GET_NAMELEN (inode) << 2;
+	name = (char *) inode + sizeof (struct cramfs_inode);
+	nextoff = namelen;
+
+	for (;;) {
+		if (!namelen)
+			return namelen;
+		if (name[namelen - 1])
+			break;
+		namelen--;
+	}
+
+	printf (" %s %8d %*.*s", mkmodestr (CRAMFS_16 (inode->mode), str),
+		CRAMFS_24 (inode->size), namelen, namelen, name);
+
+	if ((CRAMFS_16 (inode->mode) & S_IFMT) == S_IFLNK) {
+		/* symbolic link.
+		 * Unpack the link target, trusting in the inode's size field.
+		 */
+		unsigned long size = CRAMFS_24 (inode->size);
+		char *link = malloc (size);
+
+		if (link != NULL && cramfs_uncompress (info->offset, offset,
+						       (unsigned long) link)
+		    == size)
+			printf (" -> %*.*s\n", (int) size, (int) size, link);
+		else
+			printf (" [Error reading link]\n");
+		if (link)
+			free (link);
+	} else
+		printf ("\n");
+
+	return nextoff;
+}
+
+int cramfs_ls (struct part_info *info, char *filename)
+{
+	struct cramfs_inode *inode;
+	unsigned long inodeoffset = 0, nextoffset;
+	unsigned long offset, size;
+
+	if (cramfs_read_super (info))
+		return -1;
+
+	if (strlen (filename) == 0 || !strcmp (filename, "/")) {
+		/* Root directory. Use root inode in super block */
+		offset = CRAMFS_GET_OFFSET (&(super.root)) << 2;
+		size = CRAMFS_24 (super.root.size);
+	} else {
+		/* Resolve the path */
+		offset = cramfs_resolve (info->offset,
+					 CRAMFS_GET_OFFSET (&(super.root)) <<
+					 2, CRAMFS_24 (super.root.size), 1,
+					 strtok (filename, "/"));
+
+		if (offset <= 0)
+			return offset;
+
+		/* Resolving was successful. Examine the inode */
+		inode = (struct cramfs_inode *) (info->offset + offset);
+		if (!S_ISDIR (CRAMFS_16 (inode->mode))) {
+			/* It's not a directory - list it, and that's that */
+			return (cramfs_list_inode (info, offset) > 0);
+		}
+
+		/* It's a directory. List files within */
+		offset = CRAMFS_GET_OFFSET (inode) << 2;
+		size = CRAMFS_24 (inode->size);
+	}
+
+	/* List the given directory */
+	while (inodeoffset < size) {
+		inode = (struct cramfs_inode *) (info->offset + offset +
+						 inodeoffset);
+
+		nextoffset = cramfs_list_inode (info, offset + inodeoffset);
+		if (nextoffset == 0)
+			break;
+		inodeoffset += sizeof (struct cramfs_inode) + nextoffset;
+	}
+
+	return 1;
+}
+
+int cramfs_info (struct part_info *info)
+{
+	if (cramfs_read_super (info))
+		return 0;
+
+	printf ("size: 0x%x (%u)\n", super.size, super.size);
+
+	if (super.flags != 0) {
+		printf ("flags:\n");
+		if (super.flags & CRAMFS_FLAG_FSID_VERSION_2)
+			printf ("\tFSID version 2\n");
+		if (super.flags & CRAMFS_FLAG_SORTED_DIRS)
+			printf ("\tsorted dirs\n");
+		if (super.flags & CRAMFS_FLAG_HOLES)
+			printf ("\tholes\n");
+		if (super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET)
+			printf ("\tshifted root offset\n");
+	}
+
+	printf ("fsid:\n\tcrc: 0x%x\n\tedition: 0x%x\n",
+		super.fsid.crc, super.fsid.edition);
+	printf ("name: %16s\n", super.name);
+
+	return 1;
+}
+
+int cramfs_check (struct part_info *info)
+{
+	struct cramfs_super *sb = (struct cramfs_super *) info->offset;
+
+	if (sb->magic != CRAMFS_32 (CRAMFS_MAGIC)) {
+		/* check at 512 byte offset */
+		sb = (struct cramfs_super *) (info->offset + 512);
+		if (sb->magic != CRAMFS_32 (CRAMFS_MAGIC)) {
+			return 0;
+		}
+	}
+	return 1;
+}
+
+#endif /* CFG_FS_CRAMFS */
diff --git a/fs/cramfs/cramfs_fs.h b/fs/cramfs/cramfs_fs.h
new file mode 100644
index 0000000..78cc9ec
--- /dev/null
+++ b/fs/cramfs/cramfs_fs.h
@@ -0,0 +1,133 @@
+#ifndef __CRAMFS_FS_H
+#define __CRAMFS_FS_H
+
+/* Uncompression interfaces to the underlying zlib */
+int cramfs_uncompress_block (void *dst, void *src, int srclen);
+int cramfs_uncompress_init (void);
+
+#define CRAMFS_MAGIC		0x28cd3d45	/* some random number */
+#define CRAMFS_SIGNATURE	"Compressed ROMFS"
+
+/*
+ * Width of various bitfields in struct cramfs_inode.
+ * Primarily used to generate warnings in mkcramfs.
+ */
+#define CRAMFS_MODE_WIDTH 16
+#define CRAMFS_UID_WIDTH 16
+#define CRAMFS_SIZE_WIDTH 24
+#define CRAMFS_GID_WIDTH 8
+#define CRAMFS_NAMELEN_WIDTH 6
+#define CRAMFS_OFFSET_WIDTH 26
+
+/*
+ * Since inode.namelen is a unsigned 6-bit number, the maximum cramfs
+ * path length is 63 << 2 = 252.
+ */
+#define CRAMFS_MAXPATHLEN (((1 << CRAMFS_NAMELEN_WIDTH) - 1) << 2)
+
+/*
+ * Reasonably terse representation of the inode data.
+ */
+struct cramfs_inode {
+	u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH;
+	/* SIZE for device files is i_rdev */
+	u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH;
+	/* NAMELEN is the length of the file name, divided by 4 and
+	   rounded up.	(cramfs doesn't support hard links.) */
+	/* OFFSET: For symlinks and non-empty regular files, this
+	   contains the offset (divided by 4) of the file data in
+	   compressed form (starting with an array of block pointers;
+	   see README).	 For non-empty directories it is the offset
+	   (divided by 4) of the inode of the first file in that
+	   directory.  For anything else, offset is zero. */
+	u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH;
+};
+
+struct cramfs_info {
+	u32 crc;
+	u32 edition;
+	u32 blocks;
+	u32 files;
+};
+
+/*
+ * Superblock information at the beginning of the FS.
+ */
+struct cramfs_super {
+	u32 magic;			/* 0x28cd3d45 - random number */
+	u32 size;			/* length in bytes */
+	u32 flags;			/* feature flags */
+	u32 future;			/* reserved for future use */
+	u8 signature[16];		/* "Compressed ROMFS" */
+	struct cramfs_info fsid;	/* unique filesystem info */
+	u8 name[16];			/* user-defined name */
+	struct cramfs_inode root;	/* root inode data */
+};
+
+/*
+ * Feature flags
+ *
+ * 0x00000000 - 0x000000ff: features that work for all past kernels
+ * 0x00000100 - 0xffffffff: features that don't work for past kernels
+ */
+#define CRAMFS_FLAG_FSID_VERSION_2	0x00000001	/* fsid version #2 */
+#define CRAMFS_FLAG_SORTED_DIRS		0x00000002	/* sorted dirs */
+#define CRAMFS_FLAG_HOLES		0x00000100	/* support for holes */
+#define CRAMFS_FLAG_WRONG_SIGNATURE	0x00000200	/* reserved */
+#define CRAMFS_FLAG_SHIFTED_ROOT_OFFSET 0x00000400	/* shifted root fs */
+
+/*
+ * Valid values in super.flags.	 Currently we refuse to mount
+ * if (flags & ~CRAMFS_SUPPORTED_FLAGS).  Maybe that should be
+ * changed to test super.future instead.
+ */
+#define CRAMFS_SUPPORTED_FLAGS	( 0x000000ff \
+				| CRAMFS_FLAG_HOLES \
+				| CRAMFS_FLAG_WRONG_SIGNATURE \
+				| CRAMFS_FLAG_SHIFTED_ROOT_OFFSET )
+
+/*
+ * Since cramfs is little-endian, provide macros to swab the bitfields.
+ */
+
+#ifndef __BYTE_ORDER
+#if defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN)
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#elif defined(__BIG_ENDIAN) && !defined(__LITTLE_ENDIAN)
+#define __BYTE_ORDER __BIG_ENDIAN
+#else
+#error "unable to define __BYTE_ORDER"
+#endif
+#endif /* not __BYTE_ORDER */
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define CRAMFS_16(x)	(x)
+#define CRAMFS_24(x)	(x)
+#define CRAMFS_32(x)	(x)
+#define CRAMFS_GET_NAMELEN(x)	((x)->namelen)
+#define CRAMFS_GET_OFFSET(x)	((x)->offset)
+#define CRAMFS_SET_OFFSET(x,y)	((x)->offset = (y))
+#define CRAMFS_SET_NAMELEN(x,y) ((x)->namelen = (y))
+#elif __BYTE_ORDER == __BIG_ENDIAN
+#ifdef __KERNEL__
+#define CRAMFS_16(x)	swab16(x)
+#define CRAMFS_24(x)	((swab32(x)) >> 8)
+#define CRAMFS_32(x)	swab32(x)
+#else /* not __KERNEL__ */
+#define CRAMFS_16(x)	bswap_16(x)
+#define CRAMFS_24(x)	((bswap_32(x)) >> 8)
+#define CRAMFS_32(x)	bswap_32(x)
+#endif /* not __KERNEL__ */
+#define CRAMFS_GET_NAMELEN(x)	(((u8*)(x))[8] & 0x3f)
+#define CRAMFS_GET_OFFSET(x)	((CRAMFS_24(((u32*)(x))[2] & 0xffffff) << 2) |\
+				 ((((u32*)(x))[2] & 0xc0000000) >> 30))
+#define CRAMFS_SET_NAMELEN(x,y) (((u8*)(x))[8] = (((0x3f & (y))) | \
+						  (0xc0 & ((u8*)(x))[8])))
+#define CRAMFS_SET_OFFSET(x,y)	(((u32*)(x))[2] = (((y) & 3) << 30) | \
+				 CRAMFS_24((((y) & 0x03ffffff) >> 2)) | \
+				 (((u32)(((u8*)(x))[8] & 0x3f)) << 24))
+#else
+#error "__BYTE_ORDER must be __LITTLE_ENDIAN or __BIG_ENDIAN"
+#endif
+
+#endif /* not __CRAMFS_FS_H */
diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c
new file mode 100644
index 0000000..170832a
--- /dev/null
+++ b/fs/cramfs/uncompress.c
@@ -0,0 +1,106 @@
+/*
+ * uncompress.c
+ *
+ * Copyright (C) 1999 Linus Torvalds
+ * Copyright (C) 2000-2002 Transmeta Corporation
+ *
+ * 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.
+ *
+ * cramfs interfaces to the uncompression library. There's really just
+ * three entrypoints:
+ *
+ *  - cramfs_uncompress_init() - called to initialize the thing.
+ *  - cramfs_uncompress_exit() - tell me when you're done
+ *  - cramfs_uncompress_block() - uncompress a block.
+ *
+ * NOTE NOTE NOTE! The uncompression is entirely single-threaded. We
+ * only have one stream, and we'll initialize it only once even if it
+ * then is used by multiple filesystems.
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <watchdog.h>
+#include <zlib.h>
+
+#if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
+
+static z_stream stream;
+
+#define ZALLOC_ALIGNMENT	16
+
+static void *zalloc (void *x, unsigned items, unsigned size)
+{
+	void *p;
+
+	size *= items;
+	size = (size + ZALLOC_ALIGNMENT - 1) & ~(ZALLOC_ALIGNMENT - 1);
+
+	p = malloc (size);
+
+	return (p);
+}
+
+static void zfree (void *x, void *addr, unsigned nb)
+{
+	free (addr);
+}
+
+/* Returns length of decompressed data. */
+int cramfs_uncompress_block (void *dst, void *src, int srclen)
+{
+	int err;
+
+	inflateReset (&stream);
+
+	stream.next_in = src;
+	stream.avail_in = srclen;
+
+	stream.next_out = dst;
+	stream.avail_out = 4096 * 2;
+
+	err = inflate (&stream, Z_FINISH);
+
+	if (err != Z_STREAM_END)
+		goto err;
+	return stream.total_out;
+
+      err:
+	/*printf ("Error %d while decompressing!\n", err); */
+	/*printf ("%p(%d)->%p\n", src, srclen, dst); */
+	return -1;
+}
+
+int cramfs_uncompress_init (void)
+{
+	int err;
+
+	stream.zalloc = zalloc;
+	stream.zfree = zfree;
+	stream.next_in = 0;
+	stream.avail_in = 0;
+
+#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
+	stream.outcb = (cb_func) WATCHDOG_RESET;
+#else
+	stream.outcb = Z_NULL;
+#endif /* CONFIG_HW_WATCHDOG */
+
+	err = inflateInit (&stream);
+	if (err != Z_OK) {
+		printf ("Error: inflateInit2() returned %d\n", err);
+		return -1;
+	}
+
+	return 0;
+}
+
+int cramfs_uncompress_exit (void)
+{
+	inflateEnd (&stream);
+	return 0;
+}
+
+#endif /* CFG_FS_CRAMFS */
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index e6d7d3d..fb69bee 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -106,8 +106,8 @@
  *
  * You still should have paper bags at hand :-(. The code lacks more or less
  * any comment, and is still arcane and difficult to read in places. As this
- * is incompatible with any new code from the jffs2 maintainers anyway, it
- * should probably be dumped and replaced by something like jffs2reader!
+ * might be incompatible with any new code from the jffs2 maintainers anyway,
+ * it should probably be dumped and replaced by something like jffs2reader!
  */
 
 
diff --git a/include/cramfs/cramfs_fs.h b/include/cramfs/cramfs_fs.h
new file mode 100644
index 0000000..7b292c0c
--- /dev/null
+++ b/include/cramfs/cramfs_fs.h
@@ -0,0 +1,98 @@
+#ifndef __CRAMFS_H
+#define __CRAMFS_H
+
+#ifndef __KERNEL__
+
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned int u32;
+
+#endif
+
+#define CRAMFS_MAGIC		0x28cd3d45	/* some random number */
+#define CRAMFS_SIGNATURE	"Compressed ROMFS"
+
+/*
+ * Width of various bitfields in struct cramfs_inode.
+ * Primarily used to generate warnings in mkcramfs.
+ */
+#define CRAMFS_MODE_WIDTH 16
+#define CRAMFS_UID_WIDTH 16
+#define CRAMFS_SIZE_WIDTH 24
+#define CRAMFS_GID_WIDTH 8
+#define CRAMFS_NAMELEN_WIDTH 6
+#define CRAMFS_OFFSET_WIDTH 26
+
+/*
+ * Since inode.namelen is a unsigned 6-bit number, the maximum cramfs
+ * path length is 63 << 2 = 252.
+ */
+#define CRAMFS_MAXPATHLEN (((1 << CRAMFS_NAMELEN_WIDTH) - 1) << 2)
+
+/*
+ * Reasonably terse representation of the inode data.
+ */
+struct cramfs_inode {
+	u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH;
+	/* SIZE for device files is i_rdev */
+	u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH;
+	/* NAMELEN is the length of the file name, divided by 4 and
+	   rounded up.	(cramfs doesn't support hard links.) */
+	/* OFFSET: For symlinks and non-empty regular files, this
+	   contains the offset (divided by 4) of the file data in
+	   compressed form (starting with an array of block pointers;
+	   see README).	 For non-empty directories it is the offset
+	   (divided by 4) of the inode of the first file in that
+	   directory.  For anything else, offset is zero. */
+	u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH;
+};
+
+struct cramfs_info {
+	u32 crc;
+	u32 edition;
+	u32 blocks;
+	u32 files;
+};
+
+/*
+ * Superblock information at the beginning of the FS.
+ */
+struct cramfs_super {
+	u32 magic;			/* 0x28cd3d45 - random number */
+	u32 size;			/* length in bytes */
+	u32 flags;			/* feature flags */
+	u32 future;			/* reserved for future use */
+	u8 signature[16];		/* "Compressed ROMFS" */
+	struct cramfs_info fsid;	/* unique filesystem info */
+	u8 name[16];			/* user-defined name */
+	struct cramfs_inode root;	/* root inode data */
+};
+
+/*
+ * Feature flags
+ *
+ * 0x00000000 - 0x000000ff: features that work for all past kernels
+ * 0x00000100 - 0xffffffff: features that don't work for past kernels
+ */
+#define CRAMFS_FLAG_FSID_VERSION_2	0x00000001	/* fsid version #2 */
+#define CRAMFS_FLAG_SORTED_DIRS		0x00000002	/* sorted dirs */
+#define CRAMFS_FLAG_HOLES		0x00000100	/* support for holes */
+#define CRAMFS_FLAG_WRONG_SIGNATURE	0x00000200	/* reserved */
+#define CRAMFS_FLAG_SHIFTED_ROOT_OFFSET 0x00000400	/* shifted root fs */
+
+/*
+ * Valid values in super.flags.	 Currently we refuse to mount
+ * if (flags & ~CRAMFS_SUPPORTED_FLAGS).  Maybe that should be
+ * changed to test super.future instead.
+ */
+#define CRAMFS_SUPPORTED_FLAGS	( 0x000000ff \
+				| CRAMFS_FLAG_HOLES \
+				| CRAMFS_FLAG_WRONG_SIGNATURE \
+				| CRAMFS_FLAG_SHIFTED_ROOT_OFFSET )
+
+/* Uncompression interfaces to the underlying zlib */
+int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen);
+int cramfs_uncompress_init(void);
+int cramfs_uncompress_exit(void);
+
+#endif
diff --git a/include/cramfs/cramfs_fs_sb.h b/include/cramfs/cramfs_fs_sb.h
new file mode 100644
index 0000000..bc23f94
--- /dev/null
+++ b/include/cramfs/cramfs_fs_sb.h
@@ -0,0 +1,19 @@
+#ifndef _CRAMFS_FS_SB
+#define _CRAMFS_FS_SB
+
+/*
+ * cramfs super-block data in memory
+ */
+struct cramfs_sb_info {
+			unsigned long magic;
+			unsigned long size;
+			unsigned long blocks;
+			unsigned long files;
+			unsigned long flags;
+#ifdef CONFIG_CRAMFS_LINEAR
+			unsigned long linear_phys_addr;
+			char *        linear_virt_addr;
+#endif
+};
+
+#endif
