mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-19 14:45:33 +08:00
kernel26 - changes in 33-series
This commit is contained in:
parent
dd02dea5c3
commit
ec4258f21f
@ -15,8 +15,8 @@ pkgname=('kernel26' 'kernel26-firmware' 'kernel26-headers') # Build stock -CHAKR
|
||||
_kernelname=${pkgname#kernel26}
|
||||
_basekernel=2.6.33
|
||||
pkgver=${_basekernel}.7
|
||||
pkgrel=2
|
||||
_patchname="patch-${pkgver}-1-CHAKRA"
|
||||
pkgrel=3
|
||||
_patchname="patch-${pkgver}-3-CHAKRA"
|
||||
arch=(i686 x86_64)
|
||||
license=('GPL2')
|
||||
url="http://www.kernel.org"
|
||||
@ -28,7 +28,7 @@ source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
|
||||
# standard config files for mkinitcpio ramdisk
|
||||
kernel26.preset)
|
||||
md5sums=('c3883760b18d50e8d78819c54d579b00'
|
||||
'b27844b33e276dceb8cacc1397a70036'
|
||||
'025a15d95946264d19e0d4de8da93eb9'
|
||||
'59010eb369b4c5eb3c3c4b14e841b76a'
|
||||
'6a2735f11eb3b0dbc72fa3943bd4f4cf'
|
||||
'59b792a5dc8e7a6d4310059983abf928'
|
||||
|
@ -14,7 +14,7 @@ post_install () {
|
||||
echo ">>> If you use LVM2, Encrypted root or software RAID,"
|
||||
echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
|
||||
echo ">>> More information about mkinitcpio setup can be found here:"
|
||||
echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
|
||||
echo ">>> http://chakra-project.org/wiki/index.php/Mkinitcpio"
|
||||
echo ""
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
/sbin/mkinitcpio -p kernel26${KERNEL_NAME}
|
||||
@ -47,96 +47,16 @@ post_upgrade() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "`vercmp $2 2.6.13`" -lt 0 ]; then
|
||||
# important upgrade notice
|
||||
echo ">>>"
|
||||
echo ">>> IMPORTANT KERNEL UPGRADE NOTICE"
|
||||
echo ">>> -------------------------------"
|
||||
echo ">>> As of kernel 2.6.13, DevFS is NO LONGER AVAILABLE!"
|
||||
echo ">>> If you still use DevFS, please make the transition to uDev before"
|
||||
echo ">>> rebooting. If you really need to stay with DevFS for some reason,"
|
||||
echo ">>> then you can manually downgrade to an older version:"
|
||||
echo ">>>"
|
||||
echo ">>> # pacman -U http://archlinux.org/~judd/kernel/kernel26-scsi-2.6.12.2-1.pkg.tar.gz"
|
||||
echo ">>>"
|
||||
echo ">>> If you choose to downgrade, don't forget to add kernel26-scsi to your"
|
||||
echo ">>> IgnorePkg list in /etc/pacman.conf"
|
||||
echo ">>>"
|
||||
echo ">>> (NOTE: The following portion applies to uDev users as well!)"
|
||||
echo ">>>"
|
||||
echo ">>> If you use any DevFS paths in your GRUB menu.lst, then you will not"
|
||||
echo ">>> be able to boot! Change your root= parameter to use the classic"
|
||||
echo ">>> naming scheme."
|
||||
echo ">>>"
|
||||
echo ">>> EXAMPLES:"
|
||||
echo ">>> - change root=/dev/discs/disc0/part3 to root=/dev/sda3"
|
||||
echo ">>> - change root=/dev/md/0 to root=/dev/md0"
|
||||
echo ">>>"
|
||||
fi
|
||||
# generate new init ramdisk
|
||||
if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
|
||||
echo ">>> --------------------------------------------------------------"
|
||||
echo ">>> | WARNING: |"
|
||||
echo ">>> |mkinitrd is not supported anymore in kernel >=2.6.18 series!|"
|
||||
echo ">>> | Please change to Mkinitcpio setup. |"
|
||||
echo ">>> --------------------------------------------------------------"
|
||||
echo ">>>"
|
||||
fi
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod $KERNEL_VERSION
|
||||
depmod $KERNEL_VERSION
|
||||
# generate init ramdisks
|
||||
echo ">>> MKINITCPIO SETUP"
|
||||
echo ">>> ----------------"
|
||||
if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
|
||||
echo ">>> Please change your bootloader config files:"
|
||||
echo ">>> Grub: /boot/grub/menu.lst | Lilo: /etc/lilo.conf"
|
||||
echo "------------------------------------------------"
|
||||
echo "| - initrd26.img to kernel26${KERNEL_NAME}.img |"
|
||||
echo "| - initrd26-full.img to kernel26${KERNEL_NAME}-fallback.img |"
|
||||
echo "------------------------------------------------"
|
||||
fi
|
||||
if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
|
||||
echo ""
|
||||
echo ">>> New PATA/IDE subsystem - EXPERIMENTAL"
|
||||
echo ">>> ----------"
|
||||
echo ">>> To use the new pata drivers, change the 'ide' hook "
|
||||
echo ">>> to 'pata' in /etc/mkinicpio.conf HOOKS="
|
||||
echo ">>> The new system changes: /dev/hd? to /dev/sd?"
|
||||
echo ">>> Don't forget to modify GRUB, LILO and fstab to the"
|
||||
echo ">>> new naming system. "
|
||||
echo ">>> eg: hda3 --> sda3, hdc8 --> sdc8"
|
||||
echo ""
|
||||
echo ">>> piix/ata_piix (Intel chipsets) - IMPORTANT"
|
||||
echo "----------"
|
||||
echo ">>> If you have enabled ide/pata/sata HOOKs in /etc/mkinitcpio.conf"
|
||||
echo ">>> the 'ata_piix' module will be used."
|
||||
echo ">>> This may cause your devices to shift names, eg:"
|
||||
echo ">>> - IDE: devices from hd? to sd?"
|
||||
echo ">>> - SATA: sda might shift to sdc if you have 2 other disks on a PIIX IDE port."
|
||||
echo ">>> To check if this will affect you, check 'mkinitcpio -M' for piix/ata_piix"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo ">>> If you use LVM2, Encrypted root or software RAID,"
|
||||
echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
|
||||
echo ">>> More information about mkinitcpio setup can be found here:"
|
||||
echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
|
||||
echo ">>> http://chakra-project.org/wiki/index.php/Mkinitcpio"
|
||||
echo ""
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
|
||||
/sbin/mkinitcpio -p kernel26${KERNEL_NAME} -m "ATTENTION:\nIf you get a kernel panic below
|
||||
and are using an Intel chipset, append 'earlymodules=piix' to the
|
||||
kernel commandline"
|
||||
else
|
||||
/sbin/mkinitcpio -p kernel26${KERNEL_NAME}
|
||||
fi
|
||||
if [ "`vercmp $2 2.6.21`" -lt 0 ]; then
|
||||
echo ""
|
||||
echo "Important ACPI Information:"
|
||||
echo ">>> Since 2.6.20.7 all possible ACPI parts are modularized."
|
||||
echo ">>> The modules are located at:"
|
||||
echo ">>> /lib/modules/$(uname -r)/kernel/drivers/acpi"
|
||||
echo ">>> For more information about ACPI modules check this wiki page:"
|
||||
echo ">>> 'http://wiki.archlinux.org/index.php/ACPI_modules'"
|
||||
fi
|
||||
}
|
||||
|
@ -1,50 +0,0 @@
|
||||
# Kernel source file
|
||||
SRC="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.tar.bz2"
|
||||
# Original source directory
|
||||
SRCORIG="linux-2.6.35"
|
||||
# Our source directory
|
||||
SRCNAME="linux-2.6.35-CHAKRA"
|
||||
# Patches:
|
||||
# URL%patchlevel
|
||||
# or
|
||||
# filename%patchlevel (file must be in patches/ subdirectory)
|
||||
PATCHES=(
|
||||
# add upstream patch from 2.6.35 series
|
||||
http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.35.4.bz2%1
|
||||
|
||||
# add latest fixes from stable queue, if needed
|
||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||
|
||||
# add aufs2 support, in reference to:
|
||||
# http://aufs.sourceforge.net
|
||||
aufs2-base.patch%1
|
||||
aufs2-standalone.patch%1
|
||||
# squashfs with lzma
|
||||
001-squashfs-lzma-add-support-for-lzma-compressed-filesystems.patch%1
|
||||
002-squashfs-lzma-make-lzma-available-to-non-initramfs-initrd-code.patch%1
|
||||
003-squashfs-lzma-select-decompress-lzma-needed.patch%1
|
||||
004-squashfs-lzma-make-lzma-reentrant.patch%1
|
||||
005-squashfs-lzma-force-lzma-wrapper-to-be-retained.patch%1
|
||||
006-squashfs-lzma-add-missing-slab.h-include-in-lzma-wrapper.patch%1
|
||||
# Large I/O operations result in poor interactive performance and high iowait times
|
||||
# https://bugzilla.kernel.org/show_bug.cgi?id=12309
|
||||
007-io-fix-for-large-files.patch%1
|
||||
)
|
||||
# Name of the resulting patch (will be bzipped afterwards)
|
||||
PATCHNAME="patch-2.6.35.4-1-CHAKRA"
|
||||
|
||||
# Run this before applying patches
|
||||
pre_apply() {
|
||||
:
|
||||
}
|
||||
|
||||
# Run this after applying patches
|
||||
post_apply() {
|
||||
# remove the extraversion from Makefile
|
||||
# this ensures our kernel version is always 2.6.XX-CHAKRA
|
||||
# this way, minor kernel updates will not break external modules
|
||||
sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION = |g' Makefile
|
||||
|
||||
# Kill some files
|
||||
find . -name '*~' -exec rm -f {} \; 2>/dev/null
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
README - 2010-03-04
|
||||
|
||||
To generate a kernel-patch change in your chakra-buildsys with:
|
||||
|
||||
cd ~/DEV/KDEmod
|
||||
./enter* chakra-i686 or ./enter* chakra-x86_64
|
||||
|
||||
check if aufs2 and linux-2.6-ARCH/patches has same DATE
|
||||
|
||||
cd ../linux-2.6-ARCH
|
||||
|
||||
rm -Rv src
|
||||
rm -v patch-2.6*
|
||||
|
||||
./gen_kernel_patch
|
||||
|
||||
copy generated patch archive to kernel26 folder in same repo
|
||||
|
||||
update kernel26 PKGBUILD
|
||||
|
||||
update svn with new changes of aufs2, kernel26 and linux-2.6-ARCH
|
@ -1,59 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cat_patch() {
|
||||
file=${startdir}/src/$(basename ${1})
|
||||
ftype=$(file -bizL "${file}")
|
||||
case "$ftype" in
|
||||
*application/x-gzip*)
|
||||
zcat ${file} ;;
|
||||
*application/x-bzip*)
|
||||
bzcat ${file} ;;
|
||||
*)
|
||||
cat ${file} ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_file() {
|
||||
file=$(basename ${1})
|
||||
OPWD=${PWD}
|
||||
if [ "${file}" != "${1}" ]; then
|
||||
cd ${SRCDEST}
|
||||
[ ! -f ${file} ] && wget -c ${1}
|
||||
cd ${startdir}/src
|
||||
ln -s ../../_sources/${file} .
|
||||
else
|
||||
cd ${startdir}/src
|
||||
ln -s ../patches/${file} .
|
||||
fi
|
||||
cd ${OPWD}
|
||||
}
|
||||
|
||||
source ../_buildscripts/core-testing-${_arch}-makepkg.conf
|
||||
source PATCHCFG
|
||||
|
||||
export SRCNAME
|
||||
|
||||
export startdir=${PWD}
|
||||
mkdir ${startdir}/src
|
||||
cd ${startdir}/src
|
||||
|
||||
get_file ${SRC}
|
||||
bsdtar -xf $(basename ${SRC})
|
||||
cp -a ${SRCORIG} ${SRCNAME}
|
||||
cd ${SRCNAME}
|
||||
|
||||
pre_apply
|
||||
|
||||
for p in ${PATCHES[@]}; do
|
||||
patchname=$(echo ${p} | cut -d% -f1)
|
||||
patchstrip=$(echo ${p} | cut -d% -f2)
|
||||
get_file ${patchname}
|
||||
cat_patch ${patchname} | patch -Np${patchstrip} || exit 1
|
||||
done
|
||||
|
||||
post_apply
|
||||
|
||||
cd ${startdir}/src
|
||||
diff -Nur ${SRCORIG} ${SRCNAME} > $startdir/${PATCHNAME}
|
||||
bzip2 --best $startdir/${PATCHNAME}
|
||||
|
Binary file not shown.
@ -1,229 +0,0 @@
|
||||
From 6e71de691803bf0ec6618a398cbe8b401b5b0dd7 Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Date: Tue, 20 Oct 2009 10:54:36 +0100
|
||||
Subject: [PATCH] Squashfs: add support for LZMA compressed filesystems
|
||||
|
||||
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
---
|
||||
fs/squashfs/Kconfig | 5 ++
|
||||
fs/squashfs/Makefile | 1 +
|
||||
fs/squashfs/decompressor.c | 4 +
|
||||
fs/squashfs/lzma_wrapper.c | 151 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
fs/squashfs/squashfs.h | 3 +
|
||||
5 files changed, 164 insertions(+), 0 deletions(-)
|
||||
create mode 100644 fs/squashfs/lzma_wrapper.c
|
||||
|
||||
diff --git a/fs/squashfs/Kconfig b/fs/squashfs/Kconfig
|
||||
index 25a00d1..0294aa2 100644
|
||||
--- a/fs/squashfs/Kconfig
|
||||
+++ b/fs/squashfs/Kconfig
|
||||
@@ -26,6 +26,11 @@ config SQUASHFS
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
+config SQUASHFS_LZMA
|
||||
+ bool "Include support for LZMA compressed file systems"
|
||||
+ depends on SQUASHFS
|
||||
+ select DECOMPRESS_LZMA
|
||||
+
|
||||
config SQUASHFS_EMBEDDED
|
||||
|
||||
bool "Additional option for memory-constrained systems"
|
||||
diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile
|
||||
index df8a19e..45aaefd 100644
|
||||
--- a/fs/squashfs/Makefile
|
||||
+++ b/fs/squashfs/Makefile
|
||||
@@ -5,5 +5,6 @@
|
||||
obj-$(CONFIG_SQUASHFS) += squashfs.o
|
||||
squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o
|
||||
squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o
|
||||
+squashfs-$(CONFIG_SQUASHFS_LZMA) += lzma_wrapper.o
|
||||
squashfs-$(CONFIG_SQUASHFS_XATTRS) += xattr.o xattr_id.o
|
||||
|
||||
diff --git a/fs/squashfs/decompressor.c b/fs/squashfs/decompressor.c
|
||||
index 157478d..0b6ad9b 100644
|
||||
--- a/fs/squashfs/decompressor.c
|
||||
+++ b/fs/squashfs/decompressor.c
|
||||
@@ -50,7 +50,11 @@ static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
|
||||
|
||||
static const struct squashfs_decompressor *decompressor[] = {
|
||||
&squashfs_zlib_comp_ops,
|
||||
+#ifdef CONFIG_SQUASHFS_LZMA
|
||||
+ &squashfs_lzma_comp_ops,
|
||||
+#else
|
||||
&squashfs_lzma_unsupported_comp_ops,
|
||||
+#endif
|
||||
&squashfs_lzo_unsupported_comp_ops,
|
||||
&squashfs_unknown_comp_ops
|
||||
};
|
||||
diff --git a/fs/squashfs/lzma_wrapper.c b/fs/squashfs/lzma_wrapper.c
|
||||
new file mode 100644
|
||||
index 0000000..cef06d6
|
||||
--- /dev/null
|
||||
+++ b/fs/squashfs/lzma_wrapper.c
|
||||
@@ -0,0 +1,151 @@
|
||||
+/*
|
||||
+ * Squashfs - a compressed read only filesystem for Linux
|
||||
+ *
|
||||
+ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
+ * Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
+ *
|
||||
+ * 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,
|
||||
+ * 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
+ *
|
||||
+ * lzma_wrapper.c
|
||||
+ */
|
||||
+
|
||||
+#include <asm/unaligned.h>
|
||||
+#include <linux/buffer_head.h>
|
||||
+#include <linux/mutex.h>
|
||||
+#include <linux/vmalloc.h>
|
||||
+#include <linux/decompress/unlzma.h>
|
||||
+
|
||||
+#include "squashfs_fs.h"
|
||||
+#include "squashfs_fs_sb.h"
|
||||
+#include "squashfs_fs_i.h"
|
||||
+#include "squashfs.h"
|
||||
+#include "decompressor.h"
|
||||
+
|
||||
+struct squashfs_lzma {
|
||||
+ void *input;
|
||||
+ void *output;
|
||||
+};
|
||||
+
|
||||
+/* decompress_unlzma.c is currently non re-entrant... */
|
||||
+DEFINE_MUTEX(lzma_mutex);
|
||||
+
|
||||
+/* decompress_unlzma.c doesn't provide any context in its callbacks... */
|
||||
+static int lzma_error;
|
||||
+
|
||||
+static void error(char *m)
|
||||
+{
|
||||
+ ERROR("unlzma error: %s\n", m);
|
||||
+ lzma_error = 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void *lzma_init(struct squashfs_sb_info *msblk)
|
||||
+{
|
||||
+ struct squashfs_lzma *stream = kzalloc(sizeof(*stream), GFP_KERNEL);
|
||||
+ if (stream == NULL)
|
||||
+ goto failed;
|
||||
+ stream->input = vmalloc(msblk->block_size);
|
||||
+ if (stream->input == NULL)
|
||||
+ goto failed;
|
||||
+ stream->output = vmalloc(msblk->block_size);
|
||||
+ if (stream->output == NULL)
|
||||
+ goto failed2;
|
||||
+
|
||||
+ return stream;
|
||||
+
|
||||
+failed2:
|
||||
+ vfree(stream->input);
|
||||
+failed:
|
||||
+ ERROR("failed to allocate lzma workspace\n");
|
||||
+ kfree(stream);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void lzma_free(void *strm)
|
||||
+{
|
||||
+ struct squashfs_lzma *stream = strm;
|
||||
+
|
||||
+ if (stream) {
|
||||
+ vfree(stream->input);
|
||||
+ vfree(stream->output);
|
||||
+ }
|
||||
+ kfree(stream);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int lzma_uncompress(struct squashfs_sb_info *msblk, void **buffer,
|
||||
+ struct buffer_head **bh, int b, int offset, int length, int srclength,
|
||||
+ int pages)
|
||||
+{
|
||||
+ struct squashfs_lzma *stream = msblk->stream;
|
||||
+ void *buff = stream->input;
|
||||
+ int avail, i, bytes = length, res;
|
||||
+
|
||||
+ mutex_lock(&lzma_mutex);
|
||||
+
|
||||
+ for (i = 0; i < b; i++) {
|
||||
+ wait_on_buffer(bh[i]);
|
||||
+ if (!buffer_uptodate(bh[i]))
|
||||
+ goto block_release;
|
||||
+
|
||||
+ avail = min(bytes, msblk->devblksize - offset);
|
||||
+ memcpy(buff, bh[i]->b_data + offset, avail);
|
||||
+ buff += avail;
|
||||
+ bytes -= avail;
|
||||
+ offset = 0;
|
||||
+ put_bh(bh[i]);
|
||||
+ }
|
||||
+
|
||||
+ lzma_error = 0;
|
||||
+ res = unlzma(stream->input, length, NULL, NULL, stream->output, NULL,
|
||||
+ error);
|
||||
+ if (res || lzma_error)
|
||||
+ goto failed;
|
||||
+
|
||||
+ /* uncompressed size is stored in the LZMA header (5 byte offset) */
|
||||
+ res = bytes = get_unaligned_le32(stream->input + 5);
|
||||
+ for (i = 0, buff = stream->output; bytes && i < pages; i++) {
|
||||
+ avail = min_t(int, bytes, PAGE_CACHE_SIZE);
|
||||
+ memcpy(buffer[i], buff, avail);
|
||||
+ buff += avail;
|
||||
+ bytes -= avail;
|
||||
+ }
|
||||
+ if (bytes)
|
||||
+ goto failed;
|
||||
+
|
||||
+ mutex_unlock(&lzma_mutex);
|
||||
+ return res;
|
||||
+
|
||||
+block_release:
|
||||
+ for (; i < b; i++)
|
||||
+ put_bh(bh[i]);
|
||||
+
|
||||
+failed:
|
||||
+ mutex_unlock(&lzma_mutex);
|
||||
+
|
||||
+ ERROR("lzma decompression failed, data probably corrupt\n");
|
||||
+ return -EIO;
|
||||
+}
|
||||
+
|
||||
+const struct squashfs_decompressor squashfs_lzma_comp_ops = {
|
||||
+ .init = lzma_init,
|
||||
+ .free = lzma_free,
|
||||
+ .decompress = lzma_uncompress,
|
||||
+ .id = LZMA_COMPRESSION,
|
||||
+ .name = "lzma",
|
||||
+ .supported = 1
|
||||
+};
|
||||
+
|
||||
diff --git a/fs/squashfs/squashfs.h b/fs/squashfs/squashfs.h
|
||||
index fe2587a..d094886 100644
|
||||
--- a/fs/squashfs/squashfs.h
|
||||
+++ b/fs/squashfs/squashfs.h
|
||||
@@ -94,3 +94,6 @@ extern const struct address_space_operations squashfs_symlink_aops;
|
||||
|
||||
/* zlib_wrapper.c */
|
||||
extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
|
||||
+
|
||||
+/* lzma wrapper.c */
|
||||
+extern const struct squashfs_decompressor squashfs_lzma_comp_ops;
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,215 +0,0 @@
|
||||
From 491e6409b8fd8c724f13632715012b157e867e16 Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Date: Mon, 11 Jan 2010 16:15:00 +0100
|
||||
Subject: [PATCH] lzma: Make lzma available to non initramfs/initrd code
|
||||
|
||||
Add a config option DECOMPRESS_LZMA_NEEDED which allows subsystems to
|
||||
specify they need the unlzma code. Normally decompress_unlzma.c is
|
||||
compiled with __init and unlzma is not exported to modules.
|
||||
|
||||
Move INIT definition into separate header files for bzip2/lzma/inflate/lzo
|
||||
so it can be defined differently for each decompressor.
|
||||
|
||||
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
---
|
||||
include/linux/decompress/bunzip2_mm.h | 12 ++++++++++++
|
||||
include/linux/decompress/inflate_mm.h | 12 ++++++++++++
|
||||
include/linux/decompress/mm.h | 3 ---
|
||||
include/linux/decompress/unlzma_mm.h | 20 ++++++++++++++++++++
|
||||
include/linux/decompress/unlzo_mm.h | 12 ++++++++++++
|
||||
lib/Kconfig | 3 +++
|
||||
lib/decompress_bunzip2.c | 1 +
|
||||
lib/decompress_inflate.c | 1 +
|
||||
lib/decompress_unlzma.c | 6 +++++-
|
||||
lib/decompress_unlzo.c | 1 +
|
||||
10 files changed, 67 insertions(+), 4 deletions(-)
|
||||
create mode 100644 include/linux/decompress/bunzip2_mm.h
|
||||
create mode 100644 include/linux/decompress/inflate_mm.h
|
||||
create mode 100644 include/linux/decompress/unlzma_mm.h
|
||||
create mode 100644 include/linux/decompress/unlzo_mm.h
|
||||
|
||||
diff --git a/include/linux/decompress/bunzip2_mm.h b/include/linux/decompress/bunzip2_mm.h
|
||||
new file mode 100644
|
||||
index 0000000..cac6fef
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/bunzip2_mm.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef BUNZIP2_MM_H
|
||||
+#define BUNZIP2_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+#else
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/include/linux/decompress/inflate_mm.h b/include/linux/decompress/inflate_mm.h
|
||||
new file mode 100644
|
||||
index 0000000..ca4a2ae
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/inflate_mm.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef INFLATE_MM_H
|
||||
+#define INFLATE_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+#else
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
|
||||
index ad5ec1d..f3f6526 100644
|
||||
--- a/include/linux/decompress/mm.h
|
||||
+++ b/include/linux/decompress/mm.h
|
||||
@@ -63,8 +63,6 @@ static void free(void *where)
|
||||
|
||||
#define set_error_fn(x)
|
||||
|
||||
-#define INIT
|
||||
-
|
||||
#else /* STATIC */
|
||||
|
||||
/* Code active when compiled standalone for use when loading ramdisk: */
|
||||
@@ -87,7 +85,6 @@ static void free(void *where)
|
||||
static void(*error)(char *m);
|
||||
#define set_error_fn(x) error = x;
|
||||
|
||||
-#define INIT __init
|
||||
#define STATIC
|
||||
|
||||
#include <linux/init.h>
|
||||
diff --git a/include/linux/decompress/unlzma_mm.h b/include/linux/decompress/unlzma_mm.h
|
||||
new file mode 100644
|
||||
index 0000000..859287e
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/unlzma_mm.h
|
||||
@@ -0,0 +1,20 @@
|
||||
+#ifndef UNLZMA_MM_H
|
||||
+#define UNLZMA_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+
|
||||
+#elif defined(CONFIG_DECOMPRESS_LZMA_NEEDED)
|
||||
+
|
||||
+/* Make it available to non initramfs/initrd code */
|
||||
+#define INIT
|
||||
+#include <linux/module.h>
|
||||
+#else
|
||||
+
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/include/linux/decompress/unlzo_mm.h b/include/linux/decompress/unlzo_mm.h
|
||||
new file mode 100644
|
||||
index 0000000..e3f1573
|
||||
--- /dev/null
|
||||
+++ b/include/linux/decompress/unlzo_mm.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef UNLZO_MM_H
|
||||
+#define UNLZO_MM_H
|
||||
+
|
||||
+#ifdef STATIC
|
||||
+/* Code active when included from pre-boot environment: */
|
||||
+#define INIT
|
||||
+#else
|
||||
+/* Compile for initramfs/initrd code only */
|
||||
+#define INIT __init
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/lib/Kconfig b/lib/Kconfig
|
||||
index 170d8ca..390e88c 100644
|
||||
--- a/lib/Kconfig
|
||||
+++ b/lib/Kconfig
|
||||
@@ -121,6 +121,9 @@ config DECOMPRESS_LZO
|
||||
select LZO_DECOMPRESS
|
||||
tristate
|
||||
|
||||
+config DECOMPRESS_LZMA_NEEDED
|
||||
+ boolean
|
||||
+
|
||||
#
|
||||
# Generic allocator support is selected if needed
|
||||
#
|
||||
diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c
|
||||
index a4e971d..04386b3 100644
|
||||
--- a/lib/decompress_bunzip2.c
|
||||
+++ b/lib/decompress_bunzip2.c
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <linux/slab.h>
|
||||
#endif /* STATIC */
|
||||
|
||||
+#include <linux/decompress/bunzip2_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#ifndef INT_MAX
|
||||
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
|
||||
index fc686c7..cb6bcab 100644
|
||||
--- a/lib/decompress_inflate.c
|
||||
+++ b/lib/decompress_inflate.c
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#endif /* STATIC */
|
||||
|
||||
+#include <linux/decompress/inflate_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#define GZIP_IOBUF_SIZE (16*1024)
|
||||
diff --git a/lib/decompress_unlzma.c b/lib/decompress_unlzma.c
|
||||
index ca82fde..a614b26 100644
|
||||
--- a/lib/decompress_unlzma.c
|
||||
+++ b/lib/decompress_unlzma.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <linux/slab.h>
|
||||
#endif /* STATIC */
|
||||
|
||||
+#include <linux/decompress/unlzma_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
@@ -531,7 +532,7 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
|
||||
|
||||
|
||||
-STATIC inline int INIT unlzma(unsigned char *buf, int in_len,
|
||||
+STATIC int INIT unlzma(unsigned char *buf, int in_len,
|
||||
int(*fill)(void*, unsigned int),
|
||||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *output,
|
||||
@@ -652,6 +653,9 @@ exit_1:
|
||||
exit_0:
|
||||
return ret;
|
||||
}
|
||||
+#if defined(CONFIG_DECOMPRESS_LZMA_NEEDED) && !defined(PREBOOT)
|
||||
+EXPORT_SYMBOL(unlzma);
|
||||
+#endif
|
||||
|
||||
#ifdef PREBOOT
|
||||
STATIC int INIT decompress(unsigned char *buf, int in_len,
|
||||
diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
|
||||
index bcb3a4b..af06d6f 100644
|
||||
--- a/lib/decompress_unlzo.c
|
||||
+++ b/lib/decompress_unlzo.c
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/lzo.h>
|
||||
+#include <linux/decompress/unlzo_mm.h>
|
||||
#include <linux/decompress/mm.h>
|
||||
|
||||
#include <linux/compiler.h>
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,25 +0,0 @@
|
||||
From ca2735d4b6477da84051a6a89269fca64d4612c7 Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Date: Sun, 6 Dec 2009 02:15:08 +0000
|
||||
Subject: [PATCH] Squashfs: select DECOMPRESS_LZMA_NEEDED when including support for lzma
|
||||
|
||||
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
---
|
||||
fs/squashfs/Kconfig | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/fs/squashfs/Kconfig b/fs/squashfs/Kconfig
|
||||
index 0294aa2..7ec5d7e 100644
|
||||
--- a/fs/squashfs/Kconfig
|
||||
+++ b/fs/squashfs/Kconfig
|
||||
@@ -30,6 +30,7 @@ config SQUASHFS_LZMA
|
||||
bool "Include support for LZMA compressed file systems"
|
||||
depends on SQUASHFS
|
||||
select DECOMPRESS_LZMA
|
||||
+ select DECOMPRESS_LZMA_NEEDED
|
||||
|
||||
config SQUASHFS_EMBEDDED
|
||||
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,368 +0,0 @@
|
||||
From a51fc20e704588fadd285cf939f080df4552694b Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Date: Mon, 11 Jan 2010 16:45:50 +0000
|
||||
Subject: [PATCH] lzma: make lzma reentrant
|
||||
|
||||
The error function pointer used by lzma is global (file scope) which
|
||||
prevents it being used concurrently. This patch removes the global
|
||||
error pointer use, and instead passes it to all functions that need it.
|
||||
|
||||
The error function pointer is still used by bunzip2, inflate and unlzo.
|
||||
This patch moves the definition into the separate bunzip2, inflate
|
||||
and unlzo header files. This prevents gcc from complaining about an
|
||||
unused definition compiling lzma.
|
||||
|
||||
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
---
|
||||
include/linux/decompress/bunzip2_mm.h | 1 +
|
||||
include/linux/decompress/inflate_mm.h | 1 +
|
||||
include/linux/decompress/mm.h | 1 -
|
||||
include/linux/decompress/unlzo_mm.h | 1 +
|
||||
lib/decompress_unlzma.c | 82 +++++++++++++++++----------------
|
||||
5 files changed, 45 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/include/linux/decompress/bunzip2_mm.h b/include/linux/decompress/bunzip2_mm.h
|
||||
index cac6fef..863efd0 100644
|
||||
--- a/include/linux/decompress/bunzip2_mm.h
|
||||
+++ b/include/linux/decompress/bunzip2_mm.h
|
||||
@@ -7,6 +7,7 @@
|
||||
#else
|
||||
/* Compile for initramfs/initrd code only */
|
||||
#define INIT __init
|
||||
+static void(*error)(char *m);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
diff --git a/include/linux/decompress/inflate_mm.h b/include/linux/decompress/inflate_mm.h
|
||||
index ca4a2ae..87a742b 100644
|
||||
--- a/include/linux/decompress/inflate_mm.h
|
||||
+++ b/include/linux/decompress/inflate_mm.h
|
||||
@@ -7,6 +7,7 @@
|
||||
#else
|
||||
/* Compile for initramfs/initrd code only */
|
||||
#define INIT __init
|
||||
+static void(*error)(char *m);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
|
||||
index f3f6526..df8b8b5 100644
|
||||
--- a/include/linux/decompress/mm.h
|
||||
+++ b/include/linux/decompress/mm.h
|
||||
@@ -82,7 +82,6 @@ static void free(void *where)
|
||||
#define large_malloc(a) vmalloc(a)
|
||||
#define large_free(a) vfree(a)
|
||||
|
||||
-static void(*error)(char *m);
|
||||
#define set_error_fn(x) error = x;
|
||||
|
||||
#define STATIC
|
||||
diff --git a/include/linux/decompress/unlzo_mm.h b/include/linux/decompress/unlzo_mm.h
|
||||
index e3f1573..27fe0ab 100644
|
||||
--- a/include/linux/decompress/unlzo_mm.h
|
||||
+++ b/include/linux/decompress/unlzo_mm.h
|
||||
@@ -7,6 +7,7 @@
|
||||
#else
|
||||
/* Compile for initramfs/initrd code only */
|
||||
#define INIT __init
|
||||
+static void(*error)(char *m);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
diff --git a/lib/decompress_unlzma.c b/lib/decompress_unlzma.c
|
||||
index a614b26..3e85763 100644
|
||||
--- a/lib/decompress_unlzma.c
|
||||
+++ b/lib/decompress_unlzma.c
|
||||
@@ -89,7 +89,7 @@ static int nofill(void *buffer, unsigned int len)
|
||||
}
|
||||
|
||||
/* Called twice: once at startup and once in rc_normalize() */
|
||||
-static void INIT rc_read(struct rc *rc)
|
||||
+static void INIT rc_read(struct rc *rc, void(*error)(char *x))
|
||||
{
|
||||
rc->buffer_size = rc->fill((char *)rc->buffer, LZMA_IOBUF_SIZE);
|
||||
if (rc->buffer_size <= 0)
|
||||
@@ -116,13 +116,13 @@ static inline void INIT rc_init(struct rc *rc,
|
||||
rc->range = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
-static inline void INIT rc_init_code(struct rc *rc)
|
||||
+static inline void INIT rc_init_code(struct rc *rc, void(*error)(char *x))
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (rc->ptr >= rc->buffer_end)
|
||||
- rc_read(rc);
|
||||
+ rc_read(rc, error);
|
||||
rc->code = (rc->code << 8) | *rc->ptr++;
|
||||
}
|
||||
}
|
||||
@@ -135,32 +135,33 @@ static inline void INIT rc_free(struct rc *rc)
|
||||
}
|
||||
|
||||
/* Called twice, but one callsite is in inline'd rc_is_bit_0_helper() */
|
||||
-static void INIT rc_do_normalize(struct rc *rc)
|
||||
+static void INIT rc_do_normalize(struct rc *rc, void(*error)(char *x))
|
||||
{
|
||||
if (rc->ptr >= rc->buffer_end)
|
||||
- rc_read(rc);
|
||||
+ rc_read(rc, error);
|
||||
rc->range <<= 8;
|
||||
rc->code = (rc->code << 8) | *rc->ptr++;
|
||||
}
|
||||
-static inline void INIT rc_normalize(struct rc *rc)
|
||||
+static inline void INIT rc_normalize(struct rc *rc, void(*error)(char *x))
|
||||
{
|
||||
if (rc->range < (1 << RC_TOP_BITS))
|
||||
- rc_do_normalize(rc);
|
||||
+ rc_do_normalize(rc, error);
|
||||
}
|
||||
|
||||
/* Called 9 times */
|
||||
/* Why rc_is_bit_0_helper exists?
|
||||
*Because we want to always expose (rc->code < rc->bound) to optimizer
|
||||
*/
|
||||
-static inline uint32_t INIT rc_is_bit_0_helper(struct rc *rc, uint16_t *p)
|
||||
+static inline uint32_t INIT rc_is_bit_0_helper(struct rc *rc, uint16_t *p,
|
||||
+ void (*error)(char *x))
|
||||
{
|
||||
- rc_normalize(rc);
|
||||
+ rc_normalize(rc, error);
|
||||
rc->bound = *p * (rc->range >> RC_MODEL_TOTAL_BITS);
|
||||
return rc->bound;
|
||||
}
|
||||
-static inline int INIT rc_is_bit_0(struct rc *rc, uint16_t *p)
|
||||
+static inline int INIT rc_is_bit_0(struct rc *rc, uint16_t *p, void(*error)(char *x))
|
||||
{
|
||||
- uint32_t t = rc_is_bit_0_helper(rc, p);
|
||||
+ uint32_t t = rc_is_bit_0_helper(rc, p, error);
|
||||
return rc->code < t;
|
||||
}
|
||||
|
||||
@@ -178,9 +179,9 @@ static inline void rc_update_bit_1(struct rc *rc, uint16_t *p)
|
||||
}
|
||||
|
||||
/* Called 4 times in unlzma loop */
|
||||
-static int INIT rc_get_bit(struct rc *rc, uint16_t *p, int *symbol)
|
||||
+static int INIT rc_get_bit(struct rc *rc, uint16_t *p, int *symbol, void(*error)(char *x))
|
||||
{
|
||||
- if (rc_is_bit_0(rc, p)) {
|
||||
+ if (rc_is_bit_0(rc, p, error)) {
|
||||
rc_update_bit_0(rc, p);
|
||||
*symbol *= 2;
|
||||
return 0;
|
||||
@@ -192,9 +193,9 @@ static int INIT rc_get_bit(struct rc *rc, uint16_t *p, int *symbol)
|
||||
}
|
||||
|
||||
/* Called once */
|
||||
-static inline int INIT rc_direct_bit(struct rc *rc)
|
||||
+static inline int INIT rc_direct_bit(struct rc *rc , void(*error)(char *x))
|
||||
{
|
||||
- rc_normalize(rc);
|
||||
+ rc_normalize(rc, error);
|
||||
rc->range >>= 1;
|
||||
if (rc->code >= rc->range) {
|
||||
rc->code -= rc->range;
|
||||
@@ -205,13 +206,14 @@ static inline int INIT rc_direct_bit(struct rc *rc)
|
||||
|
||||
/* Called twice */
|
||||
static inline void INIT
|
||||
-rc_bit_tree_decode(struct rc *rc, uint16_t *p, int num_levels, int *symbol)
|
||||
+rc_bit_tree_decode(struct rc *rc, uint16_t *p, int num_levels, int *symbol,
|
||||
+ void(*error)(char *x))
|
||||
{
|
||||
int i = num_levels;
|
||||
|
||||
*symbol = 1;
|
||||
while (i--)
|
||||
- rc_get_bit(rc, p + *symbol, symbol);
|
||||
+ rc_get_bit(rc, p + *symbol, symbol, error);
|
||||
*symbol -= 1 << num_levels;
|
||||
}
|
||||
|
||||
@@ -348,7 +350,8 @@ static inline void INIT copy_bytes(struct writer *wr,
|
||||
static inline void INIT process_bit0(struct writer *wr, struct rc *rc,
|
||||
struct cstate *cst, uint16_t *p,
|
||||
int pos_state, uint16_t *prob,
|
||||
- int lc, uint32_t literal_pos_mask) {
|
||||
+ int lc, uint32_t literal_pos_mask,
|
||||
+ void(*error)(char *x)) {
|
||||
int mi = 1;
|
||||
rc_update_bit_0(rc, prob);
|
||||
prob = (p + LZMA_LITERAL +
|
||||
@@ -366,7 +369,7 @@ static inline void INIT process_bit0(struct writer *wr, struct rc *rc,
|
||||
match_byte <<= 1;
|
||||
bit = match_byte & 0x100;
|
||||
prob_lit = prob + 0x100 + bit + mi;
|
||||
- if (rc_get_bit(rc, prob_lit, &mi)) {
|
||||
+ if (rc_get_bit(rc, prob_lit, &mi, error)) {
|
||||
if (!bit)
|
||||
break;
|
||||
} else {
|
||||
@@ -377,7 +380,7 @@ static inline void INIT process_bit0(struct writer *wr, struct rc *rc,
|
||||
}
|
||||
while (mi < 0x100) {
|
||||
uint16_t *prob_lit = prob + mi;
|
||||
- rc_get_bit(rc, prob_lit, &mi);
|
||||
+ rc_get_bit(rc, prob_lit, &mi, error);
|
||||
}
|
||||
write_byte(wr, mi);
|
||||
if (cst->state < 4)
|
||||
@@ -390,7 +393,8 @@ static inline void INIT process_bit0(struct writer *wr, struct rc *rc,
|
||||
|
||||
static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
struct cstate *cst, uint16_t *p,
|
||||
- int pos_state, uint16_t *prob) {
|
||||
+ int pos_state, uint16_t *prob,
|
||||
+ void(*error)(char *x)) {
|
||||
int offset;
|
||||
uint16_t *prob_len;
|
||||
int num_bits;
|
||||
@@ -398,7 +402,7 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
|
||||
rc_update_bit_1(rc, prob);
|
||||
prob = p + LZMA_IS_REP + cst->state;
|
||||
- if (rc_is_bit_0(rc, prob)) {
|
||||
+ if (rc_is_bit_0(rc, prob, error)) {
|
||||
rc_update_bit_0(rc, prob);
|
||||
cst->rep3 = cst->rep2;
|
||||
cst->rep2 = cst->rep1;
|
||||
@@ -408,13 +412,13 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
} else {
|
||||
rc_update_bit_1(rc, prob);
|
||||
prob = p + LZMA_IS_REP_G0 + cst->state;
|
||||
- if (rc_is_bit_0(rc, prob)) {
|
||||
+ if (rc_is_bit_0(rc, prob, error)) {
|
||||
rc_update_bit_0(rc, prob);
|
||||
prob = (p + LZMA_IS_REP_0_LONG
|
||||
+ (cst->state <<
|
||||
LZMA_NUM_POS_BITS_MAX) +
|
||||
pos_state);
|
||||
- if (rc_is_bit_0(rc, prob)) {
|
||||
+ if (rc_is_bit_0(rc, prob, error)) {
|
||||
rc_update_bit_0(rc, prob);
|
||||
|
||||
cst->state = cst->state < LZMA_NUM_LIT_STATES ?
|
||||
@@ -429,13 +433,13 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
|
||||
rc_update_bit_1(rc, prob);
|
||||
prob = p + LZMA_IS_REP_G1 + cst->state;
|
||||
- if (rc_is_bit_0(rc, prob)) {
|
||||
+ if (rc_is_bit_0(rc, prob, error)) {
|
||||
rc_update_bit_0(rc, prob);
|
||||
distance = cst->rep1;
|
||||
} else {
|
||||
rc_update_bit_1(rc, prob);
|
||||
prob = p + LZMA_IS_REP_G2 + cst->state;
|
||||
- if (rc_is_bit_0(rc, prob)) {
|
||||
+ if (rc_is_bit_0(rc, prob, error)) {
|
||||
rc_update_bit_0(rc, prob);
|
||||
distance = cst->rep2;
|
||||
} else {
|
||||
@@ -453,7 +457,7 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
}
|
||||
|
||||
prob_len = prob + LZMA_LEN_CHOICE;
|
||||
- if (rc_is_bit_0(rc, prob_len)) {
|
||||
+ if (rc_is_bit_0(rc, prob_len, error)) {
|
||||
rc_update_bit_0(rc, prob_len);
|
||||
prob_len = (prob + LZMA_LEN_LOW
|
||||
+ (pos_state <<
|
||||
@@ -463,7 +467,7 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
} else {
|
||||
rc_update_bit_1(rc, prob_len);
|
||||
prob_len = prob + LZMA_LEN_CHOICE_2;
|
||||
- if (rc_is_bit_0(rc, prob_len)) {
|
||||
+ if (rc_is_bit_0(rc, prob_len, error)) {
|
||||
rc_update_bit_0(rc, prob_len);
|
||||
prob_len = (prob + LZMA_LEN_MID
|
||||
+ (pos_state <<
|
||||
@@ -479,7 +483,7 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
}
|
||||
}
|
||||
|
||||
- rc_bit_tree_decode(rc, prob_len, num_bits, &len);
|
||||
+ rc_bit_tree_decode(rc, prob_len, num_bits, &len, error);
|
||||
len += offset;
|
||||
|
||||
if (cst->state < 4) {
|
||||
@@ -494,7 +498,7 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
<< LZMA_NUM_POS_SLOT_BITS);
|
||||
rc_bit_tree_decode(rc, prob,
|
||||
LZMA_NUM_POS_SLOT_BITS,
|
||||
- &pos_slot);
|
||||
+ &pos_slot, error);
|
||||
if (pos_slot >= LZMA_START_POS_MODEL_INDEX) {
|
||||
int i, mi;
|
||||
num_bits = (pos_slot >> 1) - 1;
|
||||
@@ -507,7 +511,7 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
num_bits -= LZMA_NUM_ALIGN_BITS;
|
||||
while (num_bits--)
|
||||
cst->rep0 = (cst->rep0 << 1) |
|
||||
- rc_direct_bit(rc);
|
||||
+ rc_direct_bit(rc, error);
|
||||
prob = p + LZMA_ALIGN;
|
||||
cst->rep0 <<= LZMA_NUM_ALIGN_BITS;
|
||||
num_bits = LZMA_NUM_ALIGN_BITS;
|
||||
@@ -515,7 +519,7 @@ static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
|
||||
i = 1;
|
||||
mi = 1;
|
||||
while (num_bits--) {
|
||||
- if (rc_get_bit(rc, prob + mi, &mi))
|
||||
+ if (rc_get_bit(rc, prob + mi, &mi, error))
|
||||
cst->rep0 |= i;
|
||||
i <<= 1;
|
||||
}
|
||||
@@ -537,7 +541,7 @@ STATIC int INIT unlzma(unsigned char *buf, int in_len,
|
||||
int(*flush)(void*, unsigned int),
|
||||
unsigned char *output,
|
||||
int *posp,
|
||||
- void(*error_fn)(char *x)
|
||||
+ void(*error)(char *x)
|
||||
)
|
||||
{
|
||||
struct lzma_header header;
|
||||
@@ -553,8 +557,6 @@ STATIC int INIT unlzma(unsigned char *buf, int in_len,
|
||||
unsigned char *inbuf;
|
||||
int ret = -1;
|
||||
|
||||
- set_error_fn(error_fn);
|
||||
-
|
||||
if (buf)
|
||||
inbuf = buf;
|
||||
else
|
||||
@@ -577,7 +579,7 @@ STATIC int INIT unlzma(unsigned char *buf, int in_len,
|
||||
|
||||
for (i = 0; i < sizeof(header); i++) {
|
||||
if (rc.ptr >= rc.buffer_end)
|
||||
- rc_read(&rc);
|
||||
+ rc_read(&rc, error);
|
||||
((unsigned char *)&header)[i] = *rc.ptr++;
|
||||
}
|
||||
|
||||
@@ -622,17 +624,17 @@ STATIC int INIT unlzma(unsigned char *buf, int in_len,
|
||||
for (i = 0; i < num_probs; i++)
|
||||
p[i] = (1 << RC_MODEL_TOTAL_BITS) >> 1;
|
||||
|
||||
- rc_init_code(&rc);
|
||||
+ rc_init_code(&rc, error);
|
||||
|
||||
while (get_pos(&wr) < header.dst_size) {
|
||||
int pos_state = get_pos(&wr) & pos_state_mask;
|
||||
uint16_t *prob = p + LZMA_IS_MATCH +
|
||||
(cst.state << LZMA_NUM_POS_BITS_MAX) + pos_state;
|
||||
- if (rc_is_bit_0(&rc, prob))
|
||||
+ if (rc_is_bit_0(&rc, prob, error))
|
||||
process_bit0(&wr, &rc, &cst, p, pos_state, prob,
|
||||
- lc, literal_pos_mask);
|
||||
+ lc, literal_pos_mask, error);
|
||||
else {
|
||||
- process_bit1(&wr, &rc, &cst, p, pos_state, prob);
|
||||
+ process_bit1(&wr, &rc, &cst, p, pos_state, prob, error);
|
||||
if (cst.rep0 == 0)
|
||||
break;
|
||||
}
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,35 +0,0 @@
|
||||
From df32832c74028b51bf10e8e5d9b7997988b6e00d Mon Sep 17 00:00:00 2001
|
||||
From: Randy Dunlap <randy.dunlap@oracle.com>
|
||||
Date: Tue, 5 Jan 2010 17:15:37 +0000
|
||||
Subject: [PATCH] libs: force lzma_wrapper to be retained
|
||||
|
||||
When CONFIG_SQUASHFS=m and CONFIG_DECOMPRESS_LZMA=m, decompress_lzma
|
||||
is built but then discarded from the library because no built-in code
|
||||
uses it, so change it from a lib- to an obj- to force it to be kept
|
||||
in the library.
|
||||
|
||||
ERROR: "unlzma" [fs/squashfs/squashfs.ko] undefined!
|
||||
|
||||
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
|
||||
Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Cc: Michal Marek <mmarek@suse.cz>
|
||||
---
|
||||
lib/Makefile | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/lib/Makefile b/lib/Makefile
|
||||
index 0d40152..0995c22 100644
|
||||
--- a/lib/Makefile
|
||||
+++ b/lib/Makefile
|
||||
@@ -69,7 +69,7 @@ obj-$(CONFIG_LZO_DECOMPRESS) += lzo/
|
||||
|
||||
lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o
|
||||
lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o
|
||||
-lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o
|
||||
+obj-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o
|
||||
lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o
|
||||
|
||||
obj-$(CONFIG_TEXTSEARCH) += textsearch.o
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 17cf327511449e35f6cc4264659feea88475f4b6 Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
Date: Thu, 6 May 2010 02:00:11 +0100
|
||||
Subject: [PATCH] squashfs: add missing slab.h include in lzma_wrapper
|
||||
|
||||
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
||||
---
|
||||
fs/squashfs/lzma_wrapper.c | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/fs/squashfs/lzma_wrapper.c b/fs/squashfs/lzma_wrapper.c
|
||||
index cef06d6..4438475 100644
|
||||
--- a/fs/squashfs/lzma_wrapper.c
|
||||
+++ b/fs/squashfs/lzma_wrapper.c
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include <asm/unaligned.h>
|
||||
+#include <linux/slab.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/vmalloc.h>
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,68 +0,0 @@
|
||||
--- a/mm/vmscan.c 2010-07-21 17:01:20.911512995 +0200
|
||||
+++ b/mm/vmscan.c 2010-08-04 22:11:43.663379966 +0200
|
||||
@@ -1113,6 +1113,47 @@
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Returns true if the caller should wait to clean dirty/writeback pages.
|
||||
+ *
|
||||
+ * If we are direct reclaiming for contiguous pages and we do not reclaim
|
||||
+ * everything in the list, try again and wait for writeback IO to complete.
|
||||
+ * This will stall high-order allocations noticeably. Only do that when really
|
||||
+ * need to free the pages under high memory pressure.
|
||||
+ */
|
||||
+static inline bool should_reclaim_stall(unsigned long nr_taken,
|
||||
+ unsigned long nr_freed,
|
||||
+ int priority,
|
||||
+ struct scan_control *sc)
|
||||
+{
|
||||
+ int lumpy_stall_priority;
|
||||
+
|
||||
+ /* kswapd should not stall on sync IO */
|
||||
+ if (current_is_kswapd())
|
||||
+ return false;
|
||||
+
|
||||
+ /* Only stall on lumpy reclaim */
|
||||
+ if (!sc->lumpy_reclaim_mode)
|
||||
+ return false;
|
||||
+
|
||||
+ /* If we have relaimed everything on the isolated list, no stall */
|
||||
+ if (nr_freed == nr_taken)
|
||||
+ return false;
|
||||
+
|
||||
+ /*
|
||||
+ * For high-order allocations, there are two stall thresholds.
|
||||
+ * High-cost allocations stall immediately where as lower
|
||||
+ * order allocations such as stacks require the scanning
|
||||
+ * priority to be much higher before stalling.
|
||||
+ */
|
||||
+ if (sc->order > PAGE_ALLOC_COSTLY_ORDER)
|
||||
+ lumpy_stall_priority = DEF_PRIORITY;
|
||||
+ else
|
||||
+ lumpy_stall_priority = DEF_PRIORITY / 3;
|
||||
+
|
||||
+ return priority <= lumpy_stall_priority;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* shrink_inactive_list() is a helper for shrink_zone(). It returns the number
|
||||
* of reclaimed pages
|
||||
*/
|
||||
@@ -1202,15 +1243,8 @@
|
||||
nr_scanned += nr_scan;
|
||||
nr_freed = shrink_page_list(&page_list, sc, PAGEOUT_IO_ASYNC);
|
||||
|
||||
- /*
|
||||
- * If we are direct reclaiming for contiguous pages and we do
|
||||
- * not reclaim everything in the list, try again and wait
|
||||
- * for IO to complete. This will stall high-order allocations
|
||||
- * but that should be acceptable to the caller
|
||||
- */
|
||||
- if (nr_freed < nr_taken && !current_is_kswapd() &&
|
||||
- sc->lumpy_reclaim_mode) {
|
||||
- congestion_wait(BLK_RW_ASYNC, HZ/10);
|
||||
+ /* Check if we should syncronously wait for writeback */
|
||||
+ if (should_reclaim_stall(nr_taken, nr_freed, priority, sc)) {
|
||||
|
||||
/*
|
||||
* The attempt at page out may have made some
|
@ -1,81 +0,0 @@
|
||||
aufs2 base patch for linux-2.6.35
|
||||
|
||||
diff --git a/fs/namei.c b/fs/namei.c
|
||||
index 868d0cb..6e92c81 100644
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -1178,7 +1178,7 @@ out:
|
||||
* needs parent already locked. Doesn't follow mounts.
|
||||
* SMP-safe.
|
||||
*/
|
||||
-static struct dentry *lookup_hash(struct nameidata *nd)
|
||||
+struct dentry *lookup_hash(struct nameidata *nd)
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -1188,7 +1188,7 @@ static struct dentry *lookup_hash(struct nameidata *nd)
|
||||
return __lookup_hash(&nd->last, nd->path.dentry, nd);
|
||||
}
|
||||
|
||||
-static int __lookup_one_len(const char *name, struct qstr *this,
|
||||
+int __lookup_one_len(const char *name, struct qstr *this,
|
||||
struct dentry *base, int len)
|
||||
{
|
||||
unsigned long hash;
|
||||
diff --git a/fs/splice.c b/fs/splice.c
|
||||
index efdbfec..e01a51e 100644
|
||||
--- a/fs/splice.c
|
||||
+++ b/fs/splice.c
|
||||
@@ -1104,8 +1104,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
|
||||
/*
|
||||
* Attempt to initiate a splice from pipe to file.
|
||||
*/
|
||||
-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
- loff_t *ppos, size_t len, unsigned int flags)
|
||||
+long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
+ loff_t *ppos, size_t len, unsigned int flags)
|
||||
{
|
||||
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
|
||||
loff_t *, size_t, unsigned int);
|
||||
@@ -1132,9 +1132,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
*/
|
||||
-static long do_splice_to(struct file *in, loff_t *ppos,
|
||||
- struct pipe_inode_info *pipe, size_t len,
|
||||
- unsigned int flags)
|
||||
+long do_splice_to(struct file *in, loff_t *ppos,
|
||||
+ struct pipe_inode_info *pipe, size_t len,
|
||||
+ unsigned int flags)
|
||||
{
|
||||
ssize_t (*splice_read)(struct file *, loff_t *,
|
||||
struct pipe_inode_info *, size_t, unsigned int);
|
||||
diff --git a/include/linux/namei.h b/include/linux/namei.h
|
||||
index 05b441d..91bc74e 100644
|
||||
--- a/include/linux/namei.h
|
||||
+++ b/include/linux/namei.h
|
||||
@@ -73,6 +73,9 @@ extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
|
||||
extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
|
||||
int (*open)(struct inode *, struct file *));
|
||||
|
||||
+extern struct dentry *lookup_hash(struct nameidata *nd);
|
||||
+extern int __lookup_one_len(const char *name, struct qstr *this,
|
||||
+ struct dentry *base, int len);
|
||||
extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
|
||||
|
||||
extern int follow_down(struct path *);
|
||||
diff --git a/include/linux/splice.h b/include/linux/splice.h
|
||||
index 997c3b4..be9a153 100644
|
||||
--- a/include/linux/splice.h
|
||||
+++ b/include/linux/splice.h
|
||||
@@ -89,4 +89,10 @@ extern int splice_grow_spd(struct pipe_inode_info *, struct splice_pipe_desc *);
|
||||
extern void splice_shrink_spd(struct pipe_inode_info *,
|
||||
struct splice_pipe_desc *);
|
||||
|
||||
+extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
+ loff_t *ppos, size_t len, unsigned int flags);
|
||||
+extern long do_splice_to(struct file *in, loff_t *ppos,
|
||||
+ struct pipe_inode_info *pipe, size_t len,
|
||||
+ unsigned int flags);
|
||||
+
|
||||
#endif
|
@ -1,272 +0,0 @@
|
||||
aufs2 standalone patch for linux-2.6.35
|
||||
|
||||
diff --git a/fs/namei.c b/fs/namei.c
|
||||
index 6e92c81..334130e 100644
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -348,6 +348,7 @@ int deny_write_access(struct file * file)
|
||||
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL(deny_write_access);
|
||||
|
||||
/**
|
||||
* path_get - get a reference to a path
|
||||
@@ -1187,6 +1188,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
|
||||
return ERR_PTR(err);
|
||||
return __lookup_hash(&nd->last, nd->path.dentry, nd);
|
||||
}
|
||||
+EXPORT_SYMBOL(lookup_hash);
|
||||
|
||||
int __lookup_one_len(const char *name, struct qstr *this,
|
||||
struct dentry *base, int len)
|
||||
@@ -1209,6 +1211,7 @@ int __lookup_one_len(const char *name, struct qstr *this,
|
||||
this->hash = end_name_hash(hash);
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL(__lookup_one_len);
|
||||
|
||||
/**
|
||||
* lookup_one_len - filesystem helper to lookup single pathname component
|
||||
diff --git a/fs/namespace.c b/fs/namespace.c
|
||||
index 88058de..397afcc 100644
|
||||
--- a/fs/namespace.c
|
||||
+++ b/fs/namespace.c
|
||||
@@ -1279,6 +1279,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL(iterate_mounts);
|
||||
|
||||
static void cleanup_group_ids(struct vfsmount *mnt, struct vfsmount *end)
|
||||
{
|
||||
diff --git a/fs/notify/group.c b/fs/notify/group.c
|
||||
index 0e16771..3fab10a 100644
|
||||
--- a/fs/notify/group.c
|
||||
+++ b/fs/notify/group.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/wait.h>
|
||||
+#include <linux/module.h>
|
||||
|
||||
#include <linux/fsnotify_backend.h>
|
||||
#include "fsnotify.h"
|
||||
@@ -169,6 +170,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
|
||||
fsnotify_recalc_global_mask();
|
||||
fsnotify_destroy_group(group);
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_put_group);
|
||||
|
||||
/*
|
||||
* Simply run the fsnotify_groups list and find a group which matches
|
||||
@@ -252,3 +254,4 @@ struct fsnotify_group *fsnotify_obtain_group(unsigned int group_num, __u32 mask,
|
||||
|
||||
return group;
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_obtain_group);
|
||||
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c
|
||||
index 0399bcb..74cdc13 100644
|
||||
--- a/fs/notify/inode_mark.c
|
||||
+++ b/fs/notify/inode_mark.c
|
||||
@@ -105,6 +105,7 @@ void fsnotify_put_mark(struct fsnotify_mark_entry *entry)
|
||||
if (atomic_dec_and_test(&entry->refcnt))
|
||||
entry->free_mark(entry);
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_put_mark);
|
||||
|
||||
/*
|
||||
* Recalculate the mask of events relevant to a given inode locked.
|
||||
@@ -215,6 +216,7 @@ void fsnotify_destroy_mark_by_entry(struct fsnotify_mark_entry *entry)
|
||||
if (unlikely(atomic_dec_and_test(&group->num_marks)))
|
||||
fsnotify_final_destroy_group(group);
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_destroy_mark_by_entry);
|
||||
|
||||
/*
|
||||
* Given a group, destroy all of the marks associated with that group.
|
||||
@@ -281,6 +283,7 @@ struct fsnotify_mark_entry *fsnotify_find_mark_entry(struct fsnotify_group *grou
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_find_mark_entry);
|
||||
|
||||
/*
|
||||
* Nothing fancy, just initialize lists and locks and counters.
|
||||
@@ -297,6 +300,7 @@ void fsnotify_init_mark(struct fsnotify_mark_entry *entry,
|
||||
entry->inode = NULL;
|
||||
entry->free_mark = free_mark;
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_init_mark);
|
||||
|
||||
/*
|
||||
* Attach an initialized mark entry to a given group and inode.
|
||||
@@ -352,6 +356,7 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry,
|
||||
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL(fsnotify_add_mark);
|
||||
|
||||
/**
|
||||
* fsnotify_unmount_inodes - an sb is unmounting. handle any watched inodes.
|
||||
diff --git a/fs/open.c b/fs/open.c
|
||||
index 5463266..d248ead 100644
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -59,6 +59,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
|
||||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL(do_truncate);
|
||||
|
||||
static long do_sys_truncate(const char __user *pathname, loff_t length)
|
||||
{
|
||||
diff --git a/fs/splice.c b/fs/splice.c
|
||||
index e01a51e..4806358 100644
|
||||
--- a/fs/splice.c
|
||||
+++ b/fs/splice.c
|
||||
@@ -1128,6 +1128,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
|
||||
return splice_write(pipe, out, ppos, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL(do_splice_from);
|
||||
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
@@ -1154,6 +1155,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
|
||||
|
||||
return splice_read(in, ppos, pipe, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL(do_splice_to);
|
||||
|
||||
/**
|
||||
* splice_direct_to_actor - splices data directly between two non-pipes
|
||||
diff --git a/security/commoncap.c b/security/commoncap.c
|
||||
index 4e01599..3611e1b 100644
|
||||
--- a/security/commoncap.c
|
||||
+++ b/security/commoncap.c
|
||||
@@ -951,3 +951,4 @@ int cap_file_mmap(struct file *file, unsigned long reqprot,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL(cap_file_mmap);
|
||||
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
|
||||
index 8d9c48f..29108aa 100644
|
||||
--- a/security/device_cgroup.c
|
||||
+++ b/security/device_cgroup.c
|
||||
@@ -515,6 +515,7 @@ found:
|
||||
|
||||
return -EPERM;
|
||||
}
|
||||
+EXPORT_SYMBOL(devcgroup_inode_permission);
|
||||
|
||||
int devcgroup_inode_mknod(int mode, dev_t dev)
|
||||
{
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index 351942a..6ba84a8 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -376,6 +376,7 @@ int security_path_mkdir(struct path *dir, struct dentry *dentry, int mode)
|
||||
return 0;
|
||||
return security_ops->path_mkdir(dir, dentry, mode);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_mkdir);
|
||||
|
||||
int security_path_rmdir(struct path *dir, struct dentry *dentry)
|
||||
{
|
||||
@@ -383,6 +384,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
|
||||
return 0;
|
||||
return security_ops->path_rmdir(dir, dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_rmdir);
|
||||
|
||||
int security_path_unlink(struct path *dir, struct dentry *dentry)
|
||||
{
|
||||
@@ -390,6 +392,7 @@ int security_path_unlink(struct path *dir, struct dentry *dentry)
|
||||
return 0;
|
||||
return security_ops->path_unlink(dir, dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_unlink);
|
||||
|
||||
int security_path_symlink(struct path *dir, struct dentry *dentry,
|
||||
const char *old_name)
|
||||
@@ -398,6 +401,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
|
||||
return 0;
|
||||
return security_ops->path_symlink(dir, dentry, old_name);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_symlink);
|
||||
|
||||
int security_path_link(struct dentry *old_dentry, struct path *new_dir,
|
||||
struct dentry *new_dentry)
|
||||
@@ -406,6 +410,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
|
||||
return 0;
|
||||
return security_ops->path_link(old_dentry, new_dir, new_dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_link);
|
||||
|
||||
int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
|
||||
struct path *new_dir, struct dentry *new_dentry)
|
||||
@@ -416,6 +421,7 @@ int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
|
||||
return security_ops->path_rename(old_dir, old_dentry, new_dir,
|
||||
new_dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_rename);
|
||||
|
||||
int security_path_truncate(struct path *path, loff_t length,
|
||||
unsigned int time_attrs)
|
||||
@@ -424,6 +430,7 @@ int security_path_truncate(struct path *path, loff_t length,
|
||||
return 0;
|
||||
return security_ops->path_truncate(path, length, time_attrs);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_truncate);
|
||||
|
||||
int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
|
||||
mode_t mode)
|
||||
@@ -432,6 +439,7 @@ int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
|
||||
return 0;
|
||||
return security_ops->path_chmod(dentry, mnt, mode);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_chmod);
|
||||
|
||||
int security_path_chown(struct path *path, uid_t uid, gid_t gid)
|
||||
{
|
||||
@@ -439,6 +447,7 @@ int security_path_chown(struct path *path, uid_t uid, gid_t gid)
|
||||
return 0;
|
||||
return security_ops->path_chown(path, uid, gid);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_path_chown);
|
||||
|
||||
int security_path_chroot(struct path *path)
|
||||
{
|
||||
@@ -515,6 +524,7 @@ int security_inode_readlink(struct dentry *dentry)
|
||||
return 0;
|
||||
return security_ops->inode_readlink(dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_inode_readlink);
|
||||
|
||||
int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
|
||||
{
|
||||
@@ -529,6 +539,7 @@ int security_inode_permission(struct inode *inode, int mask)
|
||||
return 0;
|
||||
return security_ops->inode_permission(inode, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_inode_permission);
|
||||
|
||||
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
@@ -622,6 +633,7 @@ int security_file_permission(struct file *file, int mask)
|
||||
{
|
||||
return security_ops->file_permission(file, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_file_permission);
|
||||
|
||||
int security_file_alloc(struct file *file)
|
||||
{
|
||||
@@ -649,6 +661,7 @@ int security_file_mmap(struct file *file, unsigned long reqprot,
|
||||
return ret;
|
||||
return ima_file_mmap(file, prot);
|
||||
}
|
||||
+EXPORT_SYMBOL(security_file_mmap);
|
||||
|
||||
int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot,
|
||||
unsigned long prot)
|
@ -29,9 +29,10 @@ PATCHES=(
|
||||
0007-Squashfs-select-decompress-lzma-needed.patch%1
|
||||
0008-Squashfs-lzma-make-lzma-reentrant.patch%1
|
||||
0009-Squashfs-force-lzma-wrapper-to-be-retained.patch%1
|
||||
0010-rt2x00-powersave.patch%1
|
||||
)
|
||||
# Name of the resulting patch (will be bzipped afterwards)
|
||||
PATCHNAME="patch-2.6.33.7-1-CHAKRA"
|
||||
PATCHNAME="patch-2.6.33.7-3-CHAKRA"
|
||||
|
||||
# Run this before applying patches
|
||||
pre_apply() {
|
||||
|
16
linux-2.6-CHAKRA/patches/0010-rt2x00-powersave.patch
Normal file
16
linux-2.6-CHAKRA/patches/0010-rt2x00-powersave.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
|
||||
index b20e3ea..9a6ceb4 100644
|
||||
--- a/drivers/net/wireless/rt2x00/rt61pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
|
||||
@@ -2538,6 +2538,11 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
||||
unsigned int i;
|
||||
|
||||
/*
|
||||
+ * Disable powersaving as default.
|
||||
+ */
|
||||
+ rt2x00dev->hw->wiphy->ps_default = false;
|
||||
+
|
||||
+ /*
|
||||
* Initialize all hw fields.
|
||||
*/
|
||||
rt2x00dev->hw->flags =
|
9
makepkg
9
makepkg
@ -40,7 +40,7 @@ export TEXTDOMAINDIR='/usr/share/locale'
|
||||
# file -i does not work on Mac OSX unless legacy mode is set
|
||||
export COMMAND_MODE='legacy'
|
||||
|
||||
myver='3.4.0'
|
||||
myver='3.4.0-chakra-0.1'
|
||||
confdir='../_buildscripts'
|
||||
BUILDSCRIPT='PKGBUILD'
|
||||
startdir="$PWD"
|
||||
@ -921,6 +921,7 @@ write_pkginfo() {
|
||||
echo "packager = $packager" >>.PKGINFO
|
||||
echo "size = $size" >>.PKGINFO
|
||||
echo "arch = $PKGARCH" >>.PKGINFO
|
||||
echo "gitfolder = ${startdir##*/}" >>.PKGINFO
|
||||
if [[ $(check_option force) = "y" ]]; then
|
||||
echo "force = true" >> .PKGINFO
|
||||
fi
|
||||
@ -981,9 +982,9 @@ check_package() {
|
||||
done
|
||||
|
||||
# check for references to the build directory
|
||||
if grep -R "${srcdir}" "${pkgdir}" &>/dev/null; then
|
||||
warning "$(gettext "Package contains reference to %s")" "\$srcdir"
|
||||
fi
|
||||
#if grep -R "${srcdir}" "${pkgdir}" &>/dev/null; then
|
||||
# warning "$(gettext "Package contains reference to %s")" "\$srcdir"
|
||||
#fi
|
||||
}
|
||||
|
||||
create_package() {
|
||||
|
Loading…
Reference in New Issue
Block a user