--- linux-2.6.27.orig/fs/Kconfig 2008-10-10 02:13:53 +0400 +++ linux-2.6.27.squash/fs/Kconfig 2009-06-19 17:57:16 +0400 @@ -1350,2 +1350,4 @@ config CRAMFS +source "fs/squashfs/Kconfig" + config VXFS_FS --- linux-2.6.27.orig/fs/Makefile 2008-10-10 02:13:53 +0400 +++ linux-2.6.27.squash/fs/Makefile 2009-06-19 17:56:02 +0400 @@ -76,2 +76,3 @@ obj-$(CONFIG_EXT2_FS) += ext2/ obj-$(CONFIG_CRAMFS) += cramfs/ +obj-$(CONFIG_SQUASHFS) += squashfs/ obj-y += ramfs/ --- linux-2.6.27.orig/init/do_mounts_rd.c 2008-10-10 02:13:53 +0400 +++ linux-2.6.27.squash/init/do_mounts_rd.c 2009-06-19 17:53:22 +0400 @@ -11,2 +11,3 @@ #include "do_mounts.h" +#include "../fs/squashfs/squashfs_fs.h" @@ -43,2 +44,3 @@ static int __init crd_load(int in_fd, in * cramfs + * squashfs * gzip @@ -53,2 +55,3 @@ identify_ramdisk_image(int fd, int start struct cramfs_super *cramfsb; + struct squashfs_super_block *squashfsb; int nblocks = -1; @@ -64,2 +67,3 @@ identify_ramdisk_image(int fd, int start cramfsb = (struct cramfs_super *) buf; + squashfsb = (struct squashfs_super_block *) buf; memset(buf, 0xe5, size); @@ -101,2 +105,12 @@ identify_ramdisk_image(int fd, int start + /* squashfs is at block zero too */ + if (le32_to_cpu(squashfsb->s_magic) == SQUASHFS_MAGIC) { + printk(KERN_NOTICE + "RAMDISK: squashfs filesystem found at block %d\n", + start_block); + nblocks = (le64_to_cpu(squashfsb->bytes_used) + BLOCK_SIZE - 1) + >> BLOCK_SIZE_BITS; + goto done; + } + /*