[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cannot rebuild kernel with custom DSDT



Taylor Brown wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

I have a Toshiba L640 laptop that came with a buggy DSDT that prevents
Linux from recognizing the battery. I filed bug #609846 about this and
am following similar reports on the Linux and Launchpad mailing lists:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609846

https://bugzilla.kernel.org/show_bug.cgi?id=34532
https://bugzilla.kernel.org/show_bug.cgi?id=15707

https://bugs.launchpad.net/bugs/703302


As a workaround, I am trying to rebuild the Debian kernel with a
modified DSDT file. I have edited and recompiled the DSDT file per the
following tutorial:

http://techinterplay.com/fix-toshiba-battery-issue-linux.html

That is, I changed "OperationRegion (EMEM, SystemMemory, 0xFF808001,
0xFF)" to
"OperationRegion (EMEM, EmbeddedControl, 0x00, 0xFF)" as well as the
"length" lines. It compiles with zero errors and five warnings.


I followed exactly the instructions on the Debian Wiki page about
overriding the dsdt and rebuilding the official kernel:

http://wiki.debian.org/OverridingDSDT


The compilation fails. I have never (successfully ;-)) compiled a kernel
before, so I would appreciate any advice. Below I have reproduced
exactly the sequence of commands that I tried for the rebuild:

$ apt-get source linux-2.6
$ cd linux-2.6-2.6.32/
$ dch --local +dsdt

/* added comment "custom dsdt" to changelog */


$ vim debian/config/defines

/* changed line from "abiname: 5" to "abiname: dsdt" */


$ make -f debian/rules source-all

/* exited with expected status: */

This target is made to fail intentionally, to make sure
that it is NEVER run during the automated build. Please
ignore the following error, the debian/control file has
been generated SUCCESSFULLY.


$ fakeroot make -f debian/rules.gen setup_amd64_none_amd64
$ cd debian/build/build_amd64_none_amd64/
$ vim .config

/*
changed "CONFIG_STANDALONE=n" to "CONFIG_STANDALONE=y"

changed "# CONFIG_ACPI_CUSTOM_DSDT is not set" to
"CONFIG_ACPI_CUSTOM_DSDT=y"

added ''CONFIG_ACPI_CUSTOM_DSDT_FILE="/root/dsdt/dsdt-fixed.hex""
*/


$ cd ../../..
$ fakeroot make -f debian/rules.gen binary-arch_amd64 binary-indep
DEBIAN_KERNEL_JOBS=4

/*
make fails and exits with error 2. here are the final lines of output
leading up the the error:
*/

  CC [M]  fs/xfs/linux-2.6/xfs_xattr.o
  CC [M]  fs/xfs/support/debug.o
  CC [M]  fs/xfs/support/uuid.o
  LD [M]  fs/xfs/xfs.o
  LD      fs/built-in.o
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/taylor/src/linux-2.6-2.6.32/debian/build/build_amd64_none_amd64'
make[1]: *** [debian/stamps/build_amd64_none_amd64_plain] Error 2
make[1]: Leaving directory `/home/taylor/src/linux-2.6-2.6.32'
make: *** [binary-arch_amd64_none_amd64_real] Error 2


Was this error caused by the custom dsdt, by some improper command or
setting, or by a bug in the source?

I'm running an up-to-date installation of Debian GNU/Linux 6.0.1
(squeeze) with the current kernel, 2.6.32-5-amd64. If I can provide any
additional information, let me know, and thanks in advance.



The error info. is not too helpful.
If it were happening to me, I would try the compile again with the make-kpkg command, part of kernel-package:

make-kpkg --revision <something> --append-to-version <something else> --initrd kernel_image

Hugo



















Reply to: