Wednesday, September 07, 2005

lufs package and Debian

Following is the log of how I managed to install LUFS on Debian:

First of all, I've tried installing lufs packages provided with Debian by 'dpkg -i lufs-source lufs-utils' but it did not work - lufs-source package seems incomplete. So, I went to the LUFS website and downloaded the whole source (version 0.9.7).

The whole compilation went OK with small detail: when linking the module `lufs.ko', compiler complained about missing `kill_proc_info()' call, even though it was present in current kernel.

I like shortcuts so I've just commented out the call to this function. It works right now, I'm going to change it when I'll figure out how to compile modules (I'm obvoiusly not a Linux kernel developer :-).

hacking ATI FireGL drivers

Maybe the title of this write-up is little overblown, because the whole `hacking' came down to simple substitution... but here's the whole story: I've compiled new version of kernel (2.6.13) on my development machine and as ATI drivers for FireGL cards come as kernel module, I had to recompile them too. First of all, my old version (8.14.3) did not compile with new kernel - I got those error messages:

dh_testdir
KERNEL_PATH= uname_r= ./make.sh --nohints
ATI module generator V 2.0
==========================
initializing...
cleaning...
patching 'highmem.h'...
assuming new VMA API since we do have kernel 2.6.x...
doing Makefile based build for kernel 2.6.x and higher
make[1]: Entering directory `/usr/src/modules/fglrx'
make -C /usr/src/linux-2.6.13 SUBDIRS=/usr/src/modules/fglrx modules
make[2]: Entering directory `/usr/src/linux-2.6.13'
CC [M] /usr/src/modules/fglrx/agp3.o
CC [M] /usr/src/modules/fglrx/nvidia-agp.o
CC [M] /usr/src/modules/fglrx/agpgart_be.o
/usr/src/modules/fglrx/agpgart_be.c: In function `agp_find_supported_device':
/usr/src/modules/fglrx/agpgart_be.c:7136: error: structure has no member named `slot_na
me'
/usr/src/modules/fglrx/agpgart_be.c:7156: error: structure has no member named `slot_na
me'
/usr/src/modules/fglrx/agpgart_be.c:7161: error: structure has no member named `slot_na
me'
/usr/src/modules/fglrx/agpgart_be.c:7187: error: structure has no member named `slot_na
me'
/usr/src/modules/fglrx/agpgart_be.c:7207: error: structure has no member named `slot_na
me'
/usr/src/modules/fglrx/agpgart_be.c:7227: error: structure has no member named `slot_na
me'
/usr/src/modules/fglrx/agpgart_be.c:7232: error: structure has no member named `slot_na
me'
/usr/src/modules/fglrx/agpgart_be.c: In function `__fgl_agp_init':
/usr/src/modules/fglrx/agpgart_be.c:7613: warning: `pm_register' is deprecated (declare
d at include/linux/pm.h:107)
/usr/src/modules/fglrx/agpgart_be.c: In function `__fgl_agp_cleanup':
/usr/src/modules/fglrx/agpgart_be.c:7623: warning: `pm_unregister_all' is deprecated (d
eclared at include/linux/pm.h:117)
make[3]: *** [/usr/src/modules/fglrx/agpgart_be.o] Error 1
make[2]: *** [_module_/usr/src/modules/fglrx] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.13'
make[1]: *** [kmod_build] Error 2
make[1]: Leaving directory `/usr/src/modules/fglrx'
build failed with return value 2
I suspected that something changed in new version of kernel, so I downloaded new version (8.20.16) and tried again. This time the error message was different, certain symbol ('verify_area') was not defined. Looking into the kernel sources I've found out that this system call was dropped and 'access_ok()' now replaces it. What I did was this simple hack:

--- firegl_public.c 2005-09-07 14:41:04.401948000 +0200
+++ firegl_public.c.orig 2005-09-07 14:37:22.548083000 +0200
@@ -1425,9 +1425,7 @@

int ATI_API_CALL __ke_verify_area(int type, const void * addr, unsigned long size)
{
- /* return verify_area(type, addr, size);
- */
- return verify_area(type, addr, size);
+ return access_ok(type,addr,size);
}

int ATI_API_CALL __ke_get_pci_device_info(__ke_pci_dev_t* dev, __ke_pci_device_info_t
*pinfo)
...or simple substitution of one function call to another (parameters looked the same). This works right now, and I'm getting usual number FPSs as before.

That's it! anyone interesting can try it out and if you know exactly what I did, please let me know :-).

Tuesday, September 06, 2005

Listal - A social DVD, book, music and games collection manager

I've discovered this useful website today - gives nice opportunity to share your collection with other people... unless it's monitored by some authorities and, for users with lots of movies, special surveilance is undertaken!

The site is also using book/dvd information from amazon.com, they may be working together for data mining.

Yeah, conspiracy theories are plenty!