* Stuck with AVR32 segfaults in init
@ 2008-03-11 22:46 Geoffrey Wossum
2008-03-11 23:23 ` Richard Purdie
0 siblings, 1 reply; 8+ messages in thread
From: Geoffrey Wossum @ 2008-03-11 22:46 UTC (permalink / raw)
To: Openembedded-devel
Hi all,
I can't seem to get past a problem with init segfaulting at boot time on my
AVR32 board. Here's the error I get:
Freeing init memory: 64K (90000000 - 90010000)
init[1]: segfault at 00000008 pc 2aaabc84 sp 7fec2f30 ecr 24
init has generated signal 11 but has no handler for it
Kernel panic - not syncing: Attempted to kill init!
I started out using the toolchain already in OE. This was:
binutils 2.17.atmel.0.0.99 20060623
gcc 4.1.2-atmel.1.1.0
uClibc 0.9.28-avr32-20061019 (or somesuch)
It was suggested I move up to uClibc 0.9.29, so I got that working quickly.
No dice. Exact same error.
I tried passing init=/bin/sh, and that segfaulted with almost exactly the same
error message, so it seems to be a more general problem than with sysvinit.
Now, Atmel's buildroot for the AVR32 version 2.1.0 can build a fully bootable
image (with a little prodding). It uses:
binutils 2.17.atmel.0.0.99 20060623
gcc 4.2.1-atmel.1.0.3
uClibc 0.9.29-atmel.1 (or somesuch)
So I hacked around a little bit, and got OE setup with:
binutils 2.17.atmel.0.0.99 20060623
gcc 4.2.1-atmel.1.0.3
uClibc 0.9.29-atmel.1
That ought to work the same. No, same exact error. Comparing the source code
of the tool chains, binutils and uClibc are the same, but gcc is only ALMOST
the same. I don't think the differences I found impact this problem, but
here they are:
--- gcc-4.2.1/gcc/config/avr32/avr32.c 2007-10-16 03:21:32.000000000 -0500
+++ /home/geoff/src/buildroot-avr32-v2.1.0/toolchain_build_avr32_nofpu/gcc-4.2.1/gcc/config/avr32/avr32.c
2008-02-25 09:09:42.000000000 -0600
@@ -705,8 +705,8 @@
{
if (avr32_const_ok_for_constraint_p (mi_delta, 'I', "Is21"))
{
- fprintf (file, "\tsub\t%s, -0x%x\n", reg_names[this_regno],
- mi_delta);
+ fprintf (file, "\tsub\t%s, %d\n", reg_names[this_regno],
+ -mi_delta);
}
else
{
--- gcc-4.2.1/gcc/config/avr32/linux-elf.h 2007-10-01 08:43:09.000000000 -0500
+++ /home/geoff/src/buildroot-avr32-v2.1.0/toolchain_build_avr32_nofpu/gcc-4.2.1/gcc/config/avr32/linux-elf.h
2008-02-25 09:09:42.000000000 -0600
@@ -68,7 +68,7 @@
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
#undef ASM_SPEC
-#define ASM_SPEC "%{!mno-pic:%{!fno-pic:--pic}} %{mrelax|O*:%{mno-relax|O0|
O1: ;:--linkrelax}} %{mcpu=*:-mcpu=%*}"
+#define ASM_SPEC "%{!mno-pic:--pic} %{mrelax|O*:%{mno-relax|O0|
O1: ;:--linkrelax}} %{mcpu=*:-mcpu=%*}"
#undef LINK_SPEC
#define LINK_SPEC "%{version:-v} \
Since both sysvinit and busybox both segfault with about the same error, I'm
thinking it might be related to runtime linking. I tried configuring uClibc
to with SUPPORT_LD_DEBUG and SUPPORT_LD_DEBUG_EARLY, and then passing
LD_DEBUG=all on the kernel command line to get it to the init environment.
Nothing was printed out, so either I didn't do the LD debug properly, or
something is really wrong.
I've never had an issue building a kernel that boots, but I haven't been able
to get past whatever the init process is segfaulting.
Does anyone have an ideas?
Thanks,
---
Geoffrey
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Stuck with AVR32 segfaults in init
2008-03-11 22:46 Stuck with AVR32 segfaults in init Geoffrey Wossum
@ 2008-03-11 23:23 ` Richard Purdie
2008-03-12 6:13 ` Robert Wörle
2008-03-12 16:00 ` Geoffrey Wossum
0 siblings, 2 replies; 8+ messages in thread
From: Richard Purdie @ 2008-03-11 23:23 UTC (permalink / raw)
To: openembedded-devel
Hi,
On Tue, 2008-03-11 at 17:46 -0500, Geoffrey Wossum wrote:
> Since both sysvinit and busybox both segfault with about the same error, I'm
> thinking it might be related to runtime linking. I tried configuring uClibc
> to with SUPPORT_LD_DEBUG and SUPPORT_LD_DEBUG_EARLY, and then passing
> LD_DEBUG=all on the kernel command line to get it to the init environment.
> Nothing was printed out, so either I didn't do the LD debug properly, or
> something is really wrong.
>
> I've never had an issue building a kernel that boots, but I haven't been able
> to get past whatever the init process is segfaulting.
>
> Does anyone have an ideas?
If you take an OE binary and run it within a working filesystem from
whereever, what happens? If it segfaults there you may be able to debug
it. If it doesn't, try copying libs from OE into that system until it
breaks? That should at least tell you where the problem is.
Cheers,
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck with AVR32 segfaults in init
2008-03-11 23:23 ` Richard Purdie
@ 2008-03-12 6:13 ` Robert Wörle
2008-03-12 7:31 ` Khem Raj
` (2 more replies)
2008-03-12 16:00 ` Geoffrey Wossum
1 sibling, 3 replies; 8+ messages in thread
From: Robert Wörle @ 2008-03-12 6:13 UTC (permalink / raw)
To: openembedded-devel; +Cc: openembedded-devel
>
> If you take an OE binary and run it within a working filesystem from
> whereever, what happens? If it segfaults there you may be able to debug
> it. If it doesn't, try copying libs from OE into that system until it
> breaks? That should at least tell you where the problem is.
Dear all
I was starting a oe build the day koen announced the merge and it went
with some obstacles and finished the major libs nicely but i cant tell
what i had to do to get past the uclibc parts.
I did then get a 0.9.28 based libs and apps which i now merge with a
atmel bsp kernel and uClibc.
So i can now run all oe libs ( beside uClibc) with that and it feels
wonderful. I am currently running the ngw100 with a 5.7 lcd attached and
can get up a Xfbdev + gtk+ + x11vnc within the nand and nor ( totale of
16 mb) Hurray the power if footprinting of oe !!
But i am also stuck now redoing this and rebuilding a new oe toolchain
for avr32 . I cant get pass the external-toolchain ERROR mentioned in
some earlier mails.
I tried both oe uclibc 0.9.28 and 0.9.29
So i now have one tool chain up and running and i can go on to develop
my target application but nobody is allowed to touch my laptop with that
toolchain or he dies !!
Maybe we need some of the guru`s here to help us poor avr32 small users
to get the basic oe toolchain up and running and stable at least for the
ucLibc part.
Robert
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Stuck with AVR32 segfaults in init
2008-03-12 6:13 ` Robert Wörle
@ 2008-03-12 7:31 ` Khem Raj
2008-03-12 8:02 ` Robert Wörle
2008-03-12 9:08 ` Richard Purdie
2008-03-12 19:52 ` Stelios Koroneos
2 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2008-03-12 7:31 UTC (permalink / raw)
To: openembedded-devel
Geoffrey
Did you rebuild OE with the above gcc patches applied. You should give
it a shot.
On Tue, Mar 11, 2008 at 11:13 PM, Robert Wörle
<robert@linuxdevelopment.de> wrote:
>
> >
> > If you take an OE binary and run it within a working filesystem from
> > whereever, what happens? If it segfaults there you may be able to debug
> > it. If it doesn't, try copying libs from OE into that system until it
> > breaks? That should at least tell you where the problem is.
>
> Dear all
> I was starting a oe build the day koen announced the merge and it went
> with some obstacles and finished the major libs nicely but i cant tell
> what i had to do to get past the uclibc parts.
>
> I did then get a 0.9.28 based libs and apps which i now merge with a
> atmel bsp kernel and uClibc.
> So i can now run all oe libs ( beside uClibc) with that and it feels
> wonderful. I am currently running the ngw100 with a 5.7 lcd attached and
> can get up a Xfbdev + gtk+ + x11vnc within the nand and nor ( totale of
> 16 mb) Hurray the power if footprinting of oe !!
>
>
> But i am also stuck now redoing this and rebuilding a new oe toolchain
> for avr32 . I cant get pass the external-toolchain ERROR mentioned in
> some earlier mails.
> I tried both oe uclibc 0.9.28 and 0.9.29
> So i now have one tool chain up and running and i can go on to develop
> my target application but nobody is allowed to touch my laptop with that
> toolchain or he dies !!
>
> Maybe we need some of the guru`s here to help us poor avr32 small users
> to get the basic oe toolchain up and running and stable at least for the
> ucLibc part.
>
> Robert
>
>
> >
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck with AVR32 segfaults in init
2008-03-12 6:13 ` Robert Wörle
2008-03-12 7:31 ` Khem Raj
@ 2008-03-12 9:08 ` Richard Purdie
2008-03-12 19:52 ` Stelios Koroneos
2 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2008-03-12 9:08 UTC (permalink / raw)
To: openembedded-devel
On Wed, 2008-03-12 at 07:13 +0100, Robert Wörle wrote:
> But i am also stuck now redoing this and rebuilding a new oe toolchain
> for avr32 . I cant get pass the external-toolchain ERROR mentioned in
> some earlier mails.
Can you remind us which error this is and what MACHINE/DISTRO and other
setup you're using please?
Thanks,
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck with AVR32 segfaults in init
2008-03-12 6:13 ` Robert Wörle
2008-03-12 7:31 ` Khem Raj
2008-03-12 9:08 ` Richard Purdie
@ 2008-03-12 19:52 ` Stelios Koroneos
2 siblings, 0 replies; 8+ messages in thread
From: Stelios Koroneos @ 2008-03-12 19:52 UTC (permalink / raw)
To: openembedded-devel
FYI I won't be able to even look at avr32/OE for at least a month a half and
Koen's stk1000 is in my office waiting to be unbricked :(
With the amount (and type) of changes going into .dev these days it would
have been a miracle if something was working without problems.
Probably this could also be connected to the SCM issue but I think it would
be wise in the future, to create separate branches when these kind of
"infrastacture" changes are to be pushed to OE, so they could be tested
before been merged with .dev.
Stelios S. Koroneos
Digital OPSiS - Embedded Intelligence
http://www.digital-opsis.com
> -----Original Message-----
> From: openembedded-devel-bounces@openembedded.org
> [mailto:openembedded-devel-bounces@openembedded.org] On
> Behalf Of Robert Worle
> Sent: Wednesday, March 12, 2008 8:14 AM
> To: openembedded-devel@openembedded.org
> Cc: openembedded-devel@openembedded.org
> Subject: Re: [oe] Stuck with AVR32 segfaults in init
>
>
> >
> > If you take an OE binary and run it within a working
> filesystem from
> > whereever, what happens? If it segfaults there you may be able to
> > debug it. If it doesn't, try copying libs from OE into that system
> > until it breaks? That should at least tell you where the problem is.
>
> Dear all
> I was starting a oe build the day koen announced the merge
> and it went with some obstacles and finished the major libs
> nicely but i cant tell what i had to do to get past the uclibc parts.
>
> I did then get a 0.9.28 based libs and apps which i now merge
> with a atmel bsp kernel and uClibc.
> So i can now run all oe libs ( beside uClibc) with that and
> it feels wonderful. I am currently running the ngw100 with a
> 5.7 lcd attached and can get up a Xfbdev + gtk+ + x11vnc
> within the nand and nor ( totale of
> 16 mb) Hurray the power if footprinting of oe !!
>
>
> But i am also stuck now redoing this and rebuilding a new oe
> toolchain for avr32 . I cant get pass the external-toolchain
> ERROR mentioned in some earlier mails.
> I tried both oe uclibc 0.9.28 and 0.9.29 So i now have one
> tool chain up and running and i can go on to develop my
> target application but nobody is allowed to touch my laptop
> with that toolchain or he dies !!
>
> Maybe we need some of the guru`s here to help us poor avr32
> small users to get the basic oe toolchain up and running and
> stable at least for the ucLibc part.
>
> Robert
> >
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck with AVR32 segfaults in init
2008-03-11 23:23 ` Richard Purdie
2008-03-12 6:13 ` Robert Wörle
@ 2008-03-12 16:00 ` Geoffrey Wossum
1 sibling, 0 replies; 8+ messages in thread
From: Geoffrey Wossum @ 2008-03-12 16:00 UTC (permalink / raw)
To: openembedded-devel
On Tuesday 11 March 2008 06:23:04 pm Richard Purdie wrote:
> Hi,
> If you take an OE binary and run it within a working filesystem from
> whereever, what happens? If it segfaults there you may be able to debug
> it. If it doesn't, try copying libs from OE into that system until it
> breaks? That should at least tell you where the problem is.
Here's the results:
- Run OE busybox on working BR system
Works
- Run OE busybox with OE libc.so on working BR system
Works
- Run OE busybox with OE libc.so / libm.so on working BR system
Works
- Replace BR libc.so with OE libc.so
Works
- Replace BR libc.so / libm.so with OE libc.so / libm.so
Works
- Replace BR ld-uClibc.so with OE ld-uClibc.so
init[1]: segfault at 00000008 pc 2aaabc84 sp 7ff80f30 ecr 24
- Replace OE ld-uClibc.so with BR ld-uClibc.so
Works
So the ld-uClibc.so build by OE is definitely the culprit, and replacing it
with the ld-uClibc.so from Atmel's buildroot makes everything better.
I'm going to investigate what possible differences could exist between the OE
ld-uClibc.so and the BR ld-uClibc.so now.
---
Geoffrey
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-03-12 19:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11 22:46 Stuck with AVR32 segfaults in init Geoffrey Wossum
2008-03-11 23:23 ` Richard Purdie
2008-03-12 6:13 ` Robert Wörle
2008-03-12 7:31 ` Khem Raj
2008-03-12 8:02 ` Robert Wörle
2008-03-12 9:08 ` Richard Purdie
2008-03-12 19:52 ` Stelios Koroneos
2008-03-12 16:00 ` Geoffrey Wossum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.