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

Problems getting linux APM provisions (0.5) on thinkpad 701cs



Howdy.  I'm hitting a wall applying stephen rothwell's apm patches for
linux power management provisions on my thinkpad 701cs, and am
wondering if any of you out there have any suggestions.  (Those of you
on the thinkpad mailing list not interested in linux will probably
want to skip this message.)

I'm working with 0.5 of his APM package, applying to 1.2.13 of the
linux kernel within a Slackware 3.0 distribution.

I'm getting undefined references to `_apm_bios_entry' when the kernel
is linking - here's the relevant excerpt from the conclusion of the
build process:

ld -m elf_i386 -Ttext 0x100000 -e startup_32  arch/i386/kernel/head.o init/main.o init/version.o \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o net/net.o ipc/ipc.o \
        fs/filesystems.a \
        drivers/block/block.a drivers/char/char.a drivers/net/net.a drivers/scsi/scsi.a arch/i386/math-emu/math.a \
        /usr/src/linuxelf-1.2.13/lib/lib.a -o vmlinux
apm_bios.o(.text+0x2c): undefined reference to `_apm_bios_entry'
apm_bios.o(.text+0x8e): undefined reference to `_apm_bios_entry'
apm_bios.o(.text+0xea): undefined reference to `_apm_bios_entry'
apm_bios.o(.text+0x143): undefined reference to `_apm_bios_entry'
apm_bios.o(.text+0x1ba): undefined reference to `_apm_bios_entry'
apm_bios.o(.text+0x75a): more undefined references to `_apm_bios_entry' follow
make: *** [vmlinux] Error 1

Unfortunately, i don't have the log of line where apm_bios.c was
compiled, and have no more time this weekend to probe this.

I did apply the kernel patch, and deposited the apm_bios.[hc] files in
the specified places.  There was a glitch applying the kernel patch -
two rejected spots in arch/i386/kernel/head.S, which i reconciled
manually.  Assuming my reconciliation was correct, i've attached my
stab at a rectified patch at the bottom of this message.

I'd love to get this stuff working - i've got the thinkpad running
unix, and on the net, and being able to unplug it and take it with me
is very appealing, but the corruption that comes with suspend (any
kind of suspend, even when going to the thinkpad easy-setup menus) is
a real spoiler.

ken manheimer		klm@cnri.reston.va.us		  (703) 620-8990 x259
	Corporation for National Research Initiatives
		1895 Preston White Drive, Suite 100
			Reston, VA 22091

Here's my attempted reconciliation of head.S:

*** head.S      Sun Nov  5 00:45:24 1995
--- head.S.orig Wed Aug 16 14:53:26 1995
***************
*** 10,16 ****

  .text

- #include <linux/config.h>
  #include <linux/tasks.h>
  #include <linux/fd.h>
  #include <linux/linkage.h>
--- 10,15 ----
***************
*** 339,349 ****
        ALIGN
  .word 0
  gdt_descr:
! #ifdef CONFIG_APM
!       .word (11+2*NR_TASKS)*8-1
! #else
!       .word (8+2*NR_TASKS)*8-1
! #endif
        .long 0xc0000000+SYMBOL_NAME(gdt)

  /*
--- 338,344 ----
        ALIGN
  .word 0
  gdt_descr:
!       .word (8+2*NR_TASKS)*8-1
        .long 0xc0000000+SYMBOL_NAME(gdt)

  /*
***************
*** 360,367 ****
        .quad 0x0000000000000000        /* not used */
        .quad 0x0000000000000000        /* not used */
        .fill 2*NR_TASKS,8,0            /* space for LDT's and TSS's etc */
- #ifdef CONFIG_APM
-       .quad 0x00c09a0000000000        /* APM CS    code */
-       .quad 0x00809a0000000000        /* APM CS 16 code (16 bit) */
-       .quad 0x00c0920000000000        /* APM DS    data */
- #endif
--- 355,357 ----