public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Using ancient linux versions with crosstools-NG
@ 2013-05-03 12:11 Will Wagner
  2013-05-03 15:18 ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Will Wagner @ 2013-05-03 12:11 UTC (permalink / raw)
  To: crossgcc

Hello,

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?

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. What are the rules on what kernel versions a C library will work on?

Many thanks
Will

-- 
------------------------------------------------------------------------
Will Wagner                                     will_wagner@carallon.com
Development Manager                      Office Tel: +44 (0)20 7471 9224
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------


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

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

* Re: Using ancient linux versions with crosstools-NG
  2013-05-03 12:11 Using ancient linux versions with crosstools-NG Will Wagner
@ 2013-05-03 15:18 ` Yann E. MORIN
  2013-05-03 15:35   ` Will Wagner
  0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2013-05-03 15:18 UTC (permalink / raw)
  To: Will Wagner; +Cc: crossgcc

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,
though.

> 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...

Regards,
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  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

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

* Re: Using ancient linux versions with crosstools-NG
  2013-05-03 15:18 ` Yann E. MORIN
@ 2013-05-03 15:35   ` Will Wagner
  2013-05-03 15:48     ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Will Wagner @ 2013-05-03 15:35 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

Hi Yann.

On 03/05/2013 16:17, Yann E. MORIN wrote:
>>
>> 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.

Sorry, wasn't clear. Didn't want to add it back upstream. Was wondering 
if I could patch it locally and was wondering what is involved.

>
> You can still use a version of crosstool-NG that supported that feature,
> though.
>
>> 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...

Thanks. that's really helpful. To get round the problem with 2.6.14 not 
having make kernel_headers I'll try to use 2.6.19 and toolchain of that 
era but set the minimum supported kernel version to 2.6.14 and hopefully 
that won't be too bad for performance.

Given this I assume I'm better off using an older version for 
crosstool-ng rather than trying to patch the current version with older 
version of linux, binutils, gcc etc.

Regards
Will

-- 
------------------------------------------------------------------------
Will Wagner                                     will_wagner@carallon.com
Development Manager                      Office Tel: +44 (0)20 7471 9224
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------


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

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

* Re: Using ancient linux versions with crosstools-NG
  2013-05-03 15:35   ` Will Wagner
@ 2013-05-03 15:48     ` Yann E. MORIN
  0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2013-05-03 15:48 UTC (permalink / raw)
  To: Will Wagner; +Cc: crossgcc

Will, All,

On Fri, May 03, 2013 at 04:35:03PM +0100, Will Wagner wrote:
> On 03/05/2013 16:17, Yann E. MORIN wrote:
> >>
> >>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.
> 
> Sorry, wasn't clear. Didn't want to add it back upstream. Was wondering if I
> could patch it locally and was wondering what is involved.

Not sure, it's been a while that's been removed...

> Thanks. that's really helpful. To get round the problem with 2.6.14 not
> having make kernel_headers I'll try to use 2.6.19 and toolchain of that era
> but set the minimum supported kernel version to 2.6.14 and hopefully that
> won't be too bad for performance.

Maybe you won't even notice.

> Given this I assume I'm better off using an older version for crosstool-ng
> rather than trying to patch the current version with older version of linux,
> binutils, gcc etc.

Well, the "Minimum kernel version" will probably be enough for you.
Try to stick with an not-too-recent gcc and binutils, though.

Regards,
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  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

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

* Re: Using ancient linux versions with crosstools-NG
       [not found] <20130503181108.f955220426e7925665b5897d8ef6e12e.ca49a0dba2.wbe@email02.secureserver.net>
@ 2013-05-07 10:10 ` Will Wagner
  0 siblings, 0 replies; 5+ messages in thread
From: Will Wagner @ 2013-05-07 10:10 UTC (permalink / raw)
  To: roman; +Cc: crossgcc

Hi Roman,

I'm targeting powerpc. If you don't mind it would be great if you could 
send me your working config.

Thanks
Will

On 04/05/2013 02:11, roman@kolesnikov.mobi wrote:
> Hi,
>
> What is your target? I may have the combination of stable binutils,
> glibc, gcc for you. I have an existing product running 2.6.18 and have
> build the environment for the arm target. Let me know your target, I can
> dig you out the details. I have built the toolchain manually and with
> the older crosstool. I still have my notes.
>
> Roman
>
>     -------- Original Message --------
>     Subject: Using ancient linux versions with crosstools-NG
>     From: Will Wagner <will_wagner@carallon.com
>     <mailto:will_wagner@carallon.com>>
>     Date: Fri, May 03, 2013 5:11 am
>     To: crossgcc@sourceware.org <mailto:crossgcc@sourceware.org>
>
>     Hello,
>
>     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?
>
>     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. What are the rules on what kernel versions a C library will
>     work on?
>
>     Many thanks
>     Will
>
>     --
>     ------------------------------------------------------------------------
>     Will Wagner will_wagner@carallon.com <mailto:will_wagner@carallon.com>
>     Development Manager Office Tel: +44 (0)20 7471 9224
>     Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
>     ------------------------------------------------------------------------
>
>
>     --
>     For unsubscribe information see http://sourceware.org/lists.html#faq
>


-- 
------------------------------------------------------------------------
Will Wagner                                     will_wagner@carallon.com
Development Manager                      Office Tel: +44 (0)20 7471 9224
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------


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

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

end of thread, other threads:[~2013-05-07 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-03 12:11 Using ancient linux versions with crosstools-NG Will Wagner
2013-05-03 15:18 ` Yann E. MORIN
2013-05-03 15:35   ` Will Wagner
2013-05-03 15:48     ` Yann E. MORIN
     [not found] <20130503181108.f955220426e7925665b5897d8ef6e12e.ca49a0dba2.wbe@email02.secureserver.net>
2013-05-07 10:10 ` Will Wagner

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).