mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 02:37:14 +08:00
add kernel26-lts & modules
This commit is contained in:
parent
1d4fea8265
commit
fda33eacf0
66
acpi_call-lts/PKGBUILD
Normal file
66
acpi_call-lts/PKGBUILD
Normal file
@ -0,0 +1,66 @@
|
||||
#
|
||||
# Core 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
|
||||
|
||||
_kernver=2.6.35-CHAKRA-LTS
|
||||
pkgname=acpi_call-lts
|
||||
pkgver=20101109
|
||||
pkgrel=1
|
||||
pkgdesc="A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)."
|
||||
arch=('i686' 'x86_64')
|
||||
url=("http://github.com/mkottman/acpi_call")
|
||||
license=('GPL')
|
||||
depends=('kernel26-lts' 'kernel26-lts-headers')
|
||||
groups=("kernel26-lts-modules")
|
||||
makedepends=('git')
|
||||
install=acpi_call.install
|
||||
source=(http://chakra-project.org/sources/acpi_call/acpi_call-${pkgver}.tar.xz)
|
||||
md5sums=('79e7a95ebeff1df29201cae22067921f')
|
||||
|
||||
|
||||
# create tarball: source PKGBUILD && mksource
|
||||
|
||||
mksource() {
|
||||
git clone http://github.com/mkottman/acpi_call.git
|
||||
pushd acpi_call
|
||||
popd
|
||||
tar -cvJf ${pkgname}-${pkgver}.tar.xz acpi_call/*
|
||||
md5sum ${pkgname}-${pkgver}.tar.xz
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${srcdir}
|
||||
|
||||
## Build
|
||||
rm -rf ${srcdir}/$pkgname-build
|
||||
cp -r ${srcdir}/acpi_call ${srcdir}/$pkgname-build
|
||||
cd ${srcdir}/$pkgname-build
|
||||
|
||||
make
|
||||
}
|
||||
package() {
|
||||
cd ${srcdir}/$pkgname-build
|
||||
install -d ${pkgdir}/usr/share/$pkgname || return 1
|
||||
install -d ${pkgdir}/usr/bin || return 1
|
||||
install -d ${pkgdir}/usr/share/$pkgname/doc || return 1
|
||||
cp -a ${srcdir}/$pkgname-build/test_off.sh \
|
||||
${pkgdir}/usr/share/$pkgname || return 1
|
||||
ln -s /usr/share/$pkgname/test_off.sh \
|
||||
${pkgdir}/usr/bin/test_off-lts.sh || return 1
|
||||
install -Dm644 README \
|
||||
${pkgdir}/usr/share/$pkgname/README
|
||||
|
||||
msg2 "Building module for $_kernver..."
|
||||
|
||||
# KDIR is necessary even when cleaning
|
||||
make KDIR=/usr/src/linux-${_kernver} clean
|
||||
make KDIR=/usr/src/linux-${_kernver}
|
||||
|
||||
install -D -m644 acpi_call.ko ${pkgdir}/lib/modules/${_kernver}/kernel/drivers/acpi/acpi_call.ko
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/acpi_call.install
|
||||
}
|
24
acpi_call-lts/acpi_call.install
Executable file
24
acpi_call-lts/acpi_call.install
Executable file
@ -0,0 +1,24 @@
|
||||
post_install() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
echo ""
|
||||
echo "[+] modprobe acpi_call"
|
||||
echo ">>> run /usr/bin/test_off.sh to test/view different acpi_call functions to see if it disables your secondary/hybrid video card"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
echo ""
|
||||
echo "[+] modprobe acpi_call"
|
||||
echo ">>> run /usr/bin/test_off.sh to test/view different acpi_call functions to see if it disables your secondary/hybrid video card"
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
op=$1
|
||||
shift
|
||||
$op $*
|
48
broadcom-wl-lts/PKGBUILD
Normal file
48
broadcom-wl-lts/PKGBUILD
Normal file
@ -0,0 +1,48 @@
|
||||
#
|
||||
# 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>
|
||||
|
||||
# use ../fakeuname -r 2.6.35-CHAKRA-LTS ../makepkg
|
||||
_kernver=`uname -r`
|
||||
|
||||
pkgname=broadcom-wl-lts
|
||||
pkgver=5.100.82.38
|
||||
pkgrel=1
|
||||
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://www.broadcom.com/support/802.11/linux_sta.php'
|
||||
license=('custom')
|
||||
depends=('kernel26-lts')
|
||||
makedepends=('kernel26-lts-headers')
|
||||
groups=("kernel26-lts-modules")
|
||||
|
||||
[ "$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'
|
||||
'mutex-sema.patch')
|
||||
|
||||
sha1sums=('3062830f86c5f1f41d8a4b26d6e0072dc989c7ba'
|
||||
'ea7b67982ddc0f56fd3becb9914fd4458fe7d373'
|
||||
'105f8e1d48ebe1f25d53859e5ab9326a27435c66'
|
||||
'adf0138194ae204ad70ce44e98b2dc18ead4ae2a')
|
||||
[ "$CARCH" = 'x86_64' ] && sha1sums[0]='6076de3bd8206b3e7b8bfc2eadbe3a97eec4e735'
|
||||
|
||||
install=install
|
||||
|
||||
build() {
|
||||
cd "$srcdir"
|
||||
patch -p1 < license.patch
|
||||
patch -p1 < semaphore.patch
|
||||
patch -p1 < mutex-sema.patch
|
||||
make -C /lib/modules/$_kernver/build M=`pwd`
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir"
|
||||
install -D -m 755 wl.ko "$pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/wl.ko"
|
||||
install -D -m 644 lib/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
|
||||
}
|
18
broadcom-wl-lts/broadcom-wl.install
Normal file
18
broadcom-wl-lts/broadcom-wl.install
Normal file
@ -0,0 +1,18 @@
|
||||
post_install() {
|
||||
KERNEL_VERSION=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
|
||||
#KERNEL_VERSION=$(uname -r)
|
||||
depmod $KERNEL_VERSION
|
||||
|
||||
echo ""
|
||||
echo "==> NOTE:"
|
||||
echo "==> If the modules do not load at boot, remember add in your rc.conf:"
|
||||
echo "==> MODULES=(lib80211 wl !b43 !ssb ...)"
|
||||
echo ""
|
||||
echo "==> And if you have problems with interfaces swapped, read the wiki:"
|
||||
echo "==> http://wiki.archlinux.org/index.php/Broadcom_BCM4312#Interfaces_swapped_every_time"
|
||||
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
15
broadcom-wl-lts/install
Normal file
15
broadcom-wl-lts/install
Normal file
@ -0,0 +1,15 @@
|
||||
post_upgrade() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
post_install() {
|
||||
cat <<EOF
|
||||
==> If the modules do not load at boot, add to your /etc/rc.conf:
|
||||
==> MODULES=(lib80211 wl !b43 !ssb ...)
|
||||
==>
|
||||
==> If you have problems with interfaces swapped, read:
|
||||
==> http://wiki.archlinux.org/index.php/Broadcom_BCM4312#Interfaces_swapped_every_time
|
||||
EOF
|
||||
post_upgrade
|
||||
}
|
11
broadcom-wl-lts/license.patch
Normal file
11
broadcom-wl-lts/license.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -aur old/src/wl/sys/wl_linux.c new/src/wl/sys/wl_linux.c
|
||||
--- old/src/wl/sys/wl_linux.c 2010-12-15 02:58:07.000000000 +0100
|
||||
+++ new/src/wl/sys/wl_linux.c 2010-12-25 18:15:43.356676382 +0100
|
||||
@@ -240,6 +240,7 @@
|
||||
|
||||
static int nompc = 0;
|
||||
module_param(nompc, int, 0);
|
||||
+MODULE_LICENSE("Mixed/Proprietary");
|
||||
|
||||
#ifdef quote_str
|
||||
#undef quote_str
|
12
broadcom-wl-lts/mutex-sema.patch
Normal file
12
broadcom-wl-lts/mutex-sema.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -aur old/src/wl/sys/wl_linux.c new/src/wl/sys/wl_linux.c
|
||||
--- old/src/wl/sys/wl_linux.c 2010-12-25 18:17:33.333343048 +0100
|
||||
+++ new/src/wl/sys/wl_linux.c 2010-12-25 18:21:05.856676376 +0100
|
||||
@@ -483,7 +483,7 @@
|
||||
#ifdef WL_ALL_PASSIVE
|
||||
spin_lock_init(&wl->txq_lock);
|
||||
#endif
|
||||
- init_MUTEX(&wl->sem);
|
||||
+ sema_init(&wl->sem, 1);
|
||||
}
|
||||
|
||||
if (!(wl->wlc = wlc_attach((void *) wl, vendor, device, unit, wl->piomode,
|
11
broadcom-wl-lts/semaphore.patch
Normal file
11
broadcom-wl-lts/semaphore.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -aur old/src/wl/sys/wl_iw.h new/src/wl/sys/wl_iw.h
|
||||
--- old/src/wl/sys/wl_iw.h 2010-12-15 02:58:07.000000000 +0100
|
||||
+++ new/src/wl/sys/wl_iw.h 2010-12-25 18:17:01.826676379 +0100
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef _wl_iw_h_
|
||||
#define _wl_iw_h_
|
||||
|
||||
+#include <linux/semaphore.h>
|
||||
#include <linux/wireless.h>
|
||||
|
||||
#include <typedefs.h>
|
231
kernel26-lts/PKGBUILD
Normal file
231
kernel26-lts/PKGBUILD
Normal file
@ -0,0 +1,231 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
pkgbase="kernel26-lts"
|
||||
pkgname=('kernel26-lts' 'kernel26-lts-headers') # 'kernel26-lts-firmware' - Build stock -CHAKRA-LTS kernel
|
||||
_kernelname=${pkgname#kernel26}
|
||||
_basekernel=2.6.35
|
||||
pkgver=${_basekernel}.11
|
||||
pkgrel=1
|
||||
_patchname="patch-${pkgver}-${pkgrel}-CHAKRA-LTS"
|
||||
arch=(i686 x86_64)
|
||||
license=('GPL2')
|
||||
url="http://www.kernel.org"
|
||||
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
|
||||
http://chakra-project.org/sources/kernel26/${_patchname}.bz2
|
||||
# the main kernel config files
|
||||
config config.x86_64
|
||||
# standard config files for mkinitcpio ramdisk
|
||||
${pkgname}.preset)
|
||||
md5sums=('091abeb4684ce03d1d936851618687b6'
|
||||
'1da72a2ded1e22b4e4badc47396173f4'
|
||||
'580530a17a53664d12a70fb372a88264'
|
||||
'7d0b483fc7fab1405bae16ba2275360a'
|
||||
'a69bba023ee617a2b8f32296d7d46d0f')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
# fix setlocalversion
|
||||
sed -i 's|echo "+"|# echo "+"|g' ./scripts/setlocalversion
|
||||
|
||||
# Add -CHAKRA patches
|
||||
patch -Np1 -i ${srcdir}/${_patchname} || return 1
|
||||
|
||||
if [ "$CARCH" = "x86_64" ]; then
|
||||
cat ../config.x86_64 >./.config
|
||||
else
|
||||
cat ../config >./.config
|
||||
fi
|
||||
|
||||
# hack to prevent output kernel from being marked as dirty or git
|
||||
echo "" > ${srcdir}/linux-${_basekernel}/.scmversion
|
||||
|
||||
# get kernel version
|
||||
make prepare
|
||||
# load configuration
|
||||
# Configure the kernel. Replace the line below with one of your choice.
|
||||
#make menuconfig # CLI menu for configuration
|
||||
#make xconfig # X-based configuration
|
||||
#make oldconfig # using old config from previous kernel version
|
||||
# ... or manually edit .config
|
||||
####################
|
||||
# stop here
|
||||
# this is useful to configure the kernel
|
||||
#msg "Stopping build"
|
||||
#return 1
|
||||
####################
|
||||
yes "" | make config
|
||||
# build!
|
||||
make bzImage modules || return 1
|
||||
}
|
||||
|
||||
package_kernel26-lts() {
|
||||
pkgdesc="The Linux Longterm Support Kernel and modules"
|
||||
backup=(etc/mkinitcpio.d/kernel26-lts.preset)
|
||||
depends=('coreutils' "kernel26-firmware>=${pkgver}" 'module-init-tools' 'mkinitcpio>=0.6.3')
|
||||
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26-lts now
|
||||
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
|
||||
# kernel24 support is dropped since glibc24
|
||||
replaces=('kernel24' 'kernel24-scsi' 'kernel26-lts-scsi'
|
||||
'alsa-driver' 'ieee80211' 'hostap-driver26'
|
||||
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
|
||||
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
|
||||
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500' 'kernel26-lts'
|
||||
'aufs2')
|
||||
provides=('aufs2' "kernel26=${pkgver}")
|
||||
install=kernel26-lts.install
|
||||
optdepends=('crda: to set the correct wireless channels of your country')
|
||||
|
||||
KARCH=x86
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
_kernver="$(make kernelrelease)"
|
||||
mkdir -p ${pkgdir}/{lib/modules,boot}
|
||||
make INSTALL_MOD_PATH=${pkgdir} modules_install || return 1
|
||||
cp System.map ${pkgdir}/boot/System.map26${_kernelname}
|
||||
cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
|
||||
# # add vmlinux
|
||||
install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
|
||||
|
||||
# install fallback mkinitcpio.conf file and preset file for kernel
|
||||
install -m644 -D ${srcdir}/kernel26-lts.preset ${pkgdir}/etc/mkinitcpio.d/kernel26-lts.preset || return 1
|
||||
# set correct depmod command for install
|
||||
sed \
|
||||
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
|
||||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||
-i $startdir/kernel26-lts.install
|
||||
sed \
|
||||
-e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
|
||||
-e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
|
||||
-e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
|
||||
-i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
|
||||
|
||||
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
|
||||
# remove build and source links
|
||||
rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
|
||||
# remove the firmware
|
||||
rm -rf ${pkgdir}/lib/firmware
|
||||
}
|
||||
|
||||
package_kernel26-lts-headers() {
|
||||
pkgdesc="Header files and scripts for building modules for kernel26-lts"
|
||||
provides="kernel26-headers=${pkgver}"
|
||||
cd ${srcdir}/linux-${_basekernel}/
|
||||
make oldconfig && make prepare || return 1
|
||||
mkdir -p ${pkgdir}/lib/modules/${_kernver}
|
||||
cd ${pkgdir}/lib/modules/${_kernver}
|
||||
ln -sf ../../../usr/src/linux-${_kernver} build
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
install -D -m644 Makefile \
|
||||
${pkgdir}/usr/src/linux-${_kernver}/Makefile
|
||||
install -D -m644 kernel/Makefile \
|
||||
${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
|
||||
install -D -m644 .config \
|
||||
${pkgdir}/usr/src/linux-${_kernver}/.config
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
|
||||
|
||||
for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
|
||||
cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
|
||||
done
|
||||
|
||||
# copy arch includes for external modules
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
|
||||
cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
|
||||
|
||||
# copy files necessary for later builds, like nvidia and vmware
|
||||
cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
|
||||
cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
|
||||
# fix permissions on scripts dir
|
||||
chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
|
||||
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
|
||||
|
||||
cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
|
||||
if [ "$CARCH" = "i686" ]; then
|
||||
cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
|
||||
fi
|
||||
cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
|
||||
|
||||
# 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; 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
|
||||
# add docbook makefile
|
||||
install -D -m644 Documentation/DocBook/Makefile \
|
||||
${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile
|
||||
# add dm headers
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
|
||||
cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
|
||||
# add inotify.h
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
|
||||
cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/
|
||||
# add wireless headers
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
|
||||
cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
|
||||
# add dvb headers for external modules
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/9912
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
|
||||
cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
|
||||
# add dvb headers for external modules
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/11194
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
|
||||
cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
|
||||
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/13146
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
# add xfs and shmem for aufs building
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
|
||||
cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
|
||||
# add headers for virtualbox
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/14568
|
||||
cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
|
||||
# add headers for broadcom wl
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/14568
|
||||
cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
|
||||
# copy in Kconfig files
|
||||
for i in `find . -name "Kconfig*"`; do
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
|
||||
cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
|
||||
done
|
||||
|
||||
#cd ${pkgdir}/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm
|
||||
# add header for aufs2-util
|
||||
#mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/asm
|
||||
#cp -a ${srcdir}/linux-$_basekernel/include/asm-generic/bitsperlong.h ${pkgdir}/usr/src/linux-${_kernver}/include/asm/
|
||||
|
||||
chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
|
||||
find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
|
||||
# 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
|
||||
}
|
||||
|
||||
|
||||
package_kernel26-lts-firmware() {
|
||||
pkgdesc="The included firmware files of the Linux Longterm Support Kernel"
|
||||
provides="kernel26-firmware=${pkgver}"
|
||||
conflicts="kernel26-firmware"
|
||||
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
make firmware || return 1
|
||||
make INSTALL_MOD_PATH=${pkgdir} firmware_install || return 1
|
||||
}
|
||||
|
5247
kernel26-lts/config
Normal file
5247
kernel26-lts/config
Normal file
File diff suppressed because it is too large
Load Diff
5011
kernel26-lts/config.x86_64
Normal file
5011
kernel26-lts/config.x86_64
Normal file
File diff suppressed because it is too large
Load Diff
62
kernel26-lts/kernel26-lts.install
Normal file
62
kernel26-lts/kernel26-lts.install
Normal file
@ -0,0 +1,62 @@
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=-lts
|
||||
KERNEL_VERSION=2.6.35-CHAKRA-LTS
|
||||
|
||||
post_install () {
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod $KERNEL_VERSION
|
||||
# generate init ramdisks
|
||||
echo ">>> MKINITCPIO SETUP"
|
||||
echo ">>> ----------------"
|
||||
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://chakra-project.org/wiki/index.php/Mkinitcpio"
|
||||
echo ""
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
/sbin/mkinitcpio -p kernel26${KERNEL_NAME}
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
pacman -Q grub &>/dev/null
|
||||
hasgrub=$?
|
||||
pacman -Q grub2 &>/dev/null
|
||||
hasgrub2=$?
|
||||
pacman -Q lilo &>/dev/null
|
||||
haslilo=$?
|
||||
# reminder notices
|
||||
if [ $haslilo -eq 0 ]; then
|
||||
echo ">>>"
|
||||
if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
|
||||
echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
|
||||
else
|
||||
echo ">>> You appear to be using the LILO bootloader. You should run"
|
||||
echo ">>> 'lilo' before rebooting."
|
||||
fi
|
||||
echo ">>>"
|
||||
fi
|
||||
|
||||
if grep "^[^#]*/boot" /etc/fstab 2>&1 >/dev/null; then
|
||||
if ! grep "/boot" /etc/mtab 2>&1 >/dev/null; then
|
||||
echo "WARNING: /boot appears to be a seperate partition but is not mounted"
|
||||
echo " This is most likely not what you want. Please mount your /boot"
|
||||
echo " partition and reinstall the kernel unless you are sure this is OK"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod $KERNEL_VERSION
|
||||
# generate init ramdisks
|
||||
echo ">>> MKINITCPIO SETUP"
|
||||
echo ">>> ----------------"
|
||||
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://chakra-project.org/wiki/index.php/Mkinitcpio"
|
||||
echo ""
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
/sbin/mkinitcpio -p kernel26${KERNEL_NAME}
|
||||
}
|
17
kernel26-lts/kernel26-lts.preset
Normal file
17
kernel26-lts/kernel26-lts.preset
Normal file
@ -0,0 +1,17 @@
|
||||
# mkinitcpio preset file for kernel26-lts
|
||||
|
||||
########################################
|
||||
# DO NOT EDIT THIS LINE:
|
||||
source /etc/mkinitcpio.d/kernel26-lts.kver
|
||||
########################################
|
||||
ALL_config="/etc/mkinitcpio.conf"
|
||||
|
||||
PRESETS=('default' 'fallback')
|
||||
|
||||
#default_config="/etc/mkinitcpio.conf"
|
||||
default_image="/boot/kernel26-lts.img"
|
||||
#default_options=""
|
||||
|
||||
#fallback_config="/etc/mkinitcpio.conf"
|
||||
fallback_image="/boot/kernel26-lts-fallback.img"
|
||||
fallback_options="-S autodetect"
|
52
linux-2.6-CHAKRA-LTS/PATCHCFG
Normal file
52
linux-2.6-CHAKRA-LTS/PATCHCFG
Normal file
@ -0,0 +1,52 @@
|
||||
# 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-LTS"
|
||||
# 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/longterm/v2.6.35/patch-2.6.35.11.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
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2-base-35.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2-standalone-35.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2-kbuild-35.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2.1-standalone.tree-35-20110221.patch.bz2%1
|
||||
# squashfs with lzma
|
||||
http://chakra-project.org/sources/kernel26/patches/35/squash-lzma/001-squashfs-lzma-add-support-for-lzma-compressed-filesystems.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/squash-lzma/002-squashfs-lzma-make-lzma-available-to-non-initramfs-initrd-code.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/squash-lzma/003-squashfs-lzma-select-decompress-lzma-needed.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/squash-lzma/004-squashfs-lzma-make-lzma-reentrant.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/squash-lzma/005-squashfs-lzma-force-lzma-wrapper-to-be-retained.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/squash-lzma/006-squashfs-lzma-add-missing-slab.h-include-in-lzma-wrapper.patch%1
|
||||
# sched_autogroup
|
||||
http://chakra-project.org/sources/kernel26/patches/35/autogroup/2.6.35-sched-automated-per-tty-task-groups.patch%1
|
||||
|
||||
)
|
||||
# Name of the resulting patch (will be bzipped afterwards)
|
||||
PATCHNAME="patch-2.6.35.11-1-CHAKRA-LTS"
|
||||
|
||||
# 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
|
||||
}
|
21
linux-2.6-CHAKRA-LTS/README
Normal file
21
linux-2.6-CHAKRA-LTS/README
Normal file
@ -0,0 +1,21 @@
|
||||
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
|
31
linux-2.6-CHAKRA-LTS/create-aufs.sh
Executable file
31
linux-2.6-CHAKRA-LTS/create-aufs.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# clone the aufs repository to the local disk
|
||||
git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git aufs2-standalone.git
|
||||
cd aufs2-standalone.git
|
||||
git branch -r
|
||||
git checkout origin/aufs2.1-35
|
||||
|
||||
# modify what you want
|
||||
|
||||
# and after
|
||||
# create the patch with the directories: fs, include and Documentation
|
||||
|
||||
rm -v $(find . -type f -name '*.orig')
|
||||
grep -qse 'EXPORT_SYMBOL(' aufs2-standalone.patch && \
|
||||
sed -i-old -e 's|EXPORT_SYMBOL(|EXPORT_SYMBOL_GPL(|' aufs2-standalone.patch
|
||||
rm -rf /tmp/linux-2.6
|
||||
mkdir /tmp/linux-2.6
|
||||
cp -a fs /tmp/linux-2.6
|
||||
cp -a include /tmp/linux-2.6
|
||||
cp -a Documentation /tmp/linux-2.6
|
||||
echo "test"
|
||||
rm /tmp/linux-2.6/include/linux/Kbuild
|
||||
cd /tmp
|
||||
diff -Naur null linux-2.6 | filterdiff | \
|
||||
sed -e 's|null\(/include/linux/Kbuild\)|linux-2.6-old\1|;s|^--- null.*|--- /dev/null|;\|linux-2.6/include/linux/Kbuild|,${\|@@ -0,0 +1 @@|,$d}' \
|
||||
| bzip2 > aufs$(sed -ne 's|#define.*AUFS_VERSION.*"\(.*\)"|\1|p' linux-2.6/include/linux/aufs_type.h).patch.bz2
|
||||
cd $OLDPWD
|
||||
|
||||
# the patch is created in /tmp
|
||||
# the other patches needed to compile are in the base directory
|
61
linux-2.6-CHAKRA-LTS/gen_kernel_patch
Executable file
61
linux-2.6-CHAKRA-LTS/gen_kernel_patch
Executable file
@ -0,0 +1,61 @@
|
||||
#!/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-${_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
|
||||
|
||||
rm -v $(find . -type f -name '*.orig')
|
||||
|
||||
cd ${startdir}/src
|
||||
diff -Nur ${SRCORIG} ${SRCNAME} > $startdir/${PATCHNAME}
|
||||
bzip2 --best $startdir/${PATCHNAME}
|
||||
|
1
linux-2.6-CHAKRA-LTS/patches/.keep
Normal file
1
linux-2.6-CHAKRA-LTS/patches/.keep
Normal file
@ -0,0 +1 @@
|
||||
|
46
ndiswrapper-lts/PKGBUILD
Normal file
46
ndiswrapper-lts/PKGBUILD
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
# use ../fakeuname -r 2.6.35-CHAKRA-LTS ../makepkg
|
||||
_kernver=`uname -r`
|
||||
|
||||
pkgname=ndiswrapper-lts
|
||||
pkgver=1.56
|
||||
pkgrel=1
|
||||
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For kernel26-testing."
|
||||
license=('GPL')
|
||||
arch=(i686 x86_64)
|
||||
url="http://ndiswrapper.sourceforge.net"
|
||||
install="ndiswrapper.install"
|
||||
depends=("ndiswrapper-utils=$pkgver" 'kernel26-lts>=2.6.35' 'kernel26-lts<2.6.36')
|
||||
makedepends=('kernel26-lts-headers>=2.6.35' 'kernel26-lts-headers<2.6.36')
|
||||
source=(http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz kernel-2.6.35.patch ndiswrapper-ioctl.patch)
|
||||
md5sums=('1431f7ed5f8e92e752d330bbb3aed333'
|
||||
'0a03d613b1fd545a75c5dd1a7c2aaec4'
|
||||
'a71bd3add8802e1b2fdff55bf6d0577e')
|
||||
groups=("kernel26-modules")
|
||||
|
||||
build()
|
||||
{
|
||||
cd $srcdir/ndiswrapper-$pkgver/driver
|
||||
patch -Np2 -i $startdir/kernel-2.6.35.patch
|
||||
cd $srcdir/ndiswrapper-$pkgver/
|
||||
patch -Np0 -i $startdir/ndiswrapper-ioctl.patch
|
||||
cd $srcdir/ndiswrapper-$pkgver/driver
|
||||
make KVERS=$_kernver || return 1
|
||||
make DESTDIR=$pkgdir KVERS=$_kernver install || return 1
|
||||
rm $pkgdir/lib/modules/$_kernver/modules.* #wtf?
|
||||
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
|
||||
# move it to correct kernel directory
|
||||
mkdir -p $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper
|
||||
mv $pkgdir/lib/modules/$_kernver/misc/* $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper/
|
||||
rm -r $pkgdir/lib/modules/$_kernver/misc/
|
||||
}
|
||||
|
98
ndiswrapper-lts/kernel-2.6.35.patch
Normal file
98
ndiswrapper-lts/kernel-2.6.35.patch
Normal file
@ -0,0 +1,98 @@
|
||||
diff -uNr ndiswrapper-1.56.old/driver/usb.c ndiswrapper-1.56/driver/usb.c
|
||||
--- ndiswrapper-1.56.old/driver/usb.c 2010-02-10 18:09:32.000000000 -0800
|
||||
+++ ndiswrapper-1.56/driver/usb.c 2010-07-25 02:29:25.442145846 -0700
|
||||
@@ -191,9 +191,15 @@
|
||||
if (wrap_urb->flags & WRAP_URB_COPY_BUFFER) {
|
||||
USBTRACE("freeing DMA buffer for URB: %p %p",
|
||||
urb, urb->transfer_buffer);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||
usb_buffer_free(IRP_WRAP_DEVICE(irp)->usb.udev,
|
||||
+ urb->transfer_buffer_length,
|
||||
+ urb->transfer_buffer, urb->transfer_dma);
|
||||
+#else
|
||||
+ usb_free_coherent(IRP_WRAP_DEVICE(irp)->usb.udev,
|
||||
urb->transfer_buffer_length,
|
||||
urb->transfer_buffer, urb->transfer_dma);
|
||||
+#endif
|
||||
}
|
||||
if (urb->setup_packet)
|
||||
kfree(urb->setup_packet);
|
||||
@@ -303,9 +309,16 @@
|
||||
|| PageHighMem(virt_to_page(buf))
|
||||
#endif
|
||||
)) {
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||
urb->transfer_buffer =
|
||||
- usb_buffer_alloc(wd->usb.udev, buf_len, alloc_flags,
|
||||
+ usb_buffer_alloc(wd->usb.udev, buf_len, alloc_flags,
|
||||
+ &urb->transfer_dma);
|
||||
+#else
|
||||
+ urb->transfer_buffer =
|
||||
+ usb_alloc_coherent(wd->usb.udev, buf_len, alloc_flags,
|
||||
&urb->transfer_dma);
|
||||
+#endif
|
||||
if (!urb->transfer_buffer) {
|
||||
WARNING("couldn't allocate dma buf");
|
||||
IoAcquireCancelSpinLock(&irp->cancel_irql);
|
||||
diff -uNr ndiswrapper-1.56.old/driver/wrapndis.c ndiswrapper-1.56/driver/wrapndis.c
|
||||
--- ndiswrapper-1.56.old/driver/wrapndis.c 2010-02-10 18:09:32.000000000 -0800
|
||||
+++ ndiswrapper-1.56/driver/wrapndis.c 2010-07-25 02:06:13.184631757 -0700
|
||||
@@ -936,6 +936,10 @@
|
||||
EXIT2(return);
|
||||
}
|
||||
|
||||
+#ifndef netdev_mc_count
|
||||
+#define netdev_mc_count(net_dev) net_dev->mc_count
|
||||
+#endif
|
||||
+
|
||||
static void set_multicast_list(struct ndis_device *wnd)
|
||||
{
|
||||
struct net_device *net_dev;
|
||||
@@ -950,20 +954,26 @@
|
||||
packet_filter |= NDIS_PACKET_TYPE_PROMISCUOUS |
|
||||
NDIS_PACKET_TYPE_ALL_LOCAL;
|
||||
} else if (net_dev->flags & IFF_ALLMULTI ||
|
||||
- net_dev->mc_count > wnd->multicast_size) {
|
||||
+ netdev_mc_count(net_dev) > wnd->multicast_size) {
|
||||
packet_filter |= NDIS_PACKET_TYPE_ALL_MULTICAST;
|
||||
TRACE2("0x%08x", packet_filter);
|
||||
- } else if (net_dev->mc_count > 0) {
|
||||
+ } else if (netdev_mc_count(net_dev) > 0) {
|
||||
int i, size;
|
||||
char *buf;
|
||||
+#ifndef netdev_for_each_mc_addr
|
||||
struct dev_mc_list *mclist;
|
||||
- size = min(wnd->multicast_size, net_dev->mc_count);
|
||||
- TRACE2("%d, %d", wnd->multicast_size, net_dev->mc_count);
|
||||
+#else
|
||||
+ struct netdev_hw_addr *mclist;
|
||||
+#endif
|
||||
+
|
||||
+ size = min(wnd->multicast_size, netdev_mc_count(net_dev));
|
||||
+ TRACE2("%d, %d", wnd->multicast_size, netdev_mc_count(net_dev));
|
||||
buf = kmalloc(size * ETH_ALEN, GFP_KERNEL);
|
||||
if (!buf) {
|
||||
WARNING("couldn't allocate memory");
|
||||
EXIT2(return);
|
||||
}
|
||||
+#ifndef netdev_for_each_mc_addr
|
||||
mclist = net_dev->mc_list;
|
||||
for (i = 0; i < size && mclist; mclist = mclist->next) {
|
||||
if (mclist->dmi_addrlen != ETH_ALEN)
|
||||
@@ -972,6 +982,15 @@
|
||||
TRACE2(MACSTRSEP, MAC2STR(mclist->dmi_addr));
|
||||
i++;
|
||||
}
|
||||
+#else
|
||||
+ i = 0;
|
||||
+ netdev_for_each_mc_addr(mclist, net_dev){
|
||||
+ memcpy(buf + i++ * ETH_ALEN,
|
||||
+ mclist->addr, ETH_ALEN);
|
||||
+ TRACE2(MACSTRSEP, MAC2STR(mclist->addr));
|
||||
+
|
||||
+ }
|
||||
+#endif
|
||||
res = mp_set(wnd, OID_802_3_MULTICAST_LIST, buf, i * ETH_ALEN);
|
||||
if (res == NDIS_STATUS_SUCCESS && i > 0)
|
||||
packet_filter |= NDIS_PACKET_TYPE_MULTICAST;
|
72
ndiswrapper-lts/ndiswrapper-ioctl.patch
Normal file
72
ndiswrapper-lts/ndiswrapper-ioctl.patch
Normal file
@ -0,0 +1,72 @@
|
||||
Index: utils/Makefile
|
||||
===================================================================
|
||||
--- utils/Makefile.orig 2010-02-11 03:09:32.000000000 +0100
|
||||
+++ utils/Makefile 2010-09-09 12:53:57.348385587 +0200
|
||||
@@ -5,7 +5,7 @@ usrsbindir = $(DESTDIR)/usr/sbin
|
||||
DRIVER_DIR ?= ../driver
|
||||
|
||||
CC = gcc
|
||||
-CFLAGS = -g -Wall -I$(DRIVER_DIR)
|
||||
+CFLAGS += -I$(DRIVER_DIR)
|
||||
|
||||
DISTFILES=Makefile ndiswrapper loadndisdriver.c ndiswrapper-buginfo
|
||||
|
||||
Index: utils/loadndisdriver.c
|
||||
===================================================================
|
||||
--- utils/loadndisdriver.c.orig 2010-02-11 03:09:32.000000000 +0100
|
||||
+++ utils/loadndisdriver.c 2010-09-09 12:53:57.348385587 +0200
|
||||
@@ -505,7 +505,7 @@ static int get_ioctl_device()
|
||||
|
||||
int main(int argc, char *argv[0])
|
||||
{
|
||||
- int i, ioctl_device, res;
|
||||
+ int i, ioctl_device=-1, res;
|
||||
char *cmd;
|
||||
|
||||
openlog(PROG_NAME, LOG_PERROR | LOG_CONS, LOG_KERN | LOG_DEBUG);
|
||||
Index: driver/loader.c
|
||||
===================================================================
|
||||
--- driver/loader.c.orig 2010-02-11 03:09:32.000000000 +0100
|
||||
+++ driver/loader.c 2010-09-09 13:15:48.148260473 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/kmod.h>
|
||||
#include <linux/miscdevice.h>
|
||||
+#include <linux/smp_lock.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/*
|
||||
@@ -750,7 +751,7 @@ struct wrap_device *get_wrap_device(void
|
||||
}
|
||||
|
||||
/* called with loader_mutex is down */
|
||||
-static int wrapper_ioctl(struct inode *inode, struct file *file,
|
||||
+static long wrapper_ioctl(struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct load_driver *load_driver;
|
||||
@@ -759,6 +760,7 @@ static int wrapper_ioctl(struct inode *i
|
||||
int ret;
|
||||
void __user *addr = (void __user *)arg;
|
||||
|
||||
+ lock_kernel();
|
||||
ENTER1("cmd: %u", cmd);
|
||||
|
||||
ret = 0;
|
||||
@@ -820,6 +822,7 @@ static int wrapper_ioctl(struct inode *i
|
||||
break;
|
||||
}
|
||||
complete(&loader_complete);
|
||||
+ unlock_kernel();
|
||||
EXIT1(return ret);
|
||||
}
|
||||
|
||||
@@ -831,7 +834,7 @@ static int wrapper_ioctl_release(struct
|
||||
|
||||
static struct file_operations wrapper_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
- .ioctl = wrapper_ioctl,
|
||||
+ .unlocked_ioctl = wrapper_ioctl,
|
||||
.release = wrapper_ioctl_release,
|
||||
};
|
||||
|
23
ndiswrapper-lts/ndiswrapper.install
Normal file
23
ndiswrapper-lts/ndiswrapper.install
Normal file
@ -0,0 +1,23 @@
|
||||
# arg 1: the new package version
|
||||
post_install()
|
||||
{
|
||||
ndiswrapper -m
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
post_upgrade()
|
||||
{
|
||||
ndiswrapper -m
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# arg 1: the old package version
|
||||
post_remove()
|
||||
{
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
42
tiacx-lts/PKGBUILD
Normal file
42
tiacx-lts/PKGBUILD
Normal file
@ -0,0 +1,42 @@
|
||||
#
|
||||
# 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=tiacx-lts
|
||||
pkgver=20080210
|
||||
pkgrel=1
|
||||
pkgdesc="OpenSource module for Texas Instruments ACX100/ACX111 wireless chips. For stock arch 2.6 kernel"
|
||||
arch=(i686 x86_64)
|
||||
url="http://acx100.sourceforge.net/"
|
||||
license=('MPL')
|
||||
depends=('wireless_tools' 'kernel26-lts>=2.6.35' 'kernel26-lts<2.6.36' 'tiacx-firmware')
|
||||
makedepends=('kernel26-lts-headers>=2.6.35' 'kernel26-lts-headers<2.6.36')
|
||||
groups=("kernel26-lts-modules")
|
||||
install=acx.install
|
||||
source=(http://downloads.sourceforge.net/sourceforge/acx100/acx-$pkgver.tar.bz2
|
||||
kernel-2.6.27.patch
|
||||
kernel-2.6.30.patch
|
||||
kernel-2.6.31.patch
|
||||
kernel-2.6.33.patch)
|
||||
_kernver=2.6.35-CHAKRA-LTS
|
||||
|
||||
build() {
|
||||
cd $startdir/src/acx-$pkgver
|
||||
patch -Np1 -i ../kernel-2.6.27.patch || return 1
|
||||
patch -Np0 -i ../kernel-2.6.30.patch || return 1
|
||||
patch -Np1 -i ../kernel-2.6.31.patch || return 1
|
||||
patch -Np0 -i ../kernel-2.6.33.patch || return 1
|
||||
make -C /lib/modules/${_kernver}/build M=`pwd` || return 1
|
||||
install -D acx.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/net/wireless/tiacx/acx.ko
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
|
||||
}
|
||||
md5sums=('7d5ce3215708e4e9f95cf567a9ee3a12'
|
||||
'9895f72f8d0c84956b0f6c3b16df0fe8'
|
||||
'e2900aee839ce711a7f7606b3e3de36e'
|
||||
'dbcb276d77df7801cef58a85c18dfe94'
|
||||
'9cd35ea33b8abdd2e4efec485b05477e')
|
19
tiacx-lts/acx.install
Normal file
19
tiacx-lts/acx.install
Normal file
@ -0,0 +1,19 @@
|
||||
# arg 1: the new package version
|
||||
post_install() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
post_upgrade() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
|
||||
}
|
||||
|
||||
# arg 1: the old package version
|
||||
post_remove() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
82
tiacx-lts/kernel-2.6.27.patch
Normal file
82
tiacx-lts/kernel-2.6.27.patch
Normal file
@ -0,0 +1,82 @@
|
||||
diff -Nur acx-20080210.orig/ioctl.c acx-20080210/ioctl.c
|
||||
--- acx-20080210.orig/ioctl.c 2008-02-10 21:06:42.000000000 +0100
|
||||
+++ acx-20080210/ioctl.c 2008-10-10 17:07:32.000000000 +0200
|
||||
@@ -489,6 +489,7 @@
|
||||
static char*
|
||||
acx_s_scan_add_station(
|
||||
acx_device_t *adev,
|
||||
+ struct iw_request_info *info,
|
||||
char *ptr,
|
||||
char *end_buf,
|
||||
struct client *bss)
|
||||
@@ -503,14 +504,14 @@
|
||||
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
|
||||
MAC_COPY(iwe.u.ap_addr.sa_data, bss->bssid);
|
||||
acxlog_mac(L_IOCTL, "scan, station address: ", bss->bssid, "\n");
|
||||
- ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
|
||||
+ ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
|
||||
|
||||
/* Add ESSID */
|
||||
iwe.cmd = SIOCGIWESSID;
|
||||
iwe.u.data.length = bss->essid_len;
|
||||
iwe.u.data.flags = 1;
|
||||
log(L_IOCTL, "scan, essid: %s\n", bss->essid);
|
||||
- ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
|
||||
+ ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid);
|
||||
|
||||
/* Add mode */
|
||||
iwe.cmd = SIOCGIWMODE;
|
||||
@@ -520,7 +521,7 @@
|
||||
else
|
||||
iwe.u.mode = IW_MODE_ADHOC;
|
||||
log(L_IOCTL, "scan, mode: %d\n", iwe.u.mode);
|
||||
- ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_UINT_LEN);
|
||||
+ ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_UINT_LEN);
|
||||
}
|
||||
|
||||
/* Add frequency */
|
||||
@@ -528,7 +529,7 @@
|
||||
iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000;
|
||||
iwe.u.freq.e = 1;
|
||||
log(L_IOCTL, "scan, frequency: %d\n", iwe.u.freq.m);
|
||||
- ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
|
||||
+ ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
|
||||
|
||||
/* Add link quality */
|
||||
iwe.cmd = IWEVQUAL;
|
||||
@@ -546,7 +547,7 @@
|
||||
iwe.u.qual.updated = 7;
|
||||
log(L_IOCTL, "scan, link quality: %d/%d/%d\n",
|
||||
iwe.u.qual.level, iwe.u.qual.noise, iwe.u.qual.qual);
|
||||
- ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
|
||||
+ ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
|
||||
|
||||
/* Add encryption */
|
||||
iwe.cmd = SIOCGIWENCODE;
|
||||
@@ -556,7 +557,7 @@
|
||||
iwe.u.data.flags = IW_ENCODE_DISABLED;
|
||||
iwe.u.data.length = 0;
|
||||
log(L_IOCTL, "scan, encryption flags: %X\n", iwe.u.data.flags);
|
||||
- ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
|
||||
+ ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid);
|
||||
|
||||
/* add rates */
|
||||
iwe.cmd = SIOCGIWRATE;
|
||||
@@ -570,7 +571,7 @@
|
||||
if (rate & 1) {
|
||||
iwe.u.bitrate.value = *p * 500000; /* units of 500kb/s */
|
||||
log(L_IOCTL, "scan, rate: %d\n", iwe.u.bitrate.value);
|
||||
- ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf,
|
||||
+ ptr_rate = iwe_stream_add_value(info, ptr, ptr_rate, end_buf,
|
||||
&iwe, IW_EV_PARAM_LEN);
|
||||
}
|
||||
rate >>= 1;
|
||||
@@ -625,7 +626,7 @@
|
||||
for (i = 0; i < ARRAY_SIZE(adev->sta_list); i++) {
|
||||
struct client *bss = &adev->sta_list[i];
|
||||
if (!bss->used) continue;
|
||||
- ptr = acx_s_scan_add_station(adev, ptr,
|
||||
+ ptr = acx_s_scan_add_station(adev, info, ptr,
|
||||
extra + IW_SCAN_MAX_DATA, bss);
|
||||
}
|
||||
dwrq->length = ptr - extra;
|
16
tiacx-lts/kernel-2.6.30.patch
Normal file
16
tiacx-lts/kernel-2.6.30.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- wlan_compat.h~ 2009-06-12 09:17:30.000000000 +0200
|
||||
+++ wlan_compat.h 2009-06-12 09:17:30.000000000 +0200
|
||||
@@ -217,13 +217,6 @@
|
||||
/*=============================================================*/
|
||||
#define WLAN_PACKED __attribute__ ((packed))
|
||||
|
||||
-/* Interrupt handler backwards compatibility stuff */
|
||||
-#ifndef IRQ_NONE
|
||||
-#define IRQ_NONE
|
||||
-#define IRQ_HANDLED
|
||||
-typedef void irqreturn_t;
|
||||
-#endif
|
||||
-
|
||||
#ifndef ARPHRD_IEEE80211_PRISM
|
||||
#define ARPHRD_IEEE80211_PRISM 802
|
||||
#endif
|
88
tiacx-lts/kernel-2.6.31.patch
Normal file
88
tiacx-lts/kernel-2.6.31.patch
Normal file
@ -0,0 +1,88 @@
|
||||
--- acx-20080210/pci.c 2008-02-10 21:06:42.000000000 +0100
|
||||
+++ acx-20080210/pci.c 2009-09-11 22:27:28.000000000 +0200
|
||||
@@ -1437,6 +1437,19 @@
|
||||
|
||||
static void dummy_netdev_init(struct net_device *ndev) {}
|
||||
|
||||
+static const struct net_device_ops acx_netdev_ops = {
|
||||
+ .ndo_open = &acxpci_e_open,
|
||||
+ .ndo_stop = &acxpci_e_close,
|
||||
+ .ndo_start_xmit = &acx_i_start_xmit,
|
||||
+ .ndo_get_stats = &acx_e_get_stats,
|
||||
+#if IW_HANDLER_VERSION <= 5
|
||||
+ .ndo_get_wireless_stats = &acx_e_get_wireless_stats,
|
||||
+#endif
|
||||
+ .ndo_set_multicast_list = &acxpci_i_set_multicast_list,
|
||||
+ .ndo_tx_timeout = &acxpci_i_tx_timeout,
|
||||
+ .ndo_change_mtu = &acx_e_change_mtu,
|
||||
+};
|
||||
+
|
||||
#ifdef CONFIG_PCI
|
||||
static int __devinit acxpci_e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
{
|
||||
@@ -1547,17 +1560,8 @@
|
||||
}
|
||||
|
||||
ether_setup(ndev);
|
||||
- ndev->open = &acxpci_e_open;
|
||||
- ndev->stop = &acxpci_e_close;
|
||||
- ndev->hard_start_xmit = &acx_i_start_xmit;
|
||||
- ndev->get_stats = &acx_e_get_stats;
|
||||
-#if IW_HANDLER_VERSION <= 5
|
||||
- ndev->get_wireless_stats = &acx_e_get_wireless_stats;
|
||||
-#endif
|
||||
- ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
|
||||
- ndev->set_multicast_list = &acxpci_i_set_multicast_list;
|
||||
- ndev->tx_timeout = &acxpci_i_tx_timeout;
|
||||
- ndev->change_mtu = &acx_e_change_mtu;
|
||||
+ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
|
||||
+ ndev->netdev_ops = &acx_netdev_ops;
|
||||
ndev->watchdog_timeo = 4 * HZ;
|
||||
ndev->irq = pdev->irq;
|
||||
ndev->base_addr = pci_resource_start(pdev, 0);
|
||||
--- acx-20080210/usb.c 2008-02-10 21:06:42.000000000 +0100
|
||||
+++ acx-20080210/usb.c 2009-09-11 22:38:42.000000000 +0200
|
||||
@@ -778,6 +778,21 @@
|
||||
static void
|
||||
dummy_netdev_init(struct net_device *ndev) {}
|
||||
|
||||
+static const struct net_device_ops acxusb_netdev_ops = {
|
||||
+ .ndo_open = &acxusb_e_open,
|
||||
+ .ndo_stop = &acxusb_e_close,
|
||||
+ .ndo_start_xmit = (void *)&acx_i_start_xmit,
|
||||
+ .ndo_get_stats = (void *)&acx_e_get_stats,
|
||||
+#if IW_HANDLER_VERSION <= 5
|
||||
+ .ndo_get_wireless_stats = (void *)&acx_e_get_wireless_stats,
|
||||
+#endif
|
||||
+ .ndo_set_multicast_list = (void *)&acxusb_i_set_rx_mode,
|
||||
+#ifdef HAVE_TX_TIMEOUT
|
||||
+ .ndo_tx_timeout = &acxusb_i_tx_timeout,
|
||||
+#endif
|
||||
+ .ndo_change_mtu = &acx_e_change_mtu,
|
||||
+};
|
||||
+
|
||||
static int
|
||||
acxusb_e_probe(struct usb_interface *intf, const struct usb_device_id *devID)
|
||||
{
|
||||
@@ -845,20 +860,11 @@
|
||||
/* Register the callbacks for the network device functions */
|
||||
|
||||
ether_setup(ndev);
|
||||
- ndev->open = &acxusb_e_open;
|
||||
- ndev->stop = &acxusb_e_close;
|
||||
- ndev->hard_start_xmit = (void *)&acx_i_start_xmit;
|
||||
- ndev->get_stats = (void *)&acx_e_get_stats;
|
||||
-#if IW_HANDLER_VERSION <= 5
|
||||
- ndev->get_wireless_stats = (void *)&acx_e_get_wireless_stats;
|
||||
-#endif
|
||||
ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
|
||||
- ndev->set_multicast_list = (void *)&acxusb_i_set_rx_mode;
|
||||
+ ndev->netdev_ops = &acxusb_netdev_ops;
|
||||
#ifdef HAVE_TX_TIMEOUT
|
||||
- ndev->tx_timeout = &acxusb_i_tx_timeout;
|
||||
ndev->watchdog_timeo = 4 * HZ;
|
||||
#endif
|
||||
- ndev->change_mtu = &acx_e_change_mtu;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) && defined(SET_MODULE_OWNER)
|
||||
SET_MODULE_OWNER(ndev);
|
||||
#endif
|
11
tiacx-lts/kernel-2.6.33.patch
Normal file
11
tiacx-lts/kernel-2.6.33.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- pci.c~ 2010-02-27 19:30:54.000000000 +0100
|
||||
+++ pci.c 2010-02-27 19:30:54.000000000 +0100
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/* Linux 2.6.18+ uses <linux/utsrelease.h> */
|
||||
#ifndef UTS_RELEASE
|
||||
-#include <linux/utsrelease.h>
|
||||
+#include <generated/utsrelease.h>
|
||||
#endif
|
||||
|
||||
#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */
|
39
vhba-module-lts/PKGBUILD
Normal file
39
vhba-module-lts/PKGBUILD
Normal file
@ -0,0 +1,39 @@
|
||||
#
|
||||
# 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=vhba-module-lts
|
||||
pkgver=1.2.1
|
||||
_kernver='2.6.35-CHAKRA-LTS'
|
||||
pkgrel=1
|
||||
pkgdesc="Kernel26 module that emulates SCSI devices"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://cdemu.sourceforge.net/"
|
||||
license=('GPL2')
|
||||
depends=('kernel26-lts>=2.6.35' 'kernel26-lts<2.6.36')
|
||||
makedepends=('kernel26-lts-headers>=2.6.35')
|
||||
install=vhba-module.install
|
||||
source=(http://downloads.sourceforge.net/cdemu/vhba-module-$pkgver.tar.bz2 vhba-kernel26-2.6.34.patch vhba-kernel26-2.6.36.patch)
|
||||
md5sums=('a3b6ad798f2b72ef599df797ef79e5ec' 'de68d2e744885faade0b03baff52f4a8' '5960ac48a487ff5a4d767ed1f5eaf904')
|
||||
groups=("kernel26-lts-modules")
|
||||
|
||||
build() {
|
||||
cd "$srcdir/vhba-module-$pkgver"
|
||||
#workaround to fix compilation against 2.6.33
|
||||
#http://bugs.gentoo.org/233910
|
||||
for i in kat/*.c; do
|
||||
sed -i "s:<linux/autoconf.h>:<generated/autoconf.h>:" $i
|
||||
done
|
||||
|
||||
patch -Np0 -i ${srcdir}/vhba-kernel26-2.6.34.patch || return 1
|
||||
patch -Np0 -i ${srcdir}/vhba-kernel26-2.6.36.patch || return 1
|
||||
|
||||
make -j1 KDIR=/usr/src/linux-${_kernver} || return 1
|
||||
install -D vhba.ko "$pkgdir/lib/modules/${_kernver}/extra/vhba.ko" || return 1
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" "$startdir/vhba-module.install"
|
||||
}
|
12
vhba-module-lts/vhba-kernel26-2.6.34.patch
Normal file
12
vhba-module-lts/vhba-kernel26-2.6.34.patch
Normal file
@ -0,0 +1,12 @@
|
||||
*** vhba.c~ 2010-05-23 02:17:53.000000000 +0200
|
||||
--- vhba.c 2010-05-23 02:17:53.000000000 +0200
|
||||
***************
|
||||
*** 26,31 ****
|
||||
--- 26,32 ----
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/poll.h>
|
||||
+ #include <linux/slab.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <scsi/scsi.h>
|
||||
#include <scsi/scsi_host.h>
|
20
vhba-module-lts/vhba-kernel26-2.6.36.patch
Normal file
20
vhba-module-lts/vhba-kernel26-2.6.36.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- vhba.c.orig 2010-10-22 23:16:21.896084497 +0200
|
||||
+++ vhba.c 2010-10-22 23:17:38.150243713 +0200
|
||||
@@ -672,7 +672,7 @@ static ssize_t vhba_ctl_write(struct fil
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int vhba_ctl_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
|
||||
+static long vhba_ctl_unlocked_ioctl (struct file *file, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct vhba_device *vdev = file->private_data;
|
||||
struct vhba_host *vhost;
|
||||
@@ -782,7 +782,7 @@ static struct file_operations vhba_ctl_f
|
||||
.read = vhba_ctl_read,
|
||||
.write = vhba_ctl_write,
|
||||
.poll = vhba_ctl_poll,
|
||||
- .ioctl = vhba_ctl_ioctl,
|
||||
+ .unlocked_ioctl = vhba_ctl_unlocked_ioctl,
|
||||
};
|
||||
|
||||
static struct miscdevice vhba_miscdev = {
|
16
vhba-module-lts/vhba-module.install
Normal file
16
vhba-module-lts/vhba-module.install
Normal file
@ -0,0 +1,16 @@
|
||||
post_install() {
|
||||
echo ">> Place 'vhba' in MODULES= in /etc/rc.conf to enable vhba on system boot."
|
||||
echo ">> This module needs to be recompiled for every kernel version upgrade."
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user