Using ancient linux versions with crosstools-NG

Fri May 3 15:18:00 GMT 2013

Will, All,

On Fri, May 03, 2013 at 01:11:51PM +0100, Will Wagner wrote:
> I have some hardware that is stuck with an old kernel (2.6.14).
> I'd like to update the toolchain for this but the old kernel version
> presents some challenges.
> The main problem I hit is that the kernel source doesn't support the make
> kernel_headers rule. Older crosstools-ng (~1.2) supported kernels this old
> so maybe it's possible to add back in support?

No, we're not adding back support for so old kernels in crosstool-NG.

You can still use a version of crosstool-NG that supported that feature,

> Can anyone give any advice on how to tackle this issue? Would it be possible
> to build my user space against a 2.6.19 kernel (first version that has
> make_headers) and then expect that to run against an older kernel.

If you're using (e)glibc, then you can use a recent kernel to build the
toolchain, and run an older kernel, provided you configure (e)glibc with
suport for the older kernel with:
    C-library  --->
        Minimum supported kernel version  -->  Specific kernel version
        (X.Y.Z) Minimum kernel version to support

> What are
> the rules on what kernel versions a C library will work on?

Baically, with the above settings, any combination. But be aware that
running a newer toolchain on an ancient kernel will maybe cause less
than optinal runtime, as the libc will have to provide its own
implementations of somne kernel features (in userland instead of kernel
land), which might be slower.

The sane rules are:
  - build the toolchain with the kernel you expect to run on;
  - run the same generation of kernel as the one o built the
    toolchain with.

Also, keep in mind that you should use tools of the same era. For
example, using a gcc, binutils and C library that were current at the
time the kernel you're using was released. Ie. mixing old tools with
newer ones is probably not a good idea...

Yann E. MORIN.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

For unsubscribe information see

More information about the crossgcc mailing list