LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Kernel compile error/system hangs, APIC/ACPI (https://www.linuxquestions.org/questions/linux-hardware-18/kernel-compile-error-system-hangs-apic-acpi-77743/)

taids 07-31-2003 01:42 PM

Kernel compile error/system hangs, APIC/ACPI
 
Hey,

First off, sorry if this is an unappropriate area to post, but I feel that ACPI is kind of hardware related, and a lot of other questions to do with it seemed to appear in the search results under this area.

Anyways, my problem....

In short:

2.4.21 kernel (+ACPI 2.4.21 patch) compiles but system hangs on boot, 2.4.21 kernel (+ACPI 2.4.21 patch) won't compile with APIC support disabled

Detailed explanation:

In an effort to get power management (specifically some kind of battery monitor/status indicator) support under Linux on my laptop, I looked into kernel compilation to add support for my requirements..

I installed Slackware 9; this prooved to be the best distribution I had found for the most support (devices, full screen console, etc), but running anything to do with APM would give errors stating that there was no APM support in the kernel.

anyway, after recompiling my kernel with APM support, I found out that what I needed was ACPI support instead, so I downloaded the ACPI 2.4.21 patch for my kernel, and applied it, then recompiled with ACPI support.

This all went well until I rebooted with the new kernel. Now it hangs on a line saying:

Executing all Device _STA and_INI Methods:....

after some research, I read that some people suggested disabling Local APIC support in the kernel and it should sort the problem. I re-ran the kernel configurator, and couldn't find any options for APIC, so I manually edited the .config file, and found the line:
CONFIG_X86_LOCAL_APIC=y

and changed it to

CONFIG_X86_LOCAL_APIC=n

make dep, make modules, and make modules_install all go smoothly without any errors, but make bzImage goes fine for a while but then chokes with loads of errors, which all appear to be undefined reference to '<some function>' in kernel.o (and also some other files like lib.a and drivers.o)

can anyone suggest a fix for this problem, or a work around? or any reasons for the problem occuring?

Brief details of my hardware/software:

Slackware 9 (stable)
Compaq/HP Evo nx9005
Athlon XP 2000+
256MB RAM


I can supply more detailed information/output if necessary,
Thanks in advance.

taids 08-01-2003 12:39 PM

alas no luck
 
I'm still no closer to finding a solution to this problem, so I'm downloading the 2.4.18 kernel and I'm hoping it will compile with no problems; perhaps I should go for a newer kernel instead, but they still seem to be in development.

Maybe there is another solution for the kernel hanging problem, rather than trying to disable local APIC?

Initially, I thought I had success by telling the kernel to use a second PCI configuration (in LILO):
append "pci=conf2"

The kernel didn't hang and booted up normally, but only later did I realise that it was booting because the PCI devices weren't initialising at all. Does this means the problem is PCI related? I've also tried things such as pci=noacpi, noapic, but they don't help either :(

Any suggestions/advice greatly appreciated! :cry:

taids 08-01-2003 02:24 PM

Well, I've now tried to compile with 2.4.18 kernel, and I am getting the same errors, so I'm not really sure what my next course of action is....

Heres some of the output if anyone can advise on it...

net/network.o(.text+0x22bd): In function `socket_get_info':
: undefined reference to `smp_num_cpus'
net/network.o(.text+0x248b): In function `_text_lock_socket':
: undefined reference to `kernel_flag'
net/network.o(.text+0x875d): In function `dev_proc_stats':
: undefined reference to `smp_num_cpus'
net/network.o(.text+0x8816): In function `dev_proc_stats':
: undefined reference to `smp_num_cpus'
net/network.o(.text+0x123cd): In function `rt_cache_stat_get_info':
: undefined reference to `smp_num_cpus'
net/network.o(.text+0x12490): In function `rt_cache_stat_get_info':
: undefined reference to `smp_num_cpus'
net/network.o(.text+0x16842): In function `fold_prot_inuse':
: undefined reference to `smp_num_cpus'
net/network.o(.text+0x16983): more undefined references to `smp_num_cpus' follow
net/network.o(.text+0x4dd5e): In function `rpciod':
: undefined reference to `kernel_flag'
net/network.o(.text+0x4e894): In function `_text_lock_sched':
: undefined reference to `kernel_flag'
/root/kernelstuff/linux-2.4.18/arch/i386/lib/lib.a(delay.o)(.text+0x8c): In func
tion `__udelay':
: undefined reference to `cpu_data'
/root/kernelstuff/linux-2.4.18/arch/i386/lib/lib.a(delay.o)(.text+0xb6): In func
tion `__const_udelay':
: undefined reference to `cpu_data'
/root/kernelstuff/linux-2.4.18/lib/lib.a(brlock.o)(.text+0x4): In function `__br
_write_lock':
: undefined reference to `smp_num_cpus'
/root/kernelstuff/linux-2.4.18/lib/lib.a(brlock.o)(.text+0x20): In function `__b
r_write_lock':
: undefined reference to `smp_num_cpus'
/root/kernelstuff/linux-2.4.18/lib/lib.a(brlock.o)(.text+0x34): In function `__b
r_write_unlock':
: undefined reference to `smp_num_cpus'
/root/kernelstuff/linux-2.4.18/lib/lib.a(brlock.o)(.text+0x4e): In function `__b
r_write_unlock':
: undefined reference to `smp_num_cpus'
make: *** [vmlinux] Error 1

:(

Minoru 08-09-2003 02:59 PM

I have the same problem as you in a HP Pavilion ze4334EA laptop. I've compiled kernel-2.4.18, 2.4.20, 2.4.21, 2.6.0-test1 and 2.6.0-test2 in order to find a functional kernel with acpi support (I thought that was a kernel version problem), but the kernel hangs on boot showing:

Executing all Device _STA and_INI Methods:....


Note: In windows works perfectly :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:

taids 08-09-2003 06:07 PM

Indeed, Wind0ws was indeed fine.

I'm sure the solution is as simple as just including the missing (header?) files somewhere before it gets compiled. I'm not sure exactly which file(s), but I've done some searching through the source and usually for each function with an error, it comes up with between 1 - 5 files, e.g.

grep -l -r "undefined_ref_name_here" /usr/src/linux/*

I haven't had any luck in finding a patch for any version of the kernel source, via google. Geocrawler has some kind of useful archives, but no actual solution (that I've found)

alas. :(

Minoru 08-11-2003 10:20 AM

I am begining to think that there's no solution xDD. Maybe nobody else knows this problem. What will we do? I can't program something like ACPI xDDDDD (but anyway, I've started to read the kernel code).
---NEED HELP!!!!!---

Zappa 08-11-2003 10:36 AM

I've got a Compaq EVO N610c and it runs with the 2.4.21 kernel with full ACPI support within the kernel, so far no problems at all.

All I did was gettin the lastest kernel from Slackware and config it and recompile.

/Zappa

Minoru 08-11-2003 11:21 AM

I did de same in debian, but it didnīt work. Nothing else...

taids 08-11-2003 03:29 PM

if this is any use

I've got a full list of errors churned out by make bzImage, using:

make bzImage 2> errors.txt

Hope that helps (if anyone is on their way to a solution)

Minoru 08-11-2003 03:50 PM

I don't remember my bzImage compiling with so many errors. Anyway, the result is the same xDDDD :

Executing all Device _STA and_INI Methods:....
(and then: x_x )

This is scary xDD.

Minoru 08-20-2003 08:25 AM

Still doesn't work
 
I tried to use kernel-2.6.0-test1, test2 and test3 and after compiling, the result is the same :(. Has anybody solved his problem? I think that there won't be ACPI support in my laptop (...uinstall linux??.... :(:(:(:(:(:().

adz 08-20-2003 09:57 AM

I don't think this will cause hangs but if you enable symmetric multiprocessing then it disables APM and possibly even ACPI (even if you ony have one processor). A possibility however slim.

taids 08-20-2003 12:16 PM

The solution....
 
Well, I think I've found the solution, but I can't say for sure, I can only say that it seems to have solved the problems for me....

if you get a newer version of the kernel source (I got 2.4.22-pre9 patch, due to getting some new Netgear WG511 wireless card drivers working), there is an option for 'relaxed AML checking', enabling this (under the ACPI settings), seems to stop the kernel from hanging at boot after that message! which means that the system boots, and most of the ACPI stuff works! and you don't need to disable any of the APIC stuff at all :)

I'm still having a few problems, since some of the ACPI stuff isn't working, like I can't get the battery charge percentage via /proc/acpi, but under X, battery charge monitors work, like gnome battery applet, and KDE laptop monitor (kdelaptopdeamon?) :)

I hope this works for you all.

helmut_hed 08-21-2003 03:31 PM

Yikes, sorry to hear about your troubles.
My SuSE 8.2 works fine on my laptop with acpi enabled, battery indicator working, etc. I have an XP too. That's a 2.4.20 kernel.
I can look at parameters if you want...

Minoru 08-23-2003 06:11 AM

YES! IT WORKS!
 
With kernel-2.4.22-pre9 it seems to work. I can get the battery charge percentage both in console mode and in KDE. I have debian (testing, Sarge) distribution with the acpi package installed, so I can see all acpi settings with "acpi" command (temperature, battery charge, etc).

Thanks a lot!!


All times are GMT -5. The time now is 04:39 AM.