diff options
-rw-r--r-- | kernel/3.5-do_mmap.patch | 50 | ||||
-rw-r--r-- | kernel/Pkgfile | 57 | ||||
-rw-r--r-- | kernel/amd-3.5.0-missing_do_mmap.patch | 44 | ||||
-rw-r--r-- | kernel/ati-kernel-3.2.8.patch | 21 | ||||
-rw-r--r-- | kernel/compat_alloc-Makefile.patch | 10 | ||||
-rw-r--r-- | kernel/config | 2 | ||||
-rw-r--r-- | kernel/config_64 | 2 | ||||
-rw-r--r-- | kernel/fglrx_kernel_3.4.0.patch (renamed from kernel/ati-kernel-3.4.patch) | 17 | ||||
-rw-r--r-- | kernel/makefile_compat.patch | 10 | ||||
-rw-r--r-- | kernel/pre-install | 2 |
10 files changed, 146 insertions, 69 deletions
diff --git a/kernel/3.5-do_mmap.patch b/kernel/3.5-do_mmap.patch new file mode 100644 index 000000000..e60985745 --- /dev/null +++ b/kernel/3.5-do_mmap.patch @@ -0,0 +1,50 @@ +--- common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-15 18:30:13.483762070 +0200 ++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-17 17:47:36.543041869 +0200 +@@ -2106,6 +2106,12 @@ + } + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) ++# define NO_DO_MMAP ++# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f) ++# define do_munmap(a,b,c) vm_munmap(b, c) ++#endif ++ + unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval( + KCL_IO_FILE_Handle file, + unsigned long addr, +@@ -2117,10 +2123,13 @@ + + flags = MAP_SHARED; + prot = PROT_READ|PROT_WRITE; +- ++#ifdef NO_DO_MMAP ++ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff); ++#else + down_write(¤t->mm->mmap_sem); + vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff); + up_write(¤t->mm->mmap_sem); ++#endif + if (IS_ERR(vaddr)) + return 0; + else +@@ -2131,7 +2140,9 @@ + { + int retcode = 0; + ++#ifndef NO_DO_MMAP + down_write(¤t->mm->mmap_sem); ++#endif + #ifdef FGL_LINUX_RHEL_MUNMAP_API + retcode = do_munmap(current->mm, + addr, +@@ -2142,7 +2153,9 @@ + addr, + len); + #endif ++#ifndef NO_DO_MMAP + up_write(¤t->mm->mmap_sem); ++#endif + return retcode; + } + diff --git a/kernel/Pkgfile b/kernel/Pkgfile index d79340146..1145a214b 100644 --- a/kernel/Pkgfile +++ b/kernel/Pkgfile @@ -2,20 +2,21 @@ # URL: http://www.kernel.org # Maintainer: git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary # Packager: thierryn1 at hispeed dot ch, tyrry33 at gmail dot com -# Depends on: git, prt-get +# Depends on: git, prt-get, linux-firmware +# Run on: linux-firmware name=kernel -version=3.5.0 +version=3.5.1 _BaseVersion=$(expr $version : '\([0-9]\.[0-9]\)') -release=1 +release=2 PKGMK_NO_STRIP="yes" PKGMK_IGNORE_FOOTPRINT="yes" PKGMK_IGNORE_MD5SUM="yes" SCRIPT_VERSION="pakxe.4" INITRDBASE="nutyx-initrd" _extra=08072012 -_tools=22072012 -NVIDIA_VERSION=304.32 +_tools=05082012 +NVIDIA_VERSION=304.37 VB_VERSION=4.1.18 VB_BUILD=78361 ATI_VERSION=12.6 @@ -35,12 +36,12 @@ source=(http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${BC_ARCH}-v5_100_ http://kiao.no-ip.info/NuTyX/install-${SCRIPT_VERSION}.ash http://nutyx.meticul.eu/files/nutyx-initrd-`uname -m`-${_extra}.tar.bz2 http://nutyx.meticul.eu/files/installtools-${_tools}.tar.bz2 - makefile_compat.patch + 0005-add-support-for-linux-3.4.0.patch bc_wl_abiupdate.patch - ati-kernel-3.2.8.patch - ati-kernel-3.4.patch broadcom-wl-kernel3-01.patch - 0005-add-support-for-linux-3.4.0.patch + compat_alloc-Makefile.patch + fglrx_kernel_3.4.0.patch + 3.5-do_mmap.patch config_64 config) @@ -53,13 +54,7 @@ build(){ sed -i "s/^SCRIPT_VERSION=.\{1,\}/SCRIPT_VERSION=\"$SCRIPT_VERSION\"/" `prt-get printf %p --filter=$name`/$name/post-install # firmware -#git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git -#rm -r linux-firmware/.git - -#cp -a linux-firmware $INITRDBASE/rootfs/lib/firmware - -#mkdir -p $PKG/lib -#cp -a linux-firmware $PKG/lib/firmware +cp -a /lib/firmware $INITRDBASE/rootfs/lib/firmware # initrd cd $SRC @@ -81,18 +76,20 @@ done # kernel sources if ! [ -d /usr/src/linux-${_BaseVersion} ]; then mv linux-${_BaseVersion} /usr/src/ - ln -s /usr/src/linux-${_BaseVersion} linux-${_BaseVersion} - cd linux-${_BaseVersion} - if [ -f $SRC/patch-$version.xz ]; then - xzcat $SRC/patch-$version.xz | patch -Np1 - fi - cd .. else - rm -r linux-${_BaseVersion} + rm -rf linux-${_BaseVersion} fi ln -s /usr/src/linux-${_BaseVersion} linux-${_BaseVersion} + cd linux-${_BaseVersion} +configVersion=`grep "Kernel Configuration" $SRC/config|cut -d " " -f3` + +if [ "$configVersion" != "$version" ]; then + if [ -f $SRC/patch-$version.xz ]; then + xzcat $SRC/patch-$version.xz | patch -Np1 + fi +fi # make mrproper case `uname -m` in @@ -120,8 +117,8 @@ case `uname -m` in esac # Module broadcom cd $SRC -patch -Np1 -i broadcom-wl-kernel3-01.patch -patch -Np2 -i 0005-add-support-for-linux-3.4.0.patch +patch -p1 < broadcom-wl-kernel3-01.patch +patch -p2 < 0005-add-support-for-linux-3.4.0.patch patch -p0 src/wl/sys/wl_linux.c < bc_wl_abiupdate.patch KBUILD_NOPEDANTIC=1 make -C $SRC/linux-${_BaseVersion} M=`pwd` install -m 0644 -D wl.ko $PKG/lib/modules/${version}/kernel/drivers/zzzz/wl.ko @@ -138,9 +135,11 @@ install -m 0644 -D nvidia.ko $PKG/lib/modules/${version}/kernel/drivers/zzzz/nvi cd $SRC sh amd-driver-installer-${ATI_VERSION/./-}-x86.x86_64.run --extract amd cd amd -patch -Np1 -i ../makefile_compat.patch -#patch -Np1 -i ../ati-kernel-3.2.8.patch -patch -Np1 -i ../ati-kernel-3.4.patch + +patch -p0 < $SRC/compat_alloc-Makefile.patch +patch -p0 < $SRC/fglrx_kernel_3.4.0.patch +patch -p0 < $SRC/3.5-do_mmap.patch + cd common/lib/modules/fglrx/build_mod cp 2.6.x/Makefile . cp $SRC/amd/arch/${_ARCH}/lib/modules/fglrx/build_mod/libfglrx_ip.a . @@ -192,4 +191,6 @@ mkdir -p $PKG/root/bin install -m755 $SRC/install-${SCRIPT_VERSION}.ash \ $PKG/root/bin/install-${SCRIPT_VERSION}.ash bsdtar -c "-J" -f $PKG/boot/nutyx-initrd.tar.xz $INITRDBASE + + rm -rf $PKG/lib/firmware } diff --git a/kernel/amd-3.5.0-missing_do_mmap.patch b/kernel/amd-3.5.0-missing_do_mmap.patch new file mode 100644 index 000000000..bb61eabe3 --- /dev/null +++ b/kernel/amd-3.5.0-missing_do_mmap.patch @@ -0,0 +1,44 @@ +--- lib/modules/fglrx/build_mod/firegl_public.c ++++ lib/modules/fglrx/build_mod/firegl_public.c +@@ -2148,9 +2148,13 @@ unsigned long ATI_API_CALL KCL_MEM_Alloc + flags = MAP_SHARED; + prot = PROT_READ|PROT_WRITE; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) ++ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff); ++#else + down_write(¤t->mm->mmap_sem); + vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff); + up_write(¤t->mm->mmap_sem); ++#endif + if (IS_ERR(vaddr)) + return 0; + else +@@ -2161,6 +2165,16 @@ int ATI_API_CALL KCL_MEM_ReleaseLinearAd + { + int retcode = 0; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) ++#ifdef FGL_LINUX_RHEL_MUNMAP_API ++ retcode = vm_munmap(addr, ++ len, ++ 1); ++#else ++ retcode = vm_munmap(addr, ++ len); ++#endif ++#else + down_write(¤t->mm->mmap_sem); + #ifdef FGL_LINUX_RHEL_MUNMAP_API + retcode = do_munmap(current->mm, +@@ -2171,8 +2185,9 @@ int ATI_API_CALL KCL_MEM_ReleaseLinearAd + retcode = do_munmap(current->mm, + addr, + len); +-#endif + up_write(¤t->mm->mmap_sem); ++#endif ++#endif + return retcode; + } + diff --git a/kernel/ati-kernel-3.2.8.patch b/kernel/ati-kernel-3.2.8.patch deleted file mode 100644 index 381250214..000000000 --- a/kernel/ati-kernel-3.2.8.patch +++ /dev/null @@ -1,21 +0,0 @@ -Signed-off-by: Gianluca Gennari <gennarone@gmail.com> ---- ---- 12.1/common/lib/modules/fglrx/build_mod/firegl_public.c -+++ 12.1/common/lib/modules/fglrx/build_mod/firegl_public.c -@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void) - #ifdef CONFIG_X86_64 - kernel_fpu_begin(); - #else -+#ifndef TS_USEDFPU -+ preempt_disable(); -+ if (__thread_has_fpu(current)) -+ __save_init_fpu(current); -+#else - struct thread_info *cur_task = current_thread_info(); - preempt_disable(); - if (cur_task->status & TS_USEDFPU) - __save_init_fpu(cur_task->task); -+#endif - else - clts(); - #endif diff --git a/kernel/compat_alloc-Makefile.patch b/kernel/compat_alloc-Makefile.patch new file mode 100644 index 000000000..cc4b288fd --- /dev/null +++ b/kernel/compat_alloc-Makefile.patch @@ -0,0 +1,10 @@ +--- common/lib/modules/fglrx/build_mod/2.6.x/Makefile.compat_alloc 2010-10-25 19:14:43.157401050 -0400 ++++ common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-10-25 19:14:54.586401063 -0400 +@@ -66,6 +66,7 @@ + -DFGL_GART_RESERVED_SLOT \ + -DFGL_LINUX253P1_VMA_API \ + -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \ ++ -DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space \ + + ifeq ($(KERNELRELEASE),) + # on first call from remote location we get into this path diff --git a/kernel/config b/kernel/config index f1c15bdd5..00bc9dc65 100644 --- a/kernel/config +++ b/kernel/config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/i386 3.5.0 Kernel Configuration +# Linux/i386 3.5.1 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y diff --git a/kernel/config_64 b/kernel/config_64 index f1c15bdd5..00bc9dc65 100644 --- a/kernel/config_64 +++ b/kernel/config_64 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/i386 3.5.0 Kernel Configuration +# Linux/i386 3.5.1 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y diff --git a/kernel/ati-kernel-3.4.patch b/kernel/fglrx_kernel_3.4.0.patch index b2045355b..a3adea286 100644 --- a/kernel/ati-kernel-3.4.patch +++ b/kernel/fglrx_kernel_3.4.0.patch @@ -1,5 +1,5 @@ ---- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:33:25.044695179 +0200 -+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-05-26 18:28:39.692699095 +0200 +--- common/lib/modules/fglrx/build_mod/firegl_public.c ++++ common/lib/modules/fglrx/build_mod/firegl_public.c @@ -187,6 +187,9 @@ #include <linux/gfp.h> #include <linux/swap.h> @@ -10,22 +10,25 @@ #include "firegl_public.h" #include "kcl_osconfig.h" -@@ -4154,7 +4154,7 @@ +@@ -4181,7 +4184,11 @@ static int kasInitExecutionLevels(unsigned long level_init) { unsigned int p; KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init); -- for_each_cpu_mask(p, cpu_possible_map) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) + for_each_possible_cpu(p) ++#else + for_each_cpu_mask(p, cpu_possible_map) ++#endif { KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p); preempt_disable(); ---- a/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:11:03.402987821 +0200 -+++ b/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2012-05-26 19:13:00.273986422 +0200 +--- common/lib/modules/fglrx/build_mod/kcl_ioctl.c ++++ common/lib/modules/fglrx/build_mod/kcl_ioctl.c @@ -217,6 +217,10 @@ * \param size [in] Number of bytes to allocate * \return Pointer to allocated memory */ -+#ifndef CONFIG_X86_X32 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) +DEFINE_PER_CPU(unsigned long, old_rsp); +#endif + diff --git a/kernel/makefile_compat.patch b/kernel/makefile_compat.patch deleted file mode 100644 index defa3d8d8..000000000 --- a/kernel/makefile_compat.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-09-22 09:15:33.000000000 +0200 -+++ 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile 2010-10-01 17:57:21.057820899 +0200 -@@ -66,6 +66,7 @@ - -DFGL_GART_RESERVED_SLOT \ - -DFGL_LINUX253P1_VMA_API \ - -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \ -+ -DCOMPAT_ALLOC_USER_SPACE=$(COMPAT_ALLOC_USER_SPACE) \ - - ifeq ($(KERNELRELEASE),) - # on first call from remote location we get into this path diff --git a/kernel/pre-install b/kernel/pre-install index d875b6144..eec096255 100644 --- a/kernel/pre-install +++ b/kernel/pre-install @@ -1,3 +1,3 @@ -for i in iwlwifi-3945-ucode iwlwifi-4965-ucode iwlwifi-5000-ucode iwlwifi-5150-ucode linux-firmware rt2x00-rt61-fw rt2x00-rt71w-fw +for i in iwlwifi-3945-ucode iwlwifi-4965-ucode iwlwifi-5000-ucode iwlwifi-5150-ucode rt2x00-rt61-fw rt2x00-rt71w-fw do if ( /usr/bin/pkginfo -l $i > /dev/null 2>&1 ) ; then /usr/bin/pkgrm $i ;fi done |