Avatar of visalakshmi
visalakshmi
 asked on

compiling 2.6.15 on 2.6.27 kernel gives error

Hi All
i've ubuntu8.10 kernel 2.6.27 installed in my system.
I've to debug the kernel using kgdb, for that i searched on net and found that kgdb is avaliaible only for 2.6.15 kernel source.
so i downloaded 2.6.15 kernel source and did everything to compile it (i used the config file from the kernel installed in my machine having kernel 2.6.27)but in the compilatoin it is giving me the error:

include/asm/mpspec_def.h:78: warning: packed attribute ignored for field of type unsigned char[6]
arch/i386/kernel/apic.c: In function smp_apic_timer_interrupt:
arch/i386/kernel/apic.c:1136: sorry, unimplemented: inlining failed in call to smp_local_timer_interrupt: function body not available
arch/i386/kernel/apic.c:1205: sorry, unimplemented: called from here
make[1]: *** [arch/i386/kernel/apic.o] Error 1
make: *** [arch/i386/kernel] Error 2

Open in new window

Linux DistributionsLinux

Avatar of undefined
Last Comment
Duncan Roe

8/22/2022 - Mon
Duncan Roe

Just to be certain, when you say you used 2.6.27 config, you do mean that you copied .config and did a "make xconfig"? (or config make target of your choice) make oldconfig might not have done a good enough job for you - a lot changed between these 2 revs and you might have to reconfigure some stuff manually (including SATA disk support)
Duncan Roe

You should delete your previus Q before any experts post to it - much easier
visalakshmi

ASKER
yea i'ld do that.

and for your information i followed the steps as below:
start:
i got the source.
# bzip2 -d linux-source-2.6.15.tar.bz2
# tar xvf linux-source-2.6.15.tar
# ln -s linux-source-2.6.15 linux
# cp /boot/config-`uname -r` ./.config
make menuconfig (and changed nothing here)
# make bzImage
end.

Open in new window

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Duncan Roe

All looks OK, except:
You must have cd'd to the Linux source directory between lines 5 & 6. Did you do "cd linux" or "cd linux-source-2.6.15"?
Before line 5, did you do "rm linux"?

If not, here is a possible scenario:

linux is a symbolic link to linux-source-2.6.27
You do line 5. This does not report an error, but has created a symbolic link to linux-source-2.6.15 *underneath* linux-source-2.6.27
You do "cd linux", expecting that your current corking directory (CWD) is linux-source-2.6.15. But your CWD is in fact linux-source-2.6.27 (verify with "/bin/pwd").

I hope that's it, because I can't see anything else that looks at all wrong - except I would have expected a bunch of warnings from make menuconfig (you see them in the window you ran it from, typically not until after it's finished (because the menu window shades the command window)). There would be no warnings if your CWD was linux-source-2.6.27 however.
visalakshmi

ASKER
no dear this is not the case i did everything which is required for more details i referred this link which is for 2.6.27 but i did the same steps for my kernel 2.6.15 ok...........

http://beginlinux.wordpress.com/2008/12/03/how-to-compile-an-ubuntu-810-kernel/

Open in new window

Duncan Roe

I think I see the problem.
In the link you posted, there is a line (referring to /usr/src):

This directory will contain the necessary headers to build the kernel. These are the source files

Forget that advice - it is for building current kernel only. Download a generic kernel tarball from ftp.kernel.org or a mirror. Unpacked source file will be called linux-2.6.15.x (x version extension, may be multi-digit). There is no need to symbolic link to linux, might be best if you didn't

Then build as before (line 6 onwards). All should be OK
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
visalakshmi

ASKER
Hi,
i have tried with linux-2.6.15 without creating symbolic link also,but still i am getting the same error.
please suggest kgdb patch for kernel 2.6.27
Duncan Roe

Can you build ftp.kermel.org linux-2.6.15 unpatched with no error? Post .config if not.
Sorry I do not know anything about kgdb
ASKER CERTIFIED SOLUTION
Duncan Roe

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.