public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Building toolchain for 2.4.x target
@ 2013-11-13 16:00 Filipe Felisbino
  2013-12-01 20:19 ` Rob Landley
  0 siblings, 1 reply; 2+ messages in thread
From: Filipe Felisbino @ 2013-11-13 16:00 UTC (permalink / raw)
  To: crossgcc

Hello.

I'm using crosstool-ng(1.9.3) to create a toolchain that will target a
x86 2.4 kernel with a 2.3.2 glibc ( to build a legacy service ).

Here are some of the options in my .config:

CT_CC_VERSION="4.2.4"
CT_LIBC_VERSION="2.3.2"
CT_LIBC_glibc=y
CT_KERNEL_LINUX_CUSTOM_TARBALL="/home/.../Downloads/linux-2.4.22.tar.bz2"
CT_LIBC_GLIBC_MIN_KERNEL_VERSION="2.4.2"


Here is the output...

[ERROR]    configure: error: GNU libc requires kernel header files from
[CFG  ]    Linux 2.0.10 or later to be installed before configuring.
[CFG  ]    The kernel header files are found usually in /usr/include/asm and
[CFG  ]    /usr/include/linux; make sure these directories use files from
[CFG  ]    Linux 2.0.10 or later.  This check uses <linux/version.h>, so
[CFG  ]    make sure that file was built correctly when installing the
kernel header
[CFG  ]    files.  To use kernel headers not from /usr/include/linux, use the
[CFG  ]    configure option --with-headers.

I found out that there was no version.h in the linux includes
(~/x-tools/i686-nptl-linux-gnu/i686-nptl-linux-gnu/sys-root/usr/include/version.h)
so I copied it from my /usr/include/linux/version.h and changed it to
fit:
#define LINUX_VERSION_CODE 132098
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

the version code 132098 is equivalent to 2.4.2, but when I tried to
build it I got the same error. Then I noticed that the file wasn't
there anymore. What is the correct way to provide the version.h file
to the glibc's build?

Thank you

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Building toolchain for 2.4.x target
  2013-11-13 16:00 Building toolchain for 2.4.x target Filipe Felisbino
@ 2013-12-01 20:19 ` Rob Landley
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Landley @ 2013-12-01 20:19 UTC (permalink / raw)
  To: Filipe Felisbino; +Cc: crossgcc

On 11/13/2013 09:59:29 AM, Filipe Felisbino wrote:
> Hello.
> 
> I'm using crosstool-ng(1.9.3) to create a toolchain that will target a
> x86 2.4 kernel with a 2.3.2 glibc ( to build a legacy service ).

By far the easiest thing to do is grab an old Red Hat 9 image from 2003  
and build under qemu or kvm. That's where glibc 2.3.2 lived. :)

The one I uploaded to busybox for regression testing is still at:

   http://busybox.net/downloads/qemu

And it runs with "kvm -m 1024 rh9.img" or similar.

Login busybox password busybox (the root password is also busybox).  
Just hit enter if kudzu bothers you about configuration, the emulated  
gigabit ethernet adapter model number changed since that image was  
installed...

In general, for really old systems it's easier keeping an emulated  
build environment around than trying to reproduce old packages under  
current build environments. Whole lotta bit-rotting going on  
otherwise...

Rob
--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-01 20:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 16:00 Building toolchain for 2.4.x target Filipe Felisbino
2013-12-01 20:19 ` Rob Landley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).