Sunday, September 07, 2003

Laptop is fully functional :)

It is 4 am here in office and the Dell Inspiron 8500 is fully functional with Debian/unstable at last. The only thing not working was the ACPI support; the laptop always ran on full speed and full power, hence getting very hot.

Detailing the stuff I had to do here so I (and possibly others) might benefit in the future again:

  1. Get the kernel-source-2.4.20 ACPI patched kernel from http://people.debian.org/~maxx/ . Did a dpkg -i kernel-source-2.4.20_2.4.20-9_all.deb which put a tar.bz2 in /usr/src/. Went ahead and untarred it.
  2. The DSDT is broken on the 8500. There are tons of pages on the Net which detail getting stock Redhat 9 kernels to work with the 8500, but no Debian kernels. Which is a pity since the Debian kernels already have the ACPI and other patches applied. So I had to find a fixed DSDT and manually apply it to the kernel souce I had. My BIOS revision is A03 (says so right at the startup),so I got dsdt-i8500-A03-fixed-v2.dsl from http://ltswww.epfl.ch/~dsanta/resources/dell-i8500-linux. Then I got the intel iasl compiler (from http://www.intel.com/technology/iapc/acpi/downloads/iasl-linux-20030228.tar.gz) and generated a hex file by using $ iasl -tc file.dsl. This gave me file.hex
  3. Next according to http://acpi.sourceforge.net/wiki/index.php/HowToOverrideTable (on the ACPI wiki) I edited the file linux/drivers/acpi/osl.c (find out where your osl.c is). Added at the beginning:
    static const
    #include "/tmp/dsdt.hex"
    
    and then after the (already existing) if statement in the function acpi_os_table_override() :
    if (strncmp(existing_table->signature,"DSDT",4))
           *new_table = NULL;
    else *new_table = (acpi_table_header *)AmlCode;
           return AE_OK;
    
    I'm assuming /tmp/dsdt.hex is where you put the hex file we generated. If not, edit accordingly.
  4. Now configured the kernel to not use APM and build ACPI as modules
  5. Built kernel the debian way [/usr/src/linux] $ make-kpkg --config xconfig --append_to_version=.alpha kernel_image
    (I actually used `--config oldconfig', bit that doesn't matter here) This will generate a kernel-image-2.4.20.alpha_10.00.Custom_i386.deb When you install this package (via dpkg -i) and update you boot-loader (lilo or grub or whatever) on a reboot you will get ACPI support :)

So this coupled with the cpudynd package from debian and some cool scripts from http://mikehardy.net/linux_latitude_d800/acpid-scripts.tar.bz2 the laptop works very well.

0 Comments:

Post a Comment

<< Home