Hi All,
I'm looking for some help compiling some software to run under an older
kernel than the one running on my system. I've Googled and Google Grouped
this subject, but most of the articles/posts are about kernel compiling,
rather than compiling software. Although I have a specific use for this
procedure in mind, I am curious as to how this is done in general.
Specs:
Host system: Core Linux (http://coredistro.sourceforge.net) running kernel
2.4.19, gcc 3.0.3, make 3.79.1 - Celeron 700, 512Mb RAM etc.
Target system: Freesco (http://www.freesco.org) 0.2.7 router running kernel
2.0.38 (I'm told), gcc and make not included - P60, 32Mb RAM etc
My specific use is: I want to compile thttpd-2.20c
http://www.acme.com/software/thttpd/ for a Freesco 0.2.7 router system. I
have compiled, made, installed and tested my tweaked thttpd-2.20c server
under kernel 2.4.19 successfully. But when I try to run the version compiled
under 2.4.19 on my Freesco box it returns the error: thttpd: No such file or
directory. The Freesco forum suggested that this could be due to compiling
under a different kernel then the one it was being run under. (It seemed
more like a file system error to me though.)
As Freesco doesn't have make/gcc etc. I want to use my Core Linux system to
compile the software. (I cannot use the packaged versions of thttpd that are
available for Freesco because there are some compile-time tweaks I want to
make.) I assume one way round this problem would be to compile and boot
using the 2.0.38 kernel, compile thttpd and then restart using the 2.4.19
kernel. However, I'm sure that there was an easier way - there usually is
with Linux.
So, I have downloaded the kernel source for version 2.0.38 to my Core Linux
system, unzipped it to /usr/src/linux-2.0.38 and changed the sysmlink
/usr/src/linux to point to this new directory rather than the 2.4.19 kernel
source. thttpd uses a fairly standard configure script, which I have run in
the following ways:
./configure --prefix=/safe --target=i386-pc-linux-gnu
./configure --prefix=/safe --target=i386-pc-linux-gnu --includedir=/usr/src/
linux/include
./configure --prefix=/safe --target=i386-pc-linux-gnu --includedir=/usr/src/
linux/include --libdir=/usr/src/linux/lib
(admittedly this last one was a long shot ;-) ) However, the compiled
binaries are always the same size as when compiled under 2.4.19, leading me
to believe that what I'm trying is not the right way.
If anyone has any useful links on this subject, or can otherwise help out,
I'd be grateful.
Cheers, and sorry for the long post.
Tony Whitmore