SOURCES (CRI): kernel-CRI-squashfs.patch, kernel-CRI-lzma-vmlinuz.patch - u...
hawk
hawk at pld-linux.org
Thu May 8 18:59:15 CEST 2008
Author: hawk Date: Thu May 8 16:59:15 2008 GMT
Module: SOURCES Tag: CRI
---- Log message:
- updated for 2.6.25
---- Files affected:
SOURCES:
kernel-CRI-squashfs.patch (1.1.2.1 -> 1.1.2.2) , kernel-CRI-lzma-vmlinuz.patch (1.1.2.1 -> 1.1.2.2)
---- Diffs:
================================================================
Index: SOURCES/kernel-CRI-squashfs.patch
diff -u SOURCES/kernel-CRI-squashfs.patch:1.1.2.1 SOURCES/kernel-CRI-squashfs.patch:1.1.2.2
--- SOURCES/kernel-CRI-squashfs.patch:1.1.2.1 Wed May 7 18:15:12 2008
+++ SOURCES/kernel-CRI-squashfs.patch Thu May 8 18:59:10 2008
@@ -1,7 +1,7 @@
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/fs/Kconfig linux-2.6.24.2/fs/Kconfig
---- linux-2.6.24.2.orig/fs/Kconfig 2008-02-23 13:10:41.000000000 +0100
-+++ linux-2.6.24.2/fs/Kconfig 2008-02-23 13:32:46.000000000 +0100
-@@ -1405,6 +1405,56 @@ config CRAMFS
+diff -urN linux-2.6.25.orig/fs/Kconfig linux-2.6.25/fs/Kconfig
+--- linux-2.6.25.orig/fs/Kconfig 2008-04-17 04:49:44.000000000 +0200
++++ linux-2.6.25/fs/Kconfig 2008-04-29 13:25:27.000000000 +0200
+@@ -1367,6 +1367,56 @@
If unsure, say N.
@@ -58,10 +58,10 @@
config VXFS_FS
tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
depends on BLOCK
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/fs/Makefile linux-2.6.24.2/fs/Makefile
---- linux-2.6.24.2.orig/fs/Makefile 2008-02-23 13:10:41.000000000 +0100
-+++ linux-2.6.24.2/fs/Makefile 2008-02-23 13:32:46.000000000 +0100
-@@ -72,6 +72,7 @@ obj-$(CONFIG_JBD) += jbd/
+diff -urN linux-2.6.25.orig/fs/Makefile linux-2.6.25/fs/Makefile
+--- linux-2.6.25.orig/fs/Makefile 2008-04-17 04:49:44.000000000 +0200
++++ linux-2.6.25/fs/Makefile 2008-04-29 13:25:27.000000000 +0200
+@@ -73,6 +73,7 @@
obj-$(CONFIG_JBD2) += jbd2/
obj-$(CONFIG_EXT2_FS) += ext2/
obj-$(CONFIG_CRAMFS) += cramfs/
@@ -69,10 +69,10 @@
obj-y += ramfs/
obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
obj-$(CONFIG_CODA_FS) += coda/
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/fs/squashfs/inode.c linux-2.6.24.2/fs/squashfs/inode.c
---- linux-2.6.24.2.orig/fs/squashfs/inode.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.24.2/fs/squashfs/inode.c 2008-02-23 13:32:46.000000000 +0100
-@@ -0,0 +1,2192 @@
+diff -urN linux-2.6.25.orig/fs/squashfs/inode.c linux-2.6.25/fs/squashfs/inode.c
+--- linux-2.6.25.orig/fs/squashfs/inode.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25/fs/squashfs/inode.c 2008-04-29 13:25:27.000000000 +0200
+@@ -0,0 +1,2158 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
+ *
@@ -103,6 +103,8 @@
+#include <linux/squashfs_fs_sb.h>
+#include <linux/squashfs_fs_i.h>
+#include <linux/buffer_head.h>
++#include <linux/exportfs.h>
++#include <linux/sched.h>
+#include <linux/vfs.h>
+#include <linux/vmalloc.h>
+#include <linux/smp_lock.h>
@@ -110,9 +112,8 @@
+
+#include "squashfs.h"
+
-+int squashfs_cached_blks;
++static int squashfs_cached_blks;
+
-+static void vfs_read_inode(struct inode *i);
+static struct dentry *squashfs_get_parent(struct dentry *child);
+static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode);
+static int squashfs_statfs(struct dentry *, struct kstatfs *);
@@ -158,7 +159,6 @@
+ .destroy_inode = squashfs_destroy_inode,
+ .statfs = squashfs_statfs,
+ .put_super = squashfs_put_super,
-+ .read_inode = vfs_read_inode
+};
+
+static struct export_operations squashfs_export_ops = {
@@ -676,53 +676,12 @@
+ else
+ i->i_gid = msblk->guid[inodeb->guid];
+}
-+
-+
-+static squashfs_inode_t squashfs_inode_lookup(struct super_block *s, int ino)
-+{
-+ struct squashfs_sb_info *msblk = s->s_fs_info;
-+ long long start = msblk->inode_lookup_table[SQUASHFS_LOOKUP_BLOCK(ino - 1)];
-+ int offset = SQUASHFS_LOOKUP_BLOCK_OFFSET(ino - 1);
-+ squashfs_inode_t inode;
-+
-+ TRACE("Entered squashfs_inode_lookup, inode_number = %d\n", ino);
-+
-+ if (msblk->swap) {
-+ squashfs_inode_t sinode;
-+
-+ if (!squashfs_get_cached_block(s, &sinode, start, offset,
-+ sizeof(sinode), &start, &offset))
-+ goto out;
-+ SQUASHFS_SWAP_INODE_T((&inode), &sinode);
-+ } else if (!squashfs_get_cached_block(s, &inode, start, offset,
-+ sizeof(inode), &start, &offset))
-+ goto out;
-+
-+ TRACE("squashfs_inode_lookup, inode = 0x%llx\n", inode);
-+
-+ return inode;
-+
-+out:
-+ return SQUASHFS_INVALID_BLK;
-+}
+
+
-+static void vfs_read_inode(struct inode *i)
-+{
-+ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
-+ squashfs_inode_t inode = squashfs_inode_lookup(i->i_sb, i->i_ino);
-+
-+ TRACE("Entered vfs_read_inode\n");
-+
-+ if(inode != SQUASHFS_INVALID_BLK)
-+ (msblk->read_inode)(i, inode);
-+}
-+
-+
+static struct dentry *squashfs_get_parent(struct dentry *child)
+{
+ struct inode *i = child->d_inode;
-+ struct inode *parent = iget(i->i_sb, SQUASHFS_I(i)->u.s2.parent_inode);
++ struct inode *parent = iget_locked(i->i_sb, SQUASHFS_I(i)->u.s2.parent_inode);
+ struct dentry *rv;
+
+ TRACE("Entered squashfs_get_parent\n");
@@ -733,6 +692,10 @@
+ }
+
+ rv = d_alloc_anon(parent);
++ if(parent->i_state & I_NEW) {
++ unlock_new_inode(parent);
++ }
++
+ if(rv == NULL)
+ rv = ERR_PTR(-ENOMEM);
+
@@ -749,6 +712,9 @@
+
+ TRACE("Entered squashfs_iget\n");
+
++ if(!i)
++ return ERR_PTR(-ENOMEM);
++
+ if(i && (i->i_state & I_NEW)) {
+ (msblk->read_inode)(i, inode);
+ unlock_new_inode(i);
@@ -2265,9 +2231,9 @@
+MODULE_DESCRIPTION("squashfs 3.2-r2-CVS, a compressed read-only filesystem");
+MODULE_AUTHOR("Phillip Lougher <phillip at lougher.demon.co.uk>");
+MODULE_LICENSE("GPL");
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/fs/squashfs/Makefile linux-2.6.24.2/fs/squashfs/Makefile
---- linux-2.6.24.2.orig/fs/squashfs/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.24.2/fs/squashfs/Makefile 2008-02-23 13:32:46.000000000 +0100
+diff -urN linux-2.6.25.orig/fs/squashfs/Makefile linux-2.6.25/fs/squashfs/Makefile
+--- linux-2.6.25.orig/fs/squashfs/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25/fs/squashfs/Makefile 2008-04-29 13:25:27.000000000 +0200
@@ -0,0 +1,7 @@
+#
+# Makefile for the linux squashfs routines.
@@ -2276,9 +2242,9 @@
+obj-$(CONFIG_SQUASHFS) += squashfs.o
+squashfs-y += inode.o
+squashfs-y += squashfs2_0.o
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/fs/squashfs/squashfs2_0.c linux-2.6.24.2/fs/squashfs/squashfs2_0.c
---- linux-2.6.24.2.orig/fs/squashfs/squashfs2_0.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.24.2/fs/squashfs/squashfs2_0.c 2008-02-23 13:32:46.000000000 +0100
+diff -urN linux-2.6.25.orig/fs/squashfs/squashfs2_0.c linux-2.6.25/fs/squashfs/squashfs2_0.c
+--- linux-2.6.25.orig/fs/squashfs/squashfs2_0.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25/fs/squashfs/squashfs2_0.c 2008-04-29 13:25:27.000000000 +0200
@@ -0,0 +1,740 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
@@ -3020,9 +2986,9 @@
+
+ return 1;
+}
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/fs/squashfs/squashfs.h linux-2.6.24.2/fs/squashfs/squashfs.h
---- linux-2.6.24.2.orig/fs/squashfs/squashfs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.24.2/fs/squashfs/squashfs.h 2008-02-23 13:32:46.000000000 +0100
+diff -urN linux-2.6.25.orig/fs/squashfs/squashfs.h linux-2.6.25/fs/squashfs/squashfs.h
+--- linux-2.6.25.orig/fs/squashfs/squashfs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25/fs/squashfs/squashfs.h 2008-04-29 13:25:27.000000000 +0200
@@ -0,0 +1,86 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
@@ -3110,9 +3076,9 @@
+ return 0;
+}
+#endif
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/include/linux/squashfs_fs.h linux-2.6.24.2/include/linux/squashfs_fs.h
---- linux-2.6.24.2.orig/include/linux/squashfs_fs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.24.2/include/linux/squashfs_fs.h 2008-02-23 13:32:46.000000000 +0100
+diff -urN linux-2.6.25.orig/include/linux/squashfs_fs.h linux-2.6.25/include/linux/squashfs_fs.h
+--- linux-2.6.25.orig/include/linux/squashfs_fs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25/include/linux/squashfs_fs.h 2008-04-29 13:25:27.000000000 +0200
@@ -0,0 +1,935 @@
+#ifndef SQUASHFS_FS
+#define SQUASHFS_FS
@@ -4049,9 +4015,9 @@
+
+#endif
+#endif
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/include/linux/squashfs_fs_i.h linux-2.6.24.2/include/linux/squashfs_fs_i.h
---- linux-2.6.24.2.orig/include/linux/squashfs_fs_i.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.24.2/include/linux/squashfs_fs_i.h 2008-02-23 13:32:46.000000000 +0100
+diff -urN linux-2.6.25.orig/include/linux/squashfs_fs_i.h linux-2.6.25/include/linux/squashfs_fs_i.h
+--- linux-2.6.25.orig/include/linux/squashfs_fs_i.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25/include/linux/squashfs_fs_i.h 2008-04-29 13:25:27.000000000 +0200
@@ -0,0 +1,45 @@
+#ifndef SQUASHFS_FS_I
+#define SQUASHFS_FS_I
@@ -4098,9 +4064,9 @@
+ struct inode vfs_inode;
+};
+#endif
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/include/linux/squashfs_fs_sb.h linux-2.6.24.2/include/linux/squashfs_fs_sb.h
---- linux-2.6.24.2.orig/include/linux/squashfs_fs_sb.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.24.2/include/linux/squashfs_fs_sb.h 2008-02-23 13:32:46.000000000 +0100
+diff -urN linux-2.6.25.orig/include/linux/squashfs_fs_sb.h linux-2.6.25/include/linux/squashfs_fs_sb.h
+--- linux-2.6.25.orig/include/linux/squashfs_fs_sb.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25/include/linux/squashfs_fs_sb.h 2008-04-29 13:25:27.000000000 +0200
@@ -0,0 +1,76 @@
+#ifndef SQUASHFS_FS_SB
+#define SQUASHFS_FS_SB
@@ -4178,9 +4144,9 @@
+ int (*read_fragment_index_table)(struct super_block *s);
+};
+#endif
-diff -x .gitignore -Nurp linux-2.6.24.2.orig/init/do_mounts_rd.c linux-2.6.24.2/init/do_mounts_rd.c
---- linux-2.6.24.2.orig/init/do_mounts_rd.c 2008-02-23 13:10:46.000000000 +0100
-+++ linux-2.6.24.2/init/do_mounts_rd.c 2008-02-23 13:32:46.000000000 +0100
+diff -urN linux-2.6.25.orig/init/do_mounts_rd.c linux-2.6.25/init/do_mounts_rd.c
+--- linux-2.6.25.orig/init/do_mounts_rd.c 2008-04-17 04:49:44.000000000 +0200
++++ linux-2.6.25/init/do_mounts_rd.c 2008-04-29 13:25:27.000000000 +0200
@@ -5,6 +5,7 @@
#include <linux/ext2_fs.h>
#include <linux/romfs_fs.h>
@@ -4189,7 +4155,7 @@
#include <linux/initrd.h>
#include <linux/string.h>
-@@ -39,6 +40,7 @@ static int __init crd_load(int in_fd, in
+@@ -39,6 +40,7 @@
* numbers could not be found.
*
* We currently check for the following magic numbers:
@@ -4197,7 +4163,7 @@
* minix
* ext2
* romfs
-@@ -53,6 +55,7 @@ identify_ramdisk_image(int fd, int start
+@@ -53,6 +55,7 @@
struct ext2_super_block *ext2sb;
struct romfs_super_block *romfsb;
struct cramfs_super *cramfsb;
@@ -4205,7 +4171,7 @@
int nblocks = -1;
unsigned char *buf;
-@@ -64,6 +67,7 @@ identify_ramdisk_image(int fd, int start
+@@ -64,6 +67,7 @@
ext2sb = (struct ext2_super_block *) buf;
romfsb = (struct romfs_super_block *) buf;
cramfsb = (struct cramfs_super *) buf;
@@ -4213,7 +4179,7 @@
memset(buf, 0xe5, size);
/*
-@@ -101,6 +105,18 @@ identify_ramdisk_image(int fd, int start
+@@ -101,6 +105,18 @@
goto done;
}
================================================================
Index: SOURCES/kernel-CRI-lzma-vmlinuz.patch
diff -u SOURCES/kernel-CRI-lzma-vmlinuz.patch:1.1.2.1 SOURCES/kernel-CRI-lzma-vmlinuz.patch:1.1.2.2
--- SOURCES/kernel-CRI-lzma-vmlinuz.patch:1.1.2.1 Wed May 7 18:11:57 2008
+++ SOURCES/kernel-CRI-lzma-vmlinuz.patch Thu May 8 18:59:10 2008
@@ -1,55 +1,67 @@
-diff -urN linux-2.6.24.2.orig/arch/x86/boot/compressed/Makefile_32 linux-2.6.24.2/arch/x86/boot/compressed/Makefile_32
---- linux-2.6.24.2.orig/arch/x86/boot/compressed/Makefile_32 2008-02-23 13:10:32.000000000 +0100
-+++ linux-2.6.24.2/arch/x86/boot/compressed/Makefile_32 2008-02-23 13:29:24.000000000 +0100
+diff -urNp linux-2.6.25.orig/arch/x86/boot/compressed/Makefile linux-2.6.25/arch/x86/boot/compressed/Makefile
+--- linux-2.6.25.orig/arch/x86/boot/compressed/Makefile 2008-05-08 14:47:45.000000000 +0200
++++ linux-2.6.25/arch/x86/boot/compressed/Makefile 2008-05-08 17:15:11.000000000 +0200
@@ -4,7 +4,7 @@
# create a compressed vmlinux image from the original vmlinux
#
--targets := vmlinux vmlinux.bin vmlinux.bin.gz head_32.o misc_32.o piggy.o \
-+targets := vmlinux vmlinux.bin head_32.o piggy.o \
- vmlinux.bin.all vmlinux.relocs
- EXTRA_AFLAGS := -traditional
+-targets := vmlinux vmlinux.bin vmlinux.bin.gz head_$(BITS).o misc.o piggy.o
++targets := vmlinux vmlinux.bin head_$(BITS).o misc.o piggy.o
-@@ -17,9 +17,7 @@
- $(call cc-option,-fno-stack-protector)
- LDFLAGS := -m elf_i386
+ KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
+ KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
+@@ -17,10 +17,12 @@ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__A
--$(obj)/vmlinux: $(src)/vmlinux_32.lds $(obj)/head_32.o $(obj)/misc_32.o $(obj)/piggy.o FORCE
+ LDFLAGS := -m elf_$(UTS_MACHINE)
+ LDFLAGS_vmlinux := -T
++ifeq ($(CONFIG_X86_32),y)
++LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
++else
++LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
++endif
+
+-$(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE
- $(call if_changed,ld)
- @:
-+LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
+ OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note -R .comment -S
$(obj)/vmlinux.bin: vmlinux FORCE
- $(call if_changed,objcopy)
-@@ -36,6 +34,13 @@
+@@ -43,6 +45,13 @@ quiet_cmd_relocbin = BUILD $@
$(obj)/vmlinux.bin.all: $(vmlinux.bin.all-y) FORCE
$(call if_changed,relocbin)
+ifeq ($(CONFIG_KERNEL_GZIP),y)
-+targets += vmlinux.bin.gz misc_32.o
++targets += vmlinux.bin.gz misc.o
+
-+$(obj)/vmlinux: $(src)/vmlinux_32.lds $(obj)/head_32.o $(obj)/misc_32.o $(obj)/piggy.o FORCE
++$(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE
+ $(call if_changed,ld)
+ @:
+
ifdef CONFIG_RELOCATABLE
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE
$(call if_changed,gzip)
-@@ -44,7 +49,26 @@
+@@ -50,15 +59,38 @@ else
+ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip)
endif
-
-LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
+
+ else
+ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
+ $(call if_changed,gzip)
-
- $(obj)/piggy.o: $(src)/vmlinux_32.scr $(obj)/vmlinux.bin.gz FORCE
+-LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
+ endif
+
+
+ $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
$(call if_changed,ld)
+endif
+
+ifeq ($(CONFIG_KERNEL_LZMA),y)
-+targets += vmlinux.bin.lzma misc_lzma_32.o
++targets += vmlinux.bin.lzma misc_lzma.o
+
-+
-+$(obj)/vmlinux: $(src)/vmlinux_32.lds $(obj)/head_32.o $(obj)/misc_lzma_32.o $(obj)/piggy.o FORCE
++$(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/misc_lzma.o $(obj)/piggy.o FORCE
+ $(call if_changed,ld)
+ @:
+
@@ -61,64 +73,19 @@
+ $(call if_changed,lzma)
+endif
+
-+$(obj)/piggy.o: $(src)/vmlinux_lzma_32.scr $(obj)/vmlinux.bin.lzma FORCE
-+ $(call if_changed,ld)
-+endif
-diff -urN linux-2.6.24.2.orig/arch/x86/boot/compressed/Makefile_64 linux-2.6.24.2/arch/x86/boot/compressed/Makefile_64
---- linux-2.6.24.2.orig/arch/x86/boot/compressed/Makefile_64 2008-02-23 13:10:32.000000000 +0100
-+++ linux-2.6.24.2/arch/x86/boot/compressed/Makefile_64 2008-02-23 13:29:21.000000000 +0100
-@@ -4,7 +4,7 @@
- # create a compressed vmlinux image from the original vmlinux
- #
-
--targets := vmlinux vmlinux.bin vmlinux.bin.gz head_64.o misc_64.o piggy.o
-+targets := vmlinux vmlinux.bin head_64.o piggy.o
-
- KBUILD_CFLAGS := -m64 -D__KERNEL__ $(LINUXINCLUDE) -O2 \
- -fno-strict-aliasing -fPIC -mcmodel=small \
-@@ -14,6 +14,12 @@
- LDFLAGS := -m elf_x86_64
-
- LDFLAGS_vmlinux := -T
-+
-+LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
-+
-+ifeq ($(CONFIG_KERNEL_GZIP),y)
-+targets += vmlinux.bin.gz misc_64.o
-+
- $(obj)/vmlinux: $(src)/vmlinux_64.lds $(obj)/head_64.o $(obj)/misc_64.o $(obj)/piggy.o FORCE
- $(call if_changed,ld)
- @:
-@@ -24,7 +30,23 @@
- $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
- $(call if_changed,gzip)
-
--LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
--
- $(obj)/piggy.o: $(obj)/vmlinux_64.scr $(obj)/vmlinux.bin.gz FORCE
- $(call if_changed,ld)
-+endif
-+
-+ifeq ($(CONFIG_KERNEL_LZMA),y)
-+targets += vmlinux.bin.lzma misc_lzma_64.o
-+
-+$(obj)/vmlinux: $(src)/vmlinux_64.lds $(obj)/head_64.o $(obj)/misc_lzma_64.o $(obj)/piggy.o FORCE
-+ $(call if_changed,ld)
-+ @:
-+
-+$(obj)/vmlinux.bin: vmlinux FORCE
-+ $(call if_changed,objcopy)
-+
++else
+$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
+ $(call if_changed,lzma)
++endif
+
-+$(obj)/piggy.o: $(obj)/vmlinux_lzma_64.scr $(obj)/vmlinux.bin.lzma FORCE
++
++$(obj)/piggy.o: $(obj)/vmlinux_lzma.scr $(obj)/vmlinux.bin.lzma FORCE
+ $(call if_changed,ld)
+endif
-diff -urN linux-2.6.24.2.orig/arch/x86/boot/compressed/misc_lzma_32.c linux-2.6.24.2/arch/x86/boot/compressed/misc_lzma_32.c
---- linux-2.6.24.2.orig/arch/x86/boot/compressed/misc_lzma_32.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.24.2/arch/x86/boot/compressed/misc_lzma_32.c 2008-02-23 13:25:03.000000000 +0100
-@@ -0,0 +1,282 @@
+diff -urNp linux-2.6.25.orig/arch/x86/boot/compressed/misc_lzma.c linux-2.6.25/arch/x86/boot/compressed/misc_lzma.c
+--- linux-2.6.25.orig/arch/x86/boot/compressed/misc_lzma.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25/arch/x86/boot/compressed/misc_lzma.c 2008-05-08 17:02:10.000000000 +0200
+@@ -0,0 +1,311 @@
+/*
+ * misc_lzma.c
+ *
@@ -128,8 +95,12 @@
+ */
+
+#undef CONFIG_PARAVIRT
++#ifdef CONFIG_X86_64
++#define _LINUX_STRING_H_ 1
++#define __LINUX_BITMAP_H 1
++#endif
++
+#include <linux/linkage.h>
-+#include <linux/vmalloc.h>
+#include <linux/screen_info.h>
+#include <asm/io.h>
+#include <asm/page.h>
@@ -215,10 +186,20 @@
+
+static void putstr(const char *);
+
-+static unsigned long free_mem_ptr;
-+static unsigned long free_mem_end_ptr;
++#ifdef CONFIG_X86_64
++#define memptr long
++#else
++#define memptr unsigned
++#endif
++
++static memptr free_mem_ptr;
++static memptr free_mem_end_ptr;
+
++#ifdef CONFIG_X86_64
++#define HEAP_SIZE 0x6000
++#else
+#define HEAP_SIZE 0x3000
++#endif
+
+static char *vidmem = (char *)0xb8000;
+static int vidport;
@@ -242,288 +223,11 @@
+ int x,y,pos;
+ char c;
+
-+ x = RM_SCREEN_INFO.orig_x;
-+ y = RM_SCREEN_INFO.orig_y;
-+
-+ while ( ( c = *s++ ) != '\0' ) {
-+ if ( c == '\n' ) {
-+ x = 0;
-+ if ( ++y >= lines ) {
-+ scroll();
-+ y--;
-+ }
-+ } else {
-+ vidmem [ ( x + cols * y ) * 2 ] = c;
-+ if ( ++x >= cols ) {
-+ x = 0;
-+ if ( ++y >= lines ) {
-+ scroll();
-+ y--;
-+ }
-+ }
-+ }
-+ }
-+
-+ RM_SCREEN_INFO.orig_x = x;
-+ RM_SCREEN_INFO.orig_y = y;
-+
-+ pos = (x + cols * y) * 2; /* Update cursor position */
-+ outb_p(14, vidport);
-+ outb_p(0xff & (pos >> 9), vidport+1);
-+ outb_p(15, vidport);
-+ outb_p(0xff & (pos >> 1), vidport+1);
-+}
-+
-+static void* memcpy(void* dest, const void* src, unsigned n)
-+{
-+ int i;
-+ char *d = (char *)dest, *s = (char *)src;
-+
-+ for (i=0;i<n;i++) d[i] = s[i];
-+ return dest;
-+}
-+
-+/* ===========================================================================
-+ * Fill the input buffer. This is called only when the buffer is empty
-+ * and at least one byte is really needed.
-+ */
-+static int fill_inbuf(void)
-+{
-+ error("ran out of input data");
-+ return 0;
-+}
-+
-+static void error(char *x)
-+{
-+ putstr("\n\n");
-+ putstr(x);
-+ putstr("\n\n -- System halted");
-+
-+ while(1); /* Halt */
-+}
-+
-+#define _LZMA_IN_CB
-+#include "../../../../lib/LzmaTypes.h"
-+#include "../../../../lib/LzmaDecode.h"
-+#include "../../../../lib/LzmaDecode.c"
-+
-+static int read_byte(void *object, const unsigned char **buffer, SizeT *bufferSize);
-+
-+/*
-+ * Do the lzma decompression
-+ */
-+static int unlzma(uch* output)
-+{
-+ unsigned int i;
-+ CLzmaDecoderState state;
-+ unsigned int uncompressedSize = 0;
-+ unsigned char* p;
-+
-+ ILzmaInCallback callback;
-+ callback.Read = read_byte;
-+
-+ // lzma args
-+ i = get_byte();
-+ state.Properties.lc = i % 9, i = i / 9;
-+ state.Properties.lp = i % 5, state.Properties.pb = i / 5;
-+
-+ // skip dictionary size
-+ for (i = 0; i < 4; i++)
-+ get_byte();
-+ // get uncompressed size
-+ p = (char*)&uncompressedSize;
-+ for (i = 0; i < 4; i++)
-+ *p++ = get_byte();
-+
-+ // skip high order bytes
-+ for (i = 0; i < 4; i++)
-+ get_byte();
-+
-+ // Just point it beyond
-+ state.Probs = (CProb*) (free_mem_ptr);
-+ // decompress kernel
-+ if (LzmaDecode(&state, &callback, (unsigned char*)output, uncompressedSize, &i) == LZMA_RESULT_OK) {
-+ if ( i != uncompressedSize )
-+ error( "kernel corrupted!\n");
-+ bytes_out = i;
-+ return 0;
-+ }
-+ return 1;
-+}
-+
-+static int read_byte(void *object, const unsigned char **buffer, SizeT *bufferSize)
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-CRI-squashfs.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-CRI-lzma-vmlinuz.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
More information about the pld-cvs-commit
mailing list