Linux - GeneralThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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,
/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?
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