Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-22-2004, 01:43 PM   #1
LQ Newbie
Registered: Jun 2004
Distribution: gentoo
Posts: 2

Rep: Reputation: 0
compiling kernel 2.2.26 on a recent distro

Hi All,

I am trying to compile the latest 2.2 kernel (2.2.26) for an embedded system (386 processor class).

I am using an up-to-date gentoo with gcc 3.3.2 and kernel 2.4.26 SMP.
I have also tried compiling 2.2.25 and 2.2.23 with similar problems on a RedHat based system as well (with similar errors).

*** make output ***
divinity linux-2.2.26 # make bzImage
cc -D__KERNEL__ -I/root/linux-2.2.26/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -D__SMP__ -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -c -o init/main.o init/main.c
`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
cc1: warning: -malign-loops is obsolete, use -falign-loops
cc1: warning: -malign-jumps is obsolete, use -falign-jumps
cc1: warning: -malign-functions is obsolete, use -falign-functions
In file included from /root/linux-2.2.26/include/linux/string.h:37,
from /root/linux-2.2.26/include/linux/signal.h:64,
from /root/linux-2.2.26/include/linux/sched.h:23,
from /root/linux-2.2.26/include/linux/mm.h:4,
from /root/linux-2.2.26/include/linux/slab.h:14,
from /root/linux-2.2.26/include/linux/malloc.h:4,
from /root/linux-2.2.26/include/linux/proc_fs.h:5,
from init/main.c:15:
/root/linux-2.2.26/include/asm/string.h:476:17: missing terminating " character
*** end make output ***

I am confused as to why pristine released kernel sources don't cleanly complie. I ran a make mrproper ; make menuconfig ; make dep before I performed the make bzImage. In this example, I didn't do any configuration so I know that the cpu type is set wrong.

Can anyone shed some light on what might be happening?

Thanks in Advance,

Last edited by syrekron; 06-22-2004 at 01:46 PM.
Old 06-22-2004, 03:11 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Some of my gray cells claim that older kernels
NEED to be compiled with a 2.95.3 or, even
better, egcs compiler ...

Haven't recompiled a 2.2 kernel since late 2000, though.

Old 06-23-2004, 10:06 AM   #3
LQ Newbie
Registered: Jun 2004
Distribution: gentoo
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the tip.

I installed gcc 2.95.3 and got to work.

I believe my current difficulty is the linux include files (installed in /usr/include/linux). gcc 2.95.3 now complains about using them (I'm guessing 2.4 vintage) when trying to compile my 2.2 series kernel.

How would I go about overriding the include directory for the linux headers?

I have tried moving the /usr/include/linux directory to a backup location so that gcc won't look in it and then tried the following command:

make CC=/root/gcc/bin/gcc INCLUDE=/root/linux-2.2.26/include bzImage

The complier still doesn't know where to find the include files.

I've tried copying the contents of /linux-2.2.26/include/linux into the default /usr/include/linux directory (made a backup, of course) but that didn't work either. The build process complained about specific header files being in the wrong locations. I would think there would be a way to do this without having to klober my system include directory...

FYI, here is the command that make issues:
/root/gcc/bin/gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -m386 -DCPU=386 -c -o init/main.o init/main.c

Any further help would be deeply apprecieated!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FC3 (with recent kernel update) CUPS problem dinkydarko Fedora 4 03-10-2005 12:05 AM
I/O problems with CD-ROM after recent (04JAN05) kernel update kirill_igum Fedora 2 01-05-2005 12:39 PM
fairly recent, no X distro? stabu Linux - Distributions 8 05-12-2004 06:48 AM
vmware recent kernel support? Present Linux - Software 2 04-07-2004 03:26 PM
recent debian distro/base files/ net install ? mvbv-linux Debian 1 01-08-2004 10:15 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration