Wanna see this logo while booting your 2.6 kernel? Click here!

31.03.2005 16:14

New Matrox Parhelia driver available for download!


Today someone sent me an unoffical driver update for the Matrox Parhelia P750. This driver from Matrox incorporates mostly all of my adaptions plus additional changes to get OpenGL working. Since about twenty minutes I'm running with the new driver and I'm experiencing no problems at all - even tuxracer works again ;)

I mirrored the driver on my webspace here.
Feel free to download and enjoy!

17.03.2005 11:45

VMware GSX Server 3.1 and Linux Kernel 2.6.11.4


VMware GSX server is the next thing, that doesn't work with 2.6.11 kernels. The "problem" is, that the vmnet module depends on an exported symbol called "skb_copy_datagram", which has been removed in 2.6.11. In fact, skb_copy_datagram was only a global wrapper function which built an iovec struct of the given buffer and called skb_copy_datagram_iovec. The change is listed in the Changelog of 2.6.11:
<bunk@stusta.de>
  [NET]: misc cleanups
  
  The patch below contains the following cleanups:
  - make needlessly global code static
  - remove the following unused global functions:
    - datagram.c: skb_copy_datagram
    - iovec.c: memcpy_tokerneliovec
  - remove the following unneeded EXPORT_SYMBOL's:
    - datagram.c: skb_copy_datagram
    - dev.c: ing_filter
    - iovec.c: memcpy_tokerneliovec
    - netpoll.c: netpoll_send_skb
    - rtnetlink.c: rtnetlink_dump_ifinfo
    - sock.c: sock_alloc_send_pskb
  
  Signed-off-by: Adrian Bunk <bunk@stusta.de>
  Signed-off-by: David S. Miller <davem@davemloft.net>
VMware's vmnet module depends on this deprecated exported symbol, so the only thing to do here was to modify the calling function so that it uses skb_copy_datagram_iovec instead.

You may download the diff to vmnet-only/userif.c here. There are two ways to apply this patch:
  1. Patch the temporary extracted folder in /tmp/vmware-config?.
  2. Patch the vmnet.tar archive in /usr/lib/vmware/source/.

Short instructions:
vi-edv003:~# cd /usr/lib/vmware/modules/source
vi-edv003:/usr/lib/vmware/modules/source# tar xf vmnet.tar
vi-edv003:/usr/lib/vmware/modules/source# cd vmnet-only/
vi-edv003:/usr/lib/vmware/modules/source/vmnet-only# patch </path/to/gsx-3.1-9089-userif.c-2.6.11.diff
patching file userif.c
vi-edv003:/usr/lib/vmware/modules/source/vmnet-only# cd ..
vi-edv003:/usr/lib/vmware/modules/source# rm vmnet.tar
vi-edv003:/usr/lib/vmware/modules/source# tar cf vmnet.tar vmnet-only/
vi-edv003:/usr/lib/vmware/modules/source# rm -r vmnet-only/
vi-edv003:/usr/lib/vmware/modules/source#

16.03.2005 13:50

Matrox Parhelia driver for Linux 2.6.11


Today I finished the porting of the Matrox Parhelia Driver 1.4.0 for Linux from 2.6.x (where x != 11) to 2.6.11 (and upwards).
The current driver did not work with 2.6.11 because of structural changes in the kernel source tree (removal of the agp_backend structure, removal of remap_page_range). My port does basically work, but at the moment OpenGL does not work on my system (if it does on yours with my driver, please write me an email).

As I had not the time to create a new .run script, you'd have to download the current 1.4.0 release from the above link, let it extract to matroxdriver-1.4.0 and patch it with my update.
vi-edv003:~# ./mtxdriver-pro-1.4.0.run
Please, enter the directory to extract the files [/root/]

mkdir: too few arguments
Try `mkdir --help' for more information.
Creating directory /root/matroxdriver-1.4.0
Verifying archive integrity... All good.
Uncompressing Matrox Parhelia Driver..................
After uncompressing the tarball, you may cancel (CTRL-C) the install script while trying to compile the mtx.ko kernel module (because it won't work anyway).
Change to the driver-directory, and apply my patch.
vi-edv003:~/matroxdriver-1.4.0# patch -p1 <../mtx-1.4.0-2.6.11.diff
patching file kernel/src/mtx_agp.c
patching file kernel/src/mtx_drv.h
patching file kernel/src/mtx_mem.c
patching file kernel/src/mtx_vm.c
vi-edv003:~/matroxdriver-1.4.0#./install.sh
Follow the instructions and you should be fine.

09.03.2005 14:21

autodoc for PHP


Today I finished a new project, called "autodoc for php".
It is intended to do automatic documentation of PHP source code, like javadoc does for java files. Further information about this script itself and about its usage can be found in the comment-header of the script which is available for download here.

For an example documentation output (autodoc documenting autodoc ;)) click here.

04.03.2005 08:50

Getting Smart Battery System (SBS) on an Acer Travelmate 4000 Series Laptop to work with Linux


Yesterday I found an interesting sourceforge-project (sbs-linux [EN]) that deals with supporting the Smart Battery System (SBS) found in some laptops.
As I have some Acer Travelmate 4001LCi laptops at work as platform for my thinclient installation, I always wanted to know the state of my battery. All other laptops work fine with my xbattbar modification, but this model doesn't.

To keep it short: It works now.
Here are the steps one needs to go to get this working:

  1. Download the latest sbs-cm tgz-archive from http://sourceforge.net/projects/sbs-linux

  2. Download the Intel iasl compiler from http://developer.intel.com/technology/iapc/acpi/downloads.htm

  3. To compile this compiler you need "bison" and "flex" installed (Note for Debian users: you need the "flex-old" package instead of "flex", otherwise the compilation doesn't succeed).
    vi-dsdt:~# tar xfz acpica-unix-20050211.tar.gz
    vi-dsdt:~# cd acpica-unix-20050211/compiler
    vi-dsdt:~/acpica-unix-20050211/compiler# make
    
    If everything is fine, you should have a binary file called "iasl" in this directory. Copy it anywhere to your $PATH or remind where it's located.

  4. Extract the current DSDT from your running kernel
    vi-dsdt:~# cp /proc/acpi/dsdt dsdt.dat
    
  5. Decompile dsdt.dat with iasl
    vi-dsdt:~# iasl -d dsdt.dat
    
    Intel ACPI Component Architecture
    ASL Optimizing Compiler / AML Disassembler version 20050211 [Mar  3 2005]
    Copyright (C) 2000 - 2005 Intel Corporation
    Supports ACPI Specification Revision 3.0
    
    Loading Acpi table from file dsdt.dat
    Acpi table [DSDT] successfully installed and loaded
    Pass 1 parse of [DSDT]
    Pass 2 parse of [DSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)
    ...........................................................................
    ...........................................................................
    ...........................................................................
    ...........................................................................
    Parsing completed
    Disassembly completed, written to "dsdt.dsl"
    vi-dsdt:~#
    

    Now you should get a file called "dsdt.dsl" in your CWD.

  6. Patch dsdt.dsl with the patches from sbs-cm (verify, that all .asl files and the diff file of your choice is in the same directory as dsdt.dsl)
    vi-dsdt:~# ls
    Acer4xxx-DSDT.aml        dsdt.dat  iasl           sbs-cm-2b.asl  tc
    acer-tm4xxx-sbs-cm.diff  dsdt.dsl  sbs-cm-1b.asl  smbus-cm.asl
    vi-dsdt:~# patch <acer-tm4xxx-sbs-cm.diff
    patching file dsdt.dsl
    vi-dsdt:~#  
    
  7. Compile the modified dsdt.dsl with iasl
    vi-dsdt:~# iasl dsdt.dsl
    
    Intel ACPI Component Architecture
    ASL Optimizing Compiler / AML Disassembler version 20050211 [Mar  3 2005]
    Copyright (C) 2000 - 2005 Intel Corporation
    Supports ACPI Specification Revision 3.0
    
    dsdt.dsl   245:     Method (_WAK, 1, NotSerialized)
    Warning  2026 -                ^ Reserved method must return a value (_WAK)
    
    dsdt.dsl  4404:                         Method (_STA, 0, NotSerialized)
    Warning  2019 -                                    ^ Not all control paths return a value (_STA)
    
    dsdt.dsl  4404:                         Method (_STA, 0, NotSerialized)
    Warning  2026 -                                    ^ Reserved method must return a value (_STA)
    
    smbus-cm.asl    84:         Method (_SBI, 0, NotSerialized)
    Warning  2033 -  Unknown reserved name ^  (_SBI)
    
    smbus-cm.asl   144:         Method (_SBR, 3, NotSerialized)
    Warning  2033 -  Unknown reserved name ^  (_SBR)
    
    smbus-cm.asl   234:         Method (_SBW, 5, NotSerialized)
    Warning  2033 -  Unknown reserved name ^  (_SBW)
    
    smbus-cm.asl   311:         Method (_SBA, 0, NotSerialized)
    Warning  2033 -  Unknown reserved name ^  (_SBA)
    
    ASL Input:  dsdt.dsl - 4939 lines, 232406 bytes, 2907 keywords
    AML Output: DSDT.aml - 24793 bytes 707 named objects 2200 executable opcodes
    
    Compilation complete. 0 Errors, 7 Warnings, 0 Remarks, 779 Optimizations
    vi-dsdt:~#
    

    As you can see, there are several warnings which means, that the patch provided by sbs-cm is not fully applicable to the DSDT of this laptop. So I corrected some of these warnings by hand for my DSDT. If your warnings are similar to mine, you may use my acer-tm4001LCi-sbs-cm.diff instead of the acer-tm4xxx-sbs-cm.diff provided by the sbs-cm package.
    With this patch, all warnings (except for the 2033 warnings) are cleaned. If you have any idea of how to get rid of the last four messages, please send me an e-mail.

  8. After completion you should have a "DSDT.aml" file in your CWD. Now you have to add this DSDT to your kernel by either compiling it into your kernel or by using an initrd. I decided the initrd-method, because I already have an initrd for bootsplash and so I only had to append the modified DSDT to my initrd.
    vi-dsdt:~# echo -n "INITRDDSDT123DSDT123" >>/boot/initrd.splash
    vi-dsdt:~# cat DSDT.aml >>/boot/initrd.splash
    vi-dsdt:~#
    
    The "-n" is mandatory in this place, unlike mentioned in other documentations! If you omit the "-n" your DSDT will not be found at boot-time.

  9. Adding DSDT in intrd support to your kernel
    Apply the apropriate patch from http://gaugusch.at/kernel.shtml to your kernel source and enable the new option CONFIG_ACPI_CUSTOM_DSDT_INITRD at the ACPI options. (local copy of the patch for 2.6.9 to 2.6.11). As mentioned on another webresource, you should also apply acpi-ec-nospinlock-2.6.10.diff to prevent your kernel from going crazy when polling ACPI battery state every few seconds.
    Recompile your kernel, install it and reboot.

  10. If everything worked fine, you should get a message like this one in your dmesg log:
    vi-dsdt:~# dmesg | grep Looking
    ACPI: Looking for DSDT in initrd... found (at offset 0x32f14).
    vi-dsdt:~#
    
Additional Links with detailed information about this topic: