commit 90fdf7b3f80fb45408af2cacc03ddee14d65d8e3
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Feb 27 21:37:43 2018 +0100
Initial import for crystalhd-kmod
.gitignore | 1 +
crystalhd-Kconfig | 6 ++
crystalhd-Makefile | 21 +++++++
crystalhd-kmod.spec | 94 +++++++++++++++++++++++++++++
crystalhd-kmodtool-excludekernel-filterfile | 0
sources | 1 +
6 files changed, 123 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..8dcb533 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/crystalhd-kmod-*.tar.xz
diff --git a/crystalhd-Kconfig b/crystalhd-Kconfig
new file mode 100644
index 0000000..507f48b
--- /dev/null
+++ b/crystalhd-Kconfig
@@ -0,0 +1,6 @@
+config CRYSTALHD
+ tristate "Broadcom Crystal HD video decoder support"
+ depends on PCI
+ default n
+ help
+ Support for the Broadcom Crystal HD video decoder chipset
diff --git a/crystalhd-Makefile b/crystalhd-Makefile
new file mode 100644
index 0000000..4394411
--- /dev/null
+++ b/crystalhd-Makefile
@@ -0,0 +1,21 @@
+
+INCLUDES = -I$(KDIR)/include
+INCLUDES += -I$(src)/../../include
+INCLUDES += -I$(src)/../../include/link
+INCLUDES += -I$(src)/../../include/flea
+
+EXTRA_CFLAGS = -D__KERNEL__ -DMODULE $(INCLUDES) $(INC)
+EXTRA_CFLAGS += -Wall -Wstrict-prototypes -Wno-trigraphs -Werror -O2
+
+OBJ := crystalhd_lnx.o \
+ crystalhd_misc.o \
+ crystalhd_cmds.o \
+ crystalhd_hw.o \
+ crystalhd_linkfuncs.o \
+ crystalhd_fleafuncs.o \
+ crystalhd_flea_ddr.o
+
+PWD = $(shell pwd)
+
+obj-$(CONFIG_CRYSTALHD) := crystalhd.o
+ crystalhd-objs := $(OBJ)
diff --git a/crystalhd-kmod.spec b/crystalhd-kmod.spec
new file mode 100644
index 0000000..1f544e9
--- /dev/null
+++ b/crystalhd-kmod.spec
@@ -0,0 +1,94 @@
+%global buildforkernels akmod
+%global debug_package %{nil}
+
+Name: crystalhd-kmod
+Summary: Kernel module (kmod) for crystalhd
+Version: 20170515
+Release: 1%{?dist}
+License: GPLv2
+URL:
https://github.com/philipl/crystalhd.git
+Source0: crystalhd-kmod-%{version}.tar.xz
+Source1: crystalhd-Makefile
+Source2: crystalhd-Kconfig
+Source11: crystalhd-kmodtool-excludekernel-filterfile
+# 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}
}
+%{?fedora:BuildRequires: unifdef}
+ExclusiveArch: i686 x86_64
+
+
+# kmodtool does its magic here
+%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name}
%{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"}
2>/dev/null) }
+
+%description
+CrystalHD extra modules.
+
+%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}
%{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"}
2>/dev/null
+
+%setup -q -c
+#Copied from kernel sources
+install -pm 0644 %{SOURCE1} drivers/staging/crystalhd/Makefile
+install -pm 0644 %{SOURCE2} drivers/staging/crystalhd/Kconfig
+for kernel_version in %{?kernel_versions} ; do
+ cp -a drivers/staging/crystalhd _kmod_build_${kernel_version%%___*}
+done
+
+
+%build
+for kernel_version in %{?kernel_versions} ; do
+%make_build -C ${kernel_version##*___} \
+ M=${PWD}/_kmod_build_${kernel_version%%___*} \
+ CONFIG_CRYSTALHD=m \
+ V=1\
+ modules
+done
+
+
+%install
+for kernel_version in %{?kernel_versions}; do
+ mkdir -p
${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
+ install -D -m 755 -t
${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
$(find _kmod_build_${kernel_version%%___*}/ -name '*.ko')
+ chmod u+x %{buildroot}%{_prefix}/lib/modules/*/extra/*/*
+done
+%{?akmod_install}
+
+
+%changelog
+* Wed May 17 2017 Nicolas Chauvet <kwizart(a)gmail.com> - 20170515-1
+- Update to 20170515
+
+* Fri Feb 10 2017 Nicolas Chauvet <kwizart(a)gmail.com> - 20170210-1
+- Update to 20170210
+
+* Sat Nov 14 2015 Nicolas Chauvet <kwizart(a)gmail.com> - 20131018-4
+- Rebuilt for f23
+
+* Sun Mar 01 2015 Nicolas Chauvet <kwizart(a)gmail.com> - 20131018-3.5
+- Rebuilt for kmod
+
+* Tue Jan 20 2015 Nicolas Chauvet <kwizart(a)gmail.com> - 20131018-2.5
+- Rebuilt for kernel
+
+* Wed Mar 12 2014 Nicolas Chauvet <kwizart(a)gmail.com> - 20131018-2.4
+- Rebuilt for kernel
+
+* Sat Mar 01 2014 Nicolas Chauvet <kwizart(a)gmail.com> - 20131018-2.3
+- Rebuilt for kernel
+
+* Mon Feb 10 2014 Nicolas Chauvet <kwizart(a)gmail.com> - 20131018-2.2
+- Rebuilt for kernel
+
+* Sun Jan 26 2014 Nicolas Chauvet <kwizart(a)gmail.com> - 20131018-2.1
+- Rebuilt for kernel
+
+* Wed Jan 15 2014 Nicolas Chauvet <kwizart(a)gmail.com> - 20131018-2
+- Disable ARM
+
+* Wed Jan 16 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 20130106-1
+- Initial spec file
+
diff --git a/crystalhd-kmodtool-excludekernel-filterfile
b/crystalhd-kmodtool-excludekernel-filterfile
new file mode 100644
index 0000000..e69de29
diff --git a/sources b/sources
index e69de29..d0556ca 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a8257a91cbed4e32bf909bd8fae313c1 crystalhd-kmod-20170515.tar.xz