Commit a4cdc5b2 authored by Phil Miller's avatar Phil Miller

kernel-next (fusion-testing): first set of updates

parent 471e25bf
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=aufs2-util
pkgver=20101025
pkgrel=1
pkgdesc="Another Unionfs Implementation that supports NFS branches"
arch=('i686' 'x86_64')
url="http://aufs.sourceforge.net/"
license=('GPL2')
depends=('glibc')
makedepends=('kernel26>=2.6.36-2' 'kernel26-headers')
replaces=('aufs-utils')
source=(http://chakra-project.org/sources/aufs2-util/aufs2-util-$pkgver.tar.gz)
md5sums=('acb0d8dcfc721bf2514c547be92503ab')
build() {
cd $srcdir/aufs2.1-util-$pkgver || return 1
# fix KDIR
export CPPFLAGS="-I /usr/src/linux-2.6.36-CHAKRA/include/"
#sed -i 's|$(shell uname -r)|2.6.36-CHAKRA|g' ./Makefile
# build
make || return 1
# install
#mkdir -p $pkgdir/{sbin,usr/bin,etc/default/aufs}
make DESTDIR=$pkgdir install || return 1
rm $pkgdir/usr/lib/libau.so.2
rm $pkgdir/usr/lib/libau.so
ln -sf libau.so.2.2 $pkgdir/usr/lib/libau.so.2
ln -sf libau.so.2.2 $pkgdir/usr/lib/libau.so
}
#!/bin/sh
#AUFS2VERSION=""
#KERNELVERSION=2.6.35
GITSNAPSHOT=20101025
# aufs2 (no -xx) for the latest -rc version.
rm -R aufs2-util.git
git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-util.git aufs2-util.git
cd aufs2-util.git
#git checkout origin/aufs2${AUFS2VERSION}
git checkout origin/aufs2.1
#*** apply "aufs2-base.patch" and "aufs2-standalone.patch" to your kernel source files.
cd ..
rm -rf aufs2-util-${GITSNAPSHOT}
cp -a aufs2-util.git aufs2-util-${GITSNAPSHOT}
tar -czf aufs2-util-${GITSNAPSHOT}.tar.gz --exclude=.git aufs2-util-${GITSNAPSHOT}
......@@ -7,43 +7,40 @@
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=broadcom-wl
pkgver=5.60.48.36
pkgrel=9
# Find the kernel name inside the chroot
_kernver=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
pkgdesc="Broadcom 802.11abg Networking Drivers for kernel26"
pkgname=broadcom-wl
pkgver=5.60.246.2
pkgrel=1
pkgdesc='Broadcom 802.11abg networking drivers'
arch=('i686' 'x86_64')
[ "$CARCH" = "i686" ] && ARCH=x86_32
[ "$CARCH" = "x86_64" ] && ARCH=x86_64
url="http://www.broadcom.com/support/802.11/linux_sta.php"
url='http://www.broadcom.com/support/802.11/linux_sta.php'
license=('MIXED/Proprietary')
depends=('kernel26>=2.6.35' 'kernel26<2.6.36')
makedepends=(kernel26-headers)
install=broadcom-wl.install
source=("http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-${ARCH}-v${pkgver}.tar.gz" 'kernel-2.6.35.patch')
[ "$CARCH" = 'x86_64' ] && sha1sums=('1174a4d3102aa0ed45003556e03842668ef698b9'
'43d541063fd91b1fbd5e84310228abafddab7f7e') \
|| sha1sums=('07d955afe599466b0e25bcc507186f5b50f1a171'
'43d541063fd91b1fbd5e84310228abafddab7f7e')
groups=("kernel26-modules")
conflicts=("broadcom-wl")
replaces=("broadcom-wl")
depends=('kernel26>=2.6.36' 'kernel26<2.6.37')
makedepends=('kernel26-headers')
[ "$CARCH" = 'x86_64' ] && ARCH=x86-64 \
|| ARCH=x86-32
source=("http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${ARCH}_v${pkgver}.tar.gz"
'license.patch'
'semaphore.patch')
[ "$CARCH" = 'x86_64' ] && sha1sums=('6d82434d8087aba9cbea6b46bcf97f14c4e6c1f0'
'994f58cdec61165313e1386d6c7e88723e6f27bf'
'1cc0c33199403f881f1a9947669ad0cf83342592') \
|| sha1sums=('53d0a3cbc7c7f5b0b75f8da0480a4069dfc66281'
'994f58cdec61165313e1386d6c7e88723e6f27bf'
'1cc0c33199403f881f1a9947669ad0cf83342592')
install=install
build() {
cd "$srcdir"
patch -p1 < kernel-2.6.35.patch
# Adding line license
sed -i '190i\MODULE_LICENSE("Mixed/Proprietary"); \n' ${srcdir}/src/wl/sys/wl_linux.c
sed -i 's/linux\/autoconf.h/generated\/autoconf.h/' ${srcdir}/src/include/linuxver.h
# Building
KBUILD_NOPEDANTIC=1 make -C /lib/modules/${_kernver}/build M=`pwd` || return 1
install -D -m 755 wl.ko ${pkgdir}/lib/modules/${_kernver}/kernel/drivers/net/wireless/wl.ko || return 1
cd "$srcdir"
patch -p1 < license.patch
patch -p1 < semaphore.patch
KBUILD_NOPEDANTIC=1 make -C /lib/modules/${_kernver}/build M=`pwd` || return 1
}
package() {
cd "$srcdir"
install -D -m 755 wl.ko ${pkgdir}/lib/modules/${_kernver}/kernel/drivers/net/wireless/wl.ko || return 1
}
diff -aur bla/src/include/linuxver.h bla.new/src/include/linuxver.h
--- bla/src/include/linuxver.h 2010-02-06 02:59:15.000000000 +0100
+++ bla.new/src/include/linuxver.h 2010-08-07 23:17:35.354988049 +0200
@@ -20,7 +20,7 @@
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0))
#include <linux/config.h>
#else
-#include <linux/autoconf.h>
+#include <generated/autoconf.h>
#endif
#include <linux/module.h>
diff -aur bla/src/wl/sys/wl_iw.h bla.new/src/wl/sys/wl_iw.h
--- bla/src/wl/sys/wl_iw.h 2010-02-06 02:59:15.000000000 +0100
+++ bla.new/src/wl/sys/wl_iw.h 2010-08-07 23:17:35.368641722 +0200
@@ -15,6 +15,7 @@
#ifndef _wl_iw_h_
#define _wl_iw_h_
+#include <linux/semaphore.h>
#include <linux/wireless.h>
#include <typedefs.h>
diff -aur bla/src/wl/sys/wl_linux.c bla.new/src/wl/sys/wl_linux.c
--- bla/src/wl/sys/wl_linux.c 2010-02-06 02:59:15.000000000 +0100
+++ bla.new/src/wl/sys/wl_linux.c 2010-08-07 23:17:35.368641722 +0200
@@ -187,6 +187,8 @@
static int nompc = 0;
module_param(nompc, int, 0);
+MODULE_LICENSE("Mixed/Proprietary");
+
static char name[IFNAMSIZ] = "eth%d";
module_param_string(name, name, IFNAMSIZ, 0);
@@ -1416,8 +1418,13 @@
_wl_set_multicast_list(struct net_device *dev)
{
wl_info_t *wl;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
+ struct netdev_hw_addr *ha;
+ int i=0;
+#else
struct dev_mc_list *mclist;
int i;
+#endif
if (!dev)
return;
@@ -1430,14 +1437,22 @@
if (wl->pub->up) {
wl->pub->allmulti = (dev->flags & IFF_ALLMULTI)? TRUE: FALSE;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
+ netdev_for_each_mc_addr(ha, dev) {
+#else
for (i = 0, mclist = dev->mc_list; mclist && (i < dev->mc_count);
i++, mclist = mclist->next) {
+#endif
if (i >= MAXMULTILIST) {
wl->pub->allmulti = TRUE;
i = 0;
break;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
+ wl->pub->multicast[i] = *((struct ether_addr*) ha->addr);
+#else
wl->pub->multicast[i] = *((struct ether_addr*) mclist->dmi_addr);
+#endif
}
wl->pub->nmulticast = i;
wlc_set(wl->wlc, WLC_SET_PROMISC, (dev->flags & IFF_PROMISC));
diff -aur bla/src/wl/sys/wl_linux.c bla.new/src/wl/sys/wl_linux.c
--- bla/src/wl/sys/wl_linux.c 2010-02-06 02:59:15.000000000 +0100
+++ bla.new/src/wl/sys/wl_linux.c 2010-08-07 23:17:35.368641722 +0200
@@ -187,6 +187,8 @@
static int nompc = 0;
module_param(nompc, int, 0);
+MODULE_LICENSE("Mixed/Proprietary");
+
static char name[IFNAMSIZ] = "eth%d";
module_param_string(name, name, IFNAMSIZ, 0);
diff -aur bla/src/wl/sys/wl_iw.h bla.new/src/wl/sys/wl_iw.h
--- bla/src/wl/sys/wl_iw.h 2010-02-06 02:59:15.000000000 +0100
+++ bla.new/src/wl/sys/wl_iw.h 2010-08-07 23:17:35.368641722 +0200
@@ -15,6 +15,7 @@
#ifndef _wl_iw_h_
#define _wl_iw_h_
+#include <linux/semaphore.h>
#include <linux/wireless.h>
#include <typedefs.h>
......@@ -12,10 +12,10 @@ pkgname=('kernel26' 'kernel26-firmware' 'kernel26-headers') # Build stock -CHAKR
# pkgname=kernel26-custom # Build kernel with a different name
#_kernelname=${pkgname#kernel26}
_kernelname=""
_basekernel=2.6.35
pkgver=${_basekernel}.7
pkgrel=1
_patchname="patch-${pkgver}-1-CHAKRA"
_basekernel=2.6.36
pkgver=${_basekernel}
pkgrel=2
_patchname="patch-${pkgver}-2-CHAKRA"
arch=(i686 x86_64)
license=('GPL2')
url="http://www.kernel.org"
......@@ -25,10 +25,10 @@ source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
config config.x86_64
# standard config files for mkinitcpio ramdisk
kernel26.preset)
md5sums=('091abeb4684ce03d1d936851618687b6'
'36dcb60b9648c1da122025420ad11484'
'6c2bc6a4c8f2b757b9cab6a43c8d18e4'
'15163f4a44418c7efd148ac3015f3908'
md5sums=('61f3739a73afb6914cb007f37fb09b62'
'930d7f134f4c53167668b42e9a2c47b9'
'3a263275881b62bd4368852bde286d09'
'c5502e97bf409a4f5755de1534f5e836'
'25584700a0a679542929c4bed31433b6')
build() {
......@@ -81,8 +81,7 @@ package_kernel26() {
'alsa-driver' 'ieee80211' 'hostap-driver26'
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500' 'kernel26' 'aufs2')
provides=('aufs2')
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500' 'kernel26')
install=kernel26.install
optdepends=('crda: to set the correct wireless channels of your country')
......@@ -158,7 +157,7 @@ package_kernel26-headers() {
# add headers for lirc package
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo; do # zc0301 - damaged
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
done
......@@ -218,7 +217,7 @@ package_kernel26-headers() {
# remove unneeded architectures
rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
# fix aufs
#rm -rf ${pkgdir}/usr/src/linux-${_kernver}/include/linux/aufs_type.h
# rm -rf ${pkgdir}/usr/src/linux-${_kernver}/include/linux/aufs_type.h
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=
KERNEL_VERSION=2.6.35-CHAKRA
KERNEL_VERSION=2.6.36-CHAKRA
post_install () {
# updating module dependencies
......
# Kernel source file
SRC="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.tar.bz2"
SRC="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.36.tar.bz2"
# Original source directory
SRCORIG="linux-2.6.35"
SRCORIG="linux-2.6.36"
# Our source directory
SRCNAME="linux-2.6.35-CHAKRA"
SRCNAME="linux-2.6.36-CHAKRA"
# Patches:
# URL%patchlevel
# or
# filename%patchlevel (file must be in patches/ subdirectory)
PATCHES=(
# add upstream patch from 2.6.35 series, if needed
# http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.35.7.bz2%1
# add upstream patch from 2.6.36 series
#http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.36.1.bz2%1
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
# add liquorix patchset:
# http://liquorix.net/
http://liquorix.net/sources/35.7-1.patch.gz%1
# add fixes
# none yet
# add aufs2 support, in reference to:
# http://aufs.sourceforge.net
aufs2-base.patch%1
#aufs2-standalone.patch2%1
aufs2-kbuild.patch%1
aufs2.1-standalone.tree-36-UNRELEASED-20101024.patch%1
aufs2.1-standalone.tree-36-UNRELEASED-20101024-EXPORT_SYMBOL.patch%1
# squashfs with lzma
001-add_support_for_LZMA_compressed_filesystems.patch%1
002-make_lzma_available_to_non_initramfs_initrd_code.patch%1
003-select_DECOMPRESS_LZMA_NEEDED_when_including_support_for_lzma.patch%1
004-make_lzma_reentrant.patch%1
005-force_lzma_wrapper_to_be_retained.patch%1
006-add_missing_slab.h_include_in_lzma_wrapper.patch%1
)
# Name of the resulting patch (will be bzipped afterwards)
PATCHNAME="patch-2.6.35.7-1-CHAKRA"
PATCHNAME="patch-2.6.36-2-CHAKRA"
# Run this before applying patches
pre_apply() {
......@@ -40,4 +49,3 @@ post_apply() {
# Kill some files
find . -name '*~' -exec rm -f {} \; 2>/dev/null
}
README - 2010-09-19
README - 2010-03-04
To generate a kernel-patch change in your chakra-buildsys with:
cd ~/DEV/buildroot
cd ~/DEV/KDEmod
./enter* chakra-i686 or ./enter* chakra-x86_64
cd ../linux-2.6-CHAKAR
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 on our server
copy generated patch archive to kernel26 folder in same repo
update kernel26 PKGBUILD
update git with new changes of aufs2, kernel26 and linux-2.6-CHAKRA
\ No newline at end of file
update svn with new changes of aufs2, kernel26 and linux-2.6-ARCH
\ No newline at end of file
From a19b1a6807bc71eb0638f5e7f57d71396cd34863 Mon Sep 17 00:00:00 2001
From: Phillip Lougher <phillip@lougher.demon.co.uk>
Date: Tue, 20 Oct 2009 09:54:36 +0000
Subject: Squashfs: add support for LZMA compressed filesystems
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
---
diff --git a/fs/squashfs/Kconfig b/fs/squashfs/Kconfig
index e5f63da..5632f2a 100644
--- a/fs/squashfs/Kconfig
+++ b/fs/squashfs/Kconfig
@@ -37,6 +37,12 @@ config SQUASHFS_XATTR
If unsure, say N.
+config SQUASHFS_LZMA
+ bool "Include support for LZMA compressed file systems"
+ depends on SQUASHFS
+ select DECOMPRESS_LZMA
+
+
config SQUASHFS_LZO
bool "Include support for LZO compressed file systems"
depends on SQUASHFS
diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile
index 7672bac..30fb0fa 100644
--- a/fs/squashfs/Makefile
+++ b/fs/squashfs/Makefile
@@ -6,4 +6,5 @@ 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_XATTR) += xattr.o xattr_id.o
+squashfs-$(CONFIG_SQUASHFS_LZMA) += lzma_wrapper.o
squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o
diff --git a/fs/squashfs/decompressor.c b/fs/squashfs/decompressor.c
index 24af9ce..2f25b2e 100644
--- a/fs/squashfs/decompressor.c
+++ b/fs/squashfs/decompressor.c
@@ -52,7 +52,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
#ifdef CONFIG_SQUASHFS_LZO
&squashfs_lzo_comp_ops,
#else
diff --git a/fs/squashfs/lzma_wrapper.c b/fs/squashfs/lzma_wrapper.c
new file mode 100644
index 0000000..cef06d6
--- a/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 5d45569..bae1b2c 100644
--- a/fs/squashfs/squashfs.h
+++ b/fs/squashfs/squashfs.h
@@ -105,5 +105,8 @@ extern const struct xattr_handler *squashfs_xattr_handlers[];
/* zlib_wrapper.c */
extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
+/* lzma wrapper.c */
+extern const struct squashfs_decompressor squashfs_lzma_comp_ops;
+
/* lzo_wrapper.c */
extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
--
cgit v0.8.3.1
From afaf6deda47d24effe8f638b46abea210915bee0 Mon Sep 17 00:00:00 2001
From: Phillip Lougher <phillip@lougher.demon.co.uk>
Date: Mon, 11 Jan 2010 15:15:00 +0000
Subject: 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>
---
diff --git a/include/linux/decompress/bunzip2_mm.h b/include/linux/decompress/bunzip2_mm.h
new file mode 100644
index 0000000..cac6fef
--- a/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
--- a/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
--- a/dev/null
+++ b/include/linux/decompress/unlzma_mm.h
@@ -0,0 +1,20 @@
+#ifndef UNLZMA_MM_H