Author: leigh123linux
Update of /cvs/nonfree/rpms/catalyst-legacy-kmod/F-17
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv32750/F-17
Modified Files:
.cvsignore sources
Added Files:
amd-3.5.0-missing_do_mmap.patch
catalyst-kmodtool-excludekernel-filterfile
catalyst-legacy-kmod.spec compat_alloc-Makefile.patch
Log Message:
Initial import
amd-3.5.0-missing_do_mmap.patch:
firegl_public.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
--- NEW FILE amd-3.5.0-missing_do_mmap.patch ---
--- 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;
}
--- NEW FILE catalyst-kmodtool-excludekernel-filterfile ---
--- NEW FILE catalyst-legacy-kmod.spec ---
# buildforkernels macro hint: when you build a new version or a new release
# that contains bugfixes or other improvements then you must disable the
# "buildforkernels newest" macro for just that build; immediately after
# queuing that build enable the macro again for subsequent builds; that way
# a new akmod package will only get build when a new one is actually needed
%define buildforkernels current
# Tweak to have debuginfo - part 1/2
%if 0%{?fedora} > 7
%define __debug_install_post %{_builddir}/%{?buildsubdir}/find-debuginfo.sh
%{_builddir}/%{?buildsubdir}\
%{nil}
%endif
Name: catalyst-legacy-kmod
Version: 12.6
Release: 0.1%{?dist}
# Taken over by kmodtool
Summary: AMD display legacy driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
URL:
http://ati.amd.com/support/drivers/linux/linux-radeon.html
Source0:
http://www.linux-ati-drivers.homecall.co.uk/catalyst-legacy-kmod-data-%{v...
Source11: catalyst-kmodtool-excludekernel-filterfile
Patch0: compat_alloc-Makefile.patch
Patch1: amd-3.5.0-missing_do_mmap.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# needed for plague to make sure it builds for i686
ExclusiveArch: i686 x86_64
# get the needed BuildRequires (in parts depending on what we build for)
BuildRequires: %{_bindir}/kmodtool
%{!?kernels:BuildRequires:
buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu}
}
# kmodtool does its magic here
%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name}
--filterfile %{SOURCE11} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels
"%{?kernels}"} 2>/dev/null) }
%description
The catalyst legacy %{version} display driver kernel module.
%prep
# error out if there was something wrong with kmodtool
%{?kmodtool_check}
# print kmodtool output for debugging purposes:
kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterfile
%{SOURCE11} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels
"%{?kernels}"} 2>/dev/null
%setup -q -c -T -a 0
# Tweak to have debuginfo - part 2/2
%if 0%{?fedora} > 7
cp -p %{_prefix}/lib/rpm/find-debuginfo.sh .
sed -i -e 's|strict=true|strict=false|' find-debuginfo.sh
%endif
mkdir fglrxpkg
%ifarch %{ix86}
cp -r fglrx/common/* fglrx/arch/x86/* fglrxpkg/
%endif
%ifarch x86_64
cp -r fglrx/common/* fglrx/arch/x86_64/* fglrxpkg/
%endif
# proper permissions
find fglrxpkg/lib/modules/fglrx/build_mod/ -type f -print0 | xargs -0 chmod 0644
# debuginfo fix
#sed -i -e 's|strip -g|/bin/true|' fglrxpkg/lib/modules/fglrx/build_mod/make.sh
pushd fglrxpkg
%patch0 -p0 -b.compat_alloc
%patch1 -p0 -b.3.5-do_mmap
popd
for kernel_version in %{?kernel_versions} ; do
cp -a fglrxpkg/ _kmod_build_${kernel_version%%___*}
done
%build
for kernel_version in %{?kernel_versions}; do
pushd _kmod_build_${kernel_version%%___*}/lib/modules/fglrx/build_mod/2.6.x
make CC="gcc" PAGE_ATTR_FIX=0 MODVERSIONS=8.98 \
KVER="${kernel_version%%___*}" \
KDIR="/usr/src/kernels/${kernel_version%%___*}"
popd
done
%install
rm -rf $RPM_BUILD_ROOT
for kernel_version in %{?kernel_versions}; do
install -D -m 0755
_kmod_build_${kernel_version%%___*}/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko
$RPM_BUILD_ROOT%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/fglrx.ko
done
%{?akmod_install}
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Jul 06 2012 leigh scott <leigh123linux(a)googlemail.com> - 12.6-0.1
- Based on xorg-x11-drv-catalyst
- Update to Catalyst legacy 12.6 beta (internal version 8.97.100.3)
compat_alloc-Makefile.patch:
Makefile | 1 +
1 file changed, 1 insertion(+)
--- NEW FILE compat_alloc-Makefile.patch ---
--- lib/modules/fglrx/build_mod/2.6.x/Makefile.compat_alloc 2010-10-25 19:14:43.157401050
-0400
+++ 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
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/catalyst-legacy-kmod/F-17/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 29 Nov 2012 17:26:44 -0000 1.1
+++ .cvsignore 29 Nov 2012 21:10:59 -0000 1.2
@@ -0,0 +1 @@
+catalyst-legacy-kmod-data-12.6.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/catalyst-legacy-kmod/F-17/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 29 Nov 2012 17:26:44 -0000 1.1
+++ sources 29 Nov 2012 21:10:59 -0000 1.2
@@ -0,0 +1 @@
+5d0ef51de6503c357865e03acb1bf390 catalyst-legacy-kmod-data-12.6.tar.bz2