Basic setup (16.07.2002)

Since the Vaio NV 105 comes with an ACPI BIOS (to enter the BIOS press F2 when Sony logo is displayed) ACPI should be used for powermanagement. However this is not working with the standard kernel. After many hours I found this setup working:

  1. Install SuSE kernel sources

  2. Download the SuSE-acpi-20020611-pciirq-2.4.18 patch and apply

  3. Configure Kernel (e.g. make xconfig)

  4. Compile kernel (make bzImage the new kernel can be found in /usr/src/linux/arch/i386/boot as bzImage) and modules (make modules, make modules_install and depmod -a) and install the new kernel (copy bzImage to /boot/vmlinuz.own (use an additional lilo entry and don't forget to create the initrd with mk_initrd)

  5. Edit the /etc/lilo.conf. Add the new entry (copy of the standard entry) and remove all kernel parameters

  6. Download kacpi-05.kde3, compile and install (Caution: the default installation path doesn't fit)

As result ACPI is available. Kacpi shows the battery state (after adjusting the path to the ACPI files and configuring the usage of the correct ACPI version). Details have to be verified.

Remember: If parts of the ACPI support have been configured as kernel modules, these have to be loaded. I use a little shell script (boot.acpi) which is started via a link S99Autostart in /etc/init.d/rc5.d referring to my general autostart script (which in turn invokes boot.acpi).

To make this a little bit easier to understand:

  • I've created a directory Autostart in my home directory (/home/frank)

  • I've put a shell script named start in this directory

  • I've put boot.acpi in the Autostart directory

  • The start script contains commands to invoke boot.acpi

  • In /etc/init.d/rc5.d I've created a link to the start script
    (ln -s S99Autostart /home/frank/Autostart/start)

An other possible implementation could use /etc/init.d/boot.local.

Applying Patch 20020726 (31.07.2002)

Due to severe problems with my patched kernel sources, I've started from the scratch with the whole patching issue. This time it worked out.

First of all I created a perl script that make "split patches". There is probably a simpler way to do this and the script is far from perfect. Anyhow the script creates a sub-directory where all the single patches are stored. In addition a patched version of the vanilla source is created as well.

  • Get the vanilla 2.4.18 kernel from www.kernel.org

  • Install the SuSE kernel source (they live in /usr/src/linux-2.4.18.SuSE

  • Remove the link /usr/src/linux

  • Unpack the vanilla kernel sources in /usr/src (Careful: the directory created is named linux - unpacking might overwrite something ! Make sure there is no directory or link named linux prior to unpacking)

  • Rename the new directory linux to linux-2.4.18.vanilla

  • Get the acpi-20020726-2.4.18.diff.gz patch and unpack it

  • Copy the SuSE kernel sources to a new directory in /usr/src (e.g. linux-2.4.18.patched)

  • Create a link (ln -s linux linux.2.4.18.patched) in /usr/src named linux pointing to the directory with the (to be) patched sources

  • Make sure that the sources in linux-2.4.18.patched are complete and compile (configure the kernel, make the kernel and the modules)

  • Now the perl script pat_tool.pl is invoked
    Parameters to use:
    --patch = the name of the patch = patch=acpi-20020726-2.4.18.diff
    --source = the modified sources = /usr/src/linux
    --level = the acpi patch has directory names that include the linux/... part = 1
    --vanilla = the vanilla sources = /usr/src/linux-2.4.18.vanilla
    --remove = Remove applied patches (or --noremove if you want to keep the file)

Invoking the script with these parameters creates the split patches and the patched vanilla files. If you selected --remove, three patches are let, that couldn't be applied automatically

  • arch/i386/kernel/acpitable.c - Removed by the patch -- Deleted

  • arch/i386/kernel/mpparse.c - Merged

  • arch/i386/kernel/mm/init.c - Merged

  • drivers/acpi/acpi_ksyms.c - Merged

The merging was the hardest part and took a lot of trail and error. As next steps configure the patched kernel, compile and install.

After installing the new kernel and modules (and installation of the PCMCIA modules and alsa sound modules) a reboot works as expected. The /proc/acpi seams to be o.k. as well Anyhow the kernel needs more testing, there might be some more (hidden) problems. Currently I haven't found any new features that wasn't available with the older pci irq patch. After working with the patched kernel for some days, I have found some problems related to hwinfo -- this needs further investigation.

Lessons learned

Using a patch (created against a standard kernel) on a special kernel (like the on SuSE ships) is not easy. There are a lot of little pitfalls to avoid (or not). Anyhow it can be done (-- try this with an M$ OS). I guess there are simpler ways to do this - but I haven't found one yet. A great tool, that helped me a lot, is xxdiff, a graphical frontend to diff. To use it, one needs the openssl package in a newer version then the one that ships with SuSE 8.0. (I just saw that there is a YOU update for openssl. Maybe that version is fine as well). When trying to install it rpm complains about dependencies. However I haven't noticed any problems after using the --force flag to install the new release. Another very helpful tool is dirdiff which shows if files are the same or not and allows to copy them from one directory to the other.

----- UPDATE -----(8.8.2002)

Since there where some problems with the patched kernel (Oops during startup). So I tired again to get a merged version, that is o.k. This time I used the patched version of the 2.4.18 vanilla version. However this won't work for the init.c file. I merged the files (vanilla patched and SuSE 8.0). For most of the conflicts I stayed with the SuSE 8.0 code. This version works without any Kernel Oops.

Back to NV105 Main

Page last modified on March 27, 2004 at 12:47:23