編譯spca5xx的Webcam Driver

September 20, 2006

The command to install these packages is:
Become root:

$ sudo -s

# apt-get install linux-headers-`uname -r` linux-restricted-modules-`uname -r` build-essential gcc-3.4


The linux stuff is installed under /usr/src. So I suggest, you go there:

# cd /usr/src


and move the spca5xx source from your home directory to this location:

# mv ~/spca5xx-20051212.tar.gz .


Unpack it

# tar xfvz spca5xx-20051212.tar.gz


Enter the spca5xx directory

# cd spca5xx-20051212


Workaround to make the Makefile use gcc-3.4
The Makefile which controls the compiling process for this driver has to be told to use gcc-3.4 instead of the default version 4.0:

CC=gcc-3.4
export CC


This sets the environment variable CC, which is used in the spac5xx Makefile to select the compiler.
Setting a link back to the source code (headers)
Furthermore the spca5xx Makefile expect a pointer to the kernel source at a specific location. Let’s create it:

# ln -s /usr/src/linux-headers-`uname -r` /lib/modules/`uname -r`/build


(Note: If you compile a kernel, this link is usually there. But as we use a pre-compiled kernel, we have to cheat.)
Compiling the spca5xx source code

# make


There should be no errors.
Removing the old driver from memory

# modprobe -r spca5xx


Removing the old driver from the hard drive

# rm -rf /lib/modules/`uname -r`/kernel/drivers/usb/media/spca5xx*


Install the new driver

# make install


Load the new driver

# modprobe spca5xx


There should be no errors.

使用 ubuntu 播放 DVD

March 11, 2006

播放 DVD 需要 libdvdcss 套件,但是因為法律問題,Ubuntu/Debian 並
不直接包含該套件。相關資訊可以閱讀 /usr/share/doc/libdvdread3/README.Debian
安裝 libdvdcss 的方法不難,就如該檔案所敘述的,只要執行他提供的 script 就可以了:

$sudo /usr/share/doc/libdvdread3/examples/install-css.sh

就這樣。用 totem 播放就可以了。

this message is from:freesamael