Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
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'm trying to compile a 2.4.37 kernel, however it comes up with an error saying the GCC version should be less than 4.2 .
The question is if I were to compile and install GCC 3.3.x in the /opt directory, how would I get the kernel to use the GCC installed there instead of GCC 4.2 which is in /usr/bin?
On Debian, I've just replaced the symlink from /usr/bin/gcc from /usr/bin/gcc-4.2 to /opt/gcc-3.X. Not sure if that'll do it on Slackware, or if you also have to change some library paths...
( make CC=gcc34 , ... if you make a link to e.g. /usr/bin/ )
.....
For kernel compilation it may be necessary to replace the
/usr/bin/gcc link temporarely, like said by pljvaldez.
.....
After a bit of reading around it appears I also require "i486-slackware-linux"
for the version of gcc i'm trying to install in /usr/lib/gcc and luckly this was
distributed with a slackware version, so downleaded the *.tgz package, extracted
the folder and placed it in /usr/lib/gcc/i486-slackware-linux .
(Did gcc -v to get the above and modified it for 3.3.6) also doing this speeded
up compilation drastically compared to when I tried to compile 4.1.2 using just
~/gcc-4.1.2/configure --prefix=/opt only.
It also appears to compile the kernel I had to amend the CROSS_COMPILE in the Makefile as per below.
CROSS_COMPILE = /opt/gcc/bin/
Also symlink the following to point to : -
ar -> /usr/bin/ar
as -> /usr/bin/as
ld -> /usr/bin/ld
objcopy -> /usr/bin/objcopy
Job done!
tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage
Root device is (22, 3)
Boot sector 512 bytes.
Setup is 2513 bytes.
System is 1038 kB
warning: kernel is too big for standalone boot from floppy
Any ideas why 1038kB is too big for a floppy when a floppy can hold nearly 1474kB?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.