Computers
Read books online » Computers » ACPI: Advanced Configuration and Power Interface by Emma Jane Hogbin (english novels to read TXT) 📖

Book online «ACPI: Advanced Configuration and Power Interface by Emma Jane Hogbin (english novels to read TXT) 📖». Author Emma Jane Hogbin



1 2 3 4 5 6
Go to page:
with the latest patch for the 2.4.20 kernel. This would

be instead of downloading a fresh (non-patched) kernel from [http://

www.kernel.org] www.kernel.org. He sent me an email with the following

details:

I took the kernel-source 2.4.20-8 from unstable, removed the  

ACPI changes [i.e. the old patch] and applied acpi-20021212-2.4.20.diff.gz from acpi.sf.net since the vanilla 2.4.20 HAS several security leaks (ptrace, hash table, ...). You can find the package at [http://people.debian.org/~maxx/ kernel-source-2.4.20/] http://people.debian.org/~maxx/ kernel-source-2.4.20/ (I didn't upload the .orig.tar.gz since you can get it from any debian mirror and the .deb is already big enough) --[http://people.debian.org/~maxx] maxx

Warning I have not tested these packages. You may or may not have any luck

with them. Please don't email me asking about them, ask maxx instead. Backups

If you are already running a kernel that is the same version of the one you

are about to patch I recommend creating a fresh directory for the newly

patched kernel. Remember that backups are never a bad thing. These are the

files that I back up:

* /etc/lilo.conf

 /usr/src/.deb (Debian-specific)

* /etc/modules

* /etc/modutils/aliases

* /usr/src/linux/.config

* If you are not doing things The Debian Way you should also back up the /

lib/modules directory, /boot/vmlinuz, /usr/src/linux/arch/i386/boot/ bzImage and /usr/src/System.map. It's possible my notes on the location of these files differs. Do a locate <file> if they're not where I've stated they should be. Download and Unpack the New Kernel

9.1. Required packages

The following is a list of packages required to patch a 2.4.x series kernel.

I am still working on the notes for a 2.6.x series install.

2.4.x series kernels

* kernel source files

* ACPI patch that exactly matches the kernel version

* debian packages: make, bzip2, gcc, libc6-dev, tk8.3, libncurses5-dev,

kernel-package

* after you've patched the kernel add the debian packages: acpid, acpi

(this last package is available in testing and unstable versions of Debian, but not stable)

9.2. Unpack

We need to unpack the bz2 file (bzip2) and shuffle the directories around a

bit. /usr/src/linux probably points to your current kernel. We need it to

point to the new kernel, so we'll do that as well.

*  cd /usr/src

*  mkdir kernel-source- (use an alternate name if you already

have a version of this kernel installed)

*  cp linux..tar.bz2 /usr/src/kernel-source-

*  cd /usr/src/kernel-source-

*  tar xjfv linux..tar.bz2

*  mv linux. /usr/src/linux-

*  rm linux (assuming that's a link to your old kernel)

*  ln -s /usr/src/linux- linux

If your kernel needs to be patched, do so now. Instructions are available

from Appendix A.

Configure the new kernel

Note Patch Your Kernel First

If you are using an old kernel you will need to patch it before you can

proceed. Instructions on patching your kernel are available from Appendix A. The 2.6.x series kernels do not need to be patched.

Now instead of using make menuconfig, I have an excellent alternative. Check

this out: copy your current .config file into /usr/src/linux. Now use "make

oldconfig". It will run through your old config file and see what's been

updated so that you don't have to find all the new options. For everything to

do with ACPI and your specific hardware (Toshibas choose the Toshiba options,

Asus choose the Asus options) choose M for module. There are about ten

different ACPI related options that you will need to select.

In point form, this is how the kernel should be configured:

*  cd /usr/src/linux

*  cp /usr/src//.config .config

*  make oldconfig (say M to all new options for ACPI--you can also say "Y"

if you prefer to compile it directly into your kernel)

Now go in to the config file with make menuconfig. I want you do check and

make sure you have your APM (the old stuff) turned off. Under "General Setup"

, make sure that:

*  Power Management Support is ON

*  APM (Advanced Power Management) is OFF (this is the old one--you don't

even want it as a module unless you really know what you're doing. And if you really know what you're doing you're probably not reading this.)

* everything to do with ACPI should be M (modules) or * (compiled directly

into the kernel). Read the list carefully. Some options will not apply to your hardware.

exit and save the new configuration

Compile the new kernel

If you have additional modules that are not part of the main source tree, you

will need to add modules-image when you make your Debian packages. This is

almost inevitable if you're using a laptop and an older kernel. Only my

nvidia graphics card now requires additional modules.

*  cd /usr/src/linux

*  make-kpkg clean

*  make-kpkg --append-to-version=. kernel-image modules-image

Note Naming kernel builds

I no longer use .date to distinguish kernel builds. It was too

frustrating to have 030627a, 032627b (etc) as I tried to figure things out. I now use names, in alphabetical order, starting with the kernel build "alien". I'm going to leave the date option in though as I still think it's a good way to do things. My current kernel, 2.6.6, is "Elrond." The machine itself is "Smeagol."

Note Kernel compile help

For non-Debian instructions see the Appendix "Appendix B".

For more information on how to compile the kernel The Debian Way please read Creating custom kernels with Debian's kernel-package system Install the new kernel

I like to configure lilo on my own, but do whatever tickles your fancy.

*  cd /usr/src

*  dpkg -i kernel-image-.-10.00.Custom-i386.deb At this

point I decline all the lilo updates and configure it myself by hand.

* configure lilo by hand: vi /etc/lilo.conf

*  load the new kernel into lilo: lilo

*  If you have any other deb files for your modules you should install

them now as well. If you're not sure check /usr/src for additional .deb files.

Note Kernel compile help

For non-Debian instructions see the Appendix "Appendix B".

For more information on how to compile the kernel The Debian Way please read Creating custom kernels with Debian's kernel-package system Reboot and test

At this point you should reboot your machine. When your system comes back up

(assuming of course that everything went well and you still have a system),

check to see what kernel you're running with uname -a. It should show you the

one you just built. You also need to make sure the correct patch was

installed. You can do that with dmesg | grep ACPI.*Subsystem revision . It

should give the output: ACPI: Subsystem revision 20021212. The revision is

the date the patch was released. This number will be different than mine if

you are not using the 2.4.20 kernel. To look at all ACPI-related bits that

were loaded/started when your system rebooted, do this: dmesg | grep ACPI .

dmesg prints your boot messages and grep ACPI makes sure that only

ACPI-related messages are printed.

You can also check to see what version you're using with cat /proc/acpi/info.

Don't believe everything you read though. My output says that S3 is a

supported state, but we already know it's not. It does give the correct

version though, which is useful.

Load related modules

Check to see that each of the ACPI modules have been loaded after your

machine boots. You can do this with the command lsmod. You are looking for

the following options: button, battery, fan, ac, thermal and processor. If

you chose "Y" instead of modules when you compiled your kernel, you will not

see this list. The output on my computer looks like this:

Module Size Used by Tainted: P

button 2420 0 (unused)

battery 5960 0 (unused)

ac 1832 0 (unused)

fan 1608 0 (unused)

thermal 6664 0 (unused)

processor 8664 0 [thermal]

1 2 3 4 5 6
Go to page:

Free ebook «ACPI: Advanced Configuration and Power Interface by Emma Jane Hogbin (english novels to read TXT) 📖» - read online now

Comments (0)

There are no comments yet. You can be the first!
Add a comment