Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] init segfaults when compiled with glibc
@ 2010-03-31 10:47 Sasha Sirotkin
  2010-03-31 18:52 ` Thomas Petazzoni
  0 siblings, 1 reply; 20+ messages in thread
From: Sasha Sirotkin @ 2010-03-31 10:47 UTC (permalink / raw)
  To: buildroot


On Tue, Mar 30, 2010 at 11:34 PM, Thomas Petazzoni 
<thomas.petazzoni@free-electrons.com> wrote:

    Hi Sasha,

    On Tue, 30 Mar 2010 23:03:55 +0300
    Sasha Sirotkin <buildroot@browserseal.com> wrote:

    > It looks like glibc does not work at all with buildroot right now.
    > Should I open a bug ticket or something?

    Unfortunately, without more details, a bug report would be fairly
    useless. Can you send your Buildroot .config and kernel .config so that
    I can try to reproduce your problem on my AT91 systems ?

Attached please find both config files. 
Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildroot.config.bz2
Type: application/x-bzip
Size: 3643 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100331/a0cc21e1/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kernel.config.bz2
Type: application/x-bzip
Size: 7096 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100331/a0cc21e1/attachment-0003.bin>

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Buildroot] init segfaults when compiled with glibc
@ 2010-03-30 20:03 Sasha Sirotkin
  2010-03-30 20:34 ` Thomas Petazzoni
  0 siblings, 1 reply; 20+ messages in thread
From: Sasha Sirotkin @ 2010-03-30 20:03 UTC (permalink / raw)
  To: buildroot





On Tue, Mar 30, 2010 at 7:58 PM, Yann E. MORIN 
<yann.morin.1998@anciens.enib.fr> wrote:

    Sasha, All,

    On Tuesday 30 March 2010 16:26:14 Sasha Sirotkin wrote:
     > On Tue, Mar 30, 2010 at 4:20 PM, Yann E. MORIN
     > <yann.morin.1998 at anciens.enib.fr
    <mailto:yann.morin.1998@anciens.enib.fr>> wrote:
     >     On Tuesday 30 March 2010 142701 Sasha Sirotkin wrote:
     >      > I compiled an external toolchain with glibc support using
     >     crosstools-ng
     >      > as recommended. I managed to compile buildroot without any
    issues.
     >      > However, when I try to use the resulting image /sbin/init
    segfaults.

    Standard init, or busybox' ?

     >      > With uclibc there are no such issues. I'm using the latest
     >     versions of
     >      > everything on ARM with EABI.

    In crosstool-NG, there's a sample that is quite up-to-date and that
    builds
    an arm-unknown-linux-gnueabi:
    # ct-ng show-arm-unknown-linux-gnueabi
    arm-unknown-linux-gnueabi  [l  ]
       OS             : linux-2.6.31.12
       Companion libs : gmp-4.3.1 mpfr-2.4.2 libelf-0.8.12
       binutils       : binutils-2.19.1
       C compiler     : gcc-4.3.2 (C,C++,Fortran,Java)
       C library      : glibc-2.9
       Tools          : sstrip dmalloc-5.5.2 duma-2_5_15 gdb-6.8
    ltrace-0.5.3 strace-4.5.19

     >     By default, gcc will emit armv5t instructions. What's your
    target CPU?
     >     init segfaulting can be a symptom of using a bad instruction
    set, so if
     >     your CPU is armv4, and you did not tell gcc to default to
    armv4, then
     >     you will hit this segfault issue.
     > As I already mentioned, it works fine with uClibc, so it is
    definitely
     > not a CPU instructions issue. At any rate, my CPU is AT91, i.e.
    armvte
     > instruction set.

    Ahem. Right, sorry.

    I'll read you back on crossgcc... :-)



It happens with both busybox and standard init.

Compilation of crossgcc with EABI work OK, but than I got this 
segmentation fault issue...

It looks like glibc does not work at all with buildroot right now. 
Should I open a bug ticket or something?

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Buildroot] init segfaults when compiled with glibc
@ 2010-03-30 14:26 Sasha Sirotkin
  2010-03-30 16:58 ` Yann E. MORIN
  2010-03-30 22:20 ` Eric BENARD
  0 siblings, 2 replies; 20+ messages in thread
From: Sasha Sirotkin @ 2010-03-30 14:26 UTC (permalink / raw)
  To: buildroot



On Tue, Mar 30, 2010 at 4:20 PM, Yann E. MORIN 
<yann.morin.1998@anciens.enib.fr> wrote:

    Sasha, All,

    On Tuesday 30 March 2010 142701 Sasha Sirotkin wrote:
     > I compiled an external toolchain with glibc support using
    crosstools-ng
     > as recommended. I managed to compile buildroot without any issues.
     > However, when I try to use the resulting image /sbin/init segfaults.
     > With uclibc there are no such issues. I'm using the latest
    versions of
     > everything on ARM with EABI.

    By default, gcc will emit armv5t instructions. What's your target CPU?
    init segfaulting can be a symptom of using a bad instruction set, so if
    your CPU is armv4, and you did not tell gcc to default to armv4, then
    you will hit this segfault issue.



As I already mentioned, it works fine with uClibc, so it is definitely 
not a CPU instructions issue. At any rate, my CPU is AT91, i.e. armvte 
instruction set.

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Buildroot] init segfaults when compiled with glibc
@ 2010-03-30 12:27 Sasha Sirotkin
  2010-03-30 13:20 ` Yann E. MORIN
  0 siblings, 1 reply; 20+ messages in thread
From: Sasha Sirotkin @ 2010-03-30 12:27 UTC (permalink / raw)
  To: buildroot

I compiled an external toolchain with glibc support using crosstools-ng 
as recommended. I managed to compile buildroot without any issues. 
However, when I try to use the resulting image /sbin/init segfaults. 
With uclibc there are no such issues. I'm using the latest versions of 
everything on ARM with EABI.

Any suggestions ?

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

end of thread, other threads:[~2010-04-01  7:48 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31 10:47 [Buildroot] init segfaults when compiled with glibc Sasha Sirotkin
2010-03-31 18:52 ` Thomas Petazzoni
2010-03-31 20:05   ` Alexander Sirotkin
  -- strict thread matches above, loose matches on Subject: below --
2010-03-30 20:03 Sasha Sirotkin
2010-03-30 20:34 ` Thomas Petazzoni
2010-03-30 14:26 Sasha Sirotkin
2010-03-30 16:58 ` Yann E. MORIN
2010-03-30 22:20 ` Eric BENARD
2010-03-31 14:18   ` Alexander Sirotkin
2010-03-31 14:37     ` Javier Viguera
2010-03-31 15:48       ` Alexander Sirotkin
2010-03-31 18:11         ` Peter Korsgaard
2010-03-31 18:28           ` Sasha Sirotkin
2010-03-31 18:58             ` H Hartley Sweeten
2010-03-31 19:02               ` Sasha Sirotkin
2010-03-31 19:16             ` Thomas Petazzoni
2010-03-31 20:21               ` Alexander Sirotkin
2010-04-01  7:48       ` Alexander Sirotkin
2010-03-30 12:27 Sasha Sirotkin
2010-03-30 13:20 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox