Difference between revisions of "CI20-SGX kernel module"
m (FIx category sort key)
|Line 61:||Line 61:|
Revision as of 03:36, 23 October 2014
The graphics driver for the CI20 is an out-of-tree kernel module. The way kernel modules work is that they have to be recompiled if the base kernel is modified. This is kernel feature. Modules are only allowed to be loaded when they have been compiled based on the exact source tree and options that the running kernel is.
As the default xorg driver also uses the GPU for running X window system, it would seem that debian gui fails to load when you recompile the kernel from sources. The only thing that needs doing, is to recompile the kernel module for the GPU. And copy that module onto the filesystem.
If GPU functionality is not required by whatever task you wish to do with the CI20, you could just disable the module. You will still be able to use the Debian GUI. This just disables hardware 3D acceleration, OpenGL etc. Instructions for disabling the GPU are available here
Compiling the module
The kernel part of the GPU driver must be built to generate a kernel module which is then loaded and interacts with the SGX hardware and the userland portions of the driver. The sources for the module are available for the 3.0.8 version of the GPU driver.
You may build the module using the following instructions:
Download and extract the tarball from here. Look for sgx-km-longcommitid.tar.gz. Inside the directory, run the following
CROSS_COMPILE=$CROSS_COMPILE KERNELDIR=/home/user/ci20/linux_kernel_repo_dir make -C eurasiacon/build/linux2/jz4780_linux
You will need to adjust KERNELDIR to the appropriate path to where the source code for your ci20 kernel is located. And the CROSS_COMPILE path to your cross compiler.
This will generate the pvrsrvkm.ko module file. This needs to be placed in the following path
The folder name should match the kernel version you are running. You can check using
Disabling the GPU module
You can set xorg to default to using the fbdev driver instead of the GPU if you don't need the GPU. i.e. Hardware 3D acceleration / opengl processing etc.
The Debian GUI will still run.
The only thing you need to do is apply the following xorg.conf in /etc/X11/xorg.conf
# X.Org X server configuration file for CI20 Section "Device" Identifier "Device0" Driver "fbdev" EndSection Section "Monitor" Identifier "Monitor" EndSection Section "Screen" Identifier "Screen0" Monitor "Monitor" Device "Device0" DefaultFbBpp 32 EndSection
HACK for advanced users
You can bypass the module version checking feature. But you should know what you are doing. Because changes to kernel options can easily tweak something minor that causes bad things to happen.
To do this, modify the kernel version string in the .config file to exactly match the one the original pvr module was built with. You can check that by checking your old /lib/modules/3.0.8-xxx directory numbers. or uname -a