[uClibc 0000618]: uclinux with nios2 hang in busybox init
bugs at busybox.net
bugs at busybox.net
Tue Jan 10 02:16:51 UTC 2006
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=618
======================================================================
Reported By: thomas_chou
Assigned To: uClibc
======================================================================
Project: uClibc
Issue ID: 618
Category: Architecture Specific
Reproducibility: always
Severity: block
Priority: normal
Status: assigned
======================================================================
Date Submitted: 01-01-2006 18:16 PST
Last Modified: 01-09-2006 18:16 PST
======================================================================
Summary: uclinux with nios2 hang in busybox init
Description:
With nios2,
The uClibc-20051001 works.
But uClibc-20051002 hangs.
As I am new to svn, I dont know how to find the diff.
Please help find out the problem.
======================================================================
----------------------------------------------------------------------
thomas_chou - 01-01-06 20:01
----------------------------------------------------------------------
Another issue in svn,
libpthread/Makefile.in:9: libpthread/linuxthreads/Makefile.in:
make: *** No rule to make target `libpthread/linuxthreads/Makefile.in'.
Stop.
the dir libpthread/linuxthreads is missing.
----------------------------------------------------------------------
thomas_chou - 01-01-06 20:28
----------------------------------------------------------------------
resolved,
the __uClibc_init() is missing for arch without mmu in __uClibc_main.c,
since svn 11721 moved it.
But the nios2 still crash after /bin/sh...
----------------------------------------------------------------------
thomas_chou - 01-02-06 01:45
----------------------------------------------------------------------
it is svn 11983, which caused the crashs now.
----------------------------------------------------------------------
vapier - 01-02-06 17:00
----------------------------------------------------------------------
ive fixed __uClibc_main.c so it runs __uClibc_init() for non-mmu cases
again
----------------------------------------------------------------------
vapier - 01-02-06 17:02
----------------------------------------------------------------------
so svn 11982 works but svn 11983 does not ? that change is when we
switched over to the new build system, there was no source code changes
...
----------------------------------------------------------------------
thomas_chou - 01-02-06 17:39
----------------------------------------------------------------------
yes, 11982 is OK.
but almost everything crash with the make system updated in 11983/11984.
----------------------------------------------------------------------
vapier - 01-02-06 17:46
----------------------------------------------------------------------
well that version will prob have a few bugs in the build system ... so
using that as a check point wont be too helpful ... you should compare the
libraries generated before and after that change to see what symbols are
screwed up ...
----------------------------------------------------------------------
thomas_chou - 01-03-06 20:23
----------------------------------------------------------------------
The crt1.S is updated for stack allocation.
I checked the nm output of busybox elf with the latest svn uClibc and
busybox.
The atexit is "undefined"!!
what wrong?
libc/stdlib/atexit.c ?
000376f4 T __ashldi3
00037744 T __pack_f
U atexit
U _edata
U _etext
U _gp
U __isinf
U __isnan
U _stext
w _fini
w __h_errno_location
w _init
w __pthread_initialize_minimal
----------------------------------------------------------------------
thomas_chou - 01-03-06 21:46
----------------------------------------------------------------------
Got it. In general lib setting, enable old_atexit support will work.
[ ] Dynamic atexit() Support
[*] Old (visible) atexit Support
The nios2 is no longer "broken" on uClibc.
But where is the 0.9.29's new atexit()?
----------------------------------------------------------------------
thomas_chou - 01-03-06 22:51
----------------------------------------------------------------------
The crt0.S of nios is updated as for uClibc 0.9.28.
The arch cflags "-m32" should be removed from extra/Configs/Config.nios,
it causes complain in CC.
Add "-m32" to top Rules.mak nios cpu cflags and ldflags.
The "-msoft-float" is not need as for nios/nios2.
I did not run all the compile/tests through, because I did not have the
kernel source.
Just the crt0.S can be compiled.
----------------------------------------------------------------------
vapier - 01-03-06 23:08
----------------------------------------------------------------------
thanks, ive updated the build flags as you said to, and updated the crt1.S
file as well as the nios/Makefile's
----------------------------------------------------------------------
psm - 01-04-06 01:10
----------------------------------------------------------------------
the atexit handling changed between .28 and .29, the old atexit option is
there until .29 is released to allow updating from .28 to .29 (you have to
rebuild apps needed atexit, then you can rebuild uclibc without old
atexit). search the ml archives for more info
----------------------------------------------------------------------
thomas_chou - 01-04-06 23:30
----------------------------------------------------------------------
I have checked the new buildroot with a "fresh and clean" linux.
The exec prefix in building uClibc is wrong nios2-elf-, instead of the
buildroot's defualt nios2-linux-uclibc-.
+ top_builddir=.
+ CC=nios2-elf-gcc
+ /bin/sh extra/scripts/gen_bits_syscall_h.sh
extra/scripts/gen_bits_syscall_h.sh: line 21: nios2-elf-gcc: command not
found
extra/scripts/gen_bits_syscall_h.sh: line 24: nios2-elf-gcc: command not
found
+ cmp include/bits/sysnum.h include/bits/sysnum.h.new
+ rm -f include/bits/sysnum.h
AR cr lib/uclibc_nonshared.a
STRIP -x -R .note -R .comment libc/libc_so.a
/bin/sh: nios2-elf-strip: command not found
make[3]: *** [libc/libc_so.a] Error 127
+ mv -f include/bits/sysnum.h.new include/bits/sysnum.h
make[1]: Leaving directory
`/usr/local/src/nios2/buildroot/toolchain_build_nios2/uClibc'
----------------------------------------------------------------------
thomas_chou - 01-05-06 19:33
----------------------------------------------------------------------
I checked the nm output of busybox, there are some undefined symbols,
U __isinf
U __isnan
U __vfork
1. libc/stdlib/system.c want __vfork for vfork
should a global of it add to libc/sysdeps/linux/nios2/vfork.S ?
2. include/math.h want __isinf,__isnan from bits/ , but no found for
nios2?
Please help. Thanks a lot.
----------------------------------------------------------------------
psm - 01-06-06 00:04
----------------------------------------------------------------------
you should try to sync up all the nios* .S files comparing to the other
archs (arm/i386/mips/powerpc)
compare the current files w/ glibc-cvs (ports probably)
you should include features.h as first
create __vfork hidden
use strong_alias/weak_alias(__vfork,vfork) (for clone as well)
----------------------------------------------------------------------
thomas_chou - 01-06-06 07:45
----------------------------------------------------------------------
Please find nios2-uClibc-02.diff.bz2 and nios-uClibc-02.diff.bz2 as pointed
by psm. Compare and sync up the *.S with arm.
The undefined symbols are resolved. Thank you.
----------------------------------------------------------------------
thomas_chou - 01-08-06 04:39
----------------------------------------------------------------------
nios2-uClibc-03.diff
uClibc/extra/Configs/
remove CROSS which prevent buildroot to make uClibc.
----------------------------------------------------------------------
thomas_chou - 01-08-06 18:31
----------------------------------------------------------------------
1. buildroot + uClibc-0.9.28 can build with the removal of CROSS.
2. buildroot + uClibc-snapshot will failed on ldso,
but there is no shared lib, why it needs ldso?
CC ldso/ldso/ldso.oS
In file included from ./ldso/include/ldso.h:34,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:12:25: dl-syscalls.h: No such file or
directory
In file included from ./ldso/include/ldso.h:34,
from ldso/ldso/ldso.c:33:
.
----------------------------------------------------------------------
thomas_chou - 01-09-06 00:15
----------------------------------------------------------------------
sync up nios2 kernel headers to 2.6.11 for buildroot
nios2-buildroot-01.diff
buildroot/toolchain/kernel-headers/linux-libc-headers-2.6.11-nios2nommu.patch.conditional
----------------------------------------------------------------------
vapier - 01-09-06 18:16
----------------------------------------------------------------------
thanks, ive committed the pending patches:
nios2-uClibc-02.diff.bz2
nios-uCLibc-02.diff.bz2
nios2-uClibc-03.diff
linux-libc-headers-2.6.11-nios2nommu.patch.conditional.bz2
nios2-buildroot-01.diff
Issue History
Date Modified Username Field Change
======================================================================
01-01-06 18:16 thomas_chou New Issue
01-01-06 18:16 thomas_chou Status new => assigned
01-01-06 18:16 thomas_chou Assigned To => uClibc
01-01-06 19:23 thomas_chou Note Added: 0000832
01-01-06 19:45 thomas_chou Note Added: 0000833
01-01-06 19:53 thomas_chou Note Added: 0000834
01-01-06 19:53 thomas_chou Note Edited: 0000834
01-01-06 20:01 thomas_chou Note Edited: 0000833
01-01-06 20:01 thomas_chou Note Edited: 0000834
01-01-06 20:02 thomas_chou Note Deleted: 0000832
01-01-06 20:28 thomas_chou Note Edited: 0000834
01-02-06 01:45 thomas_chou Note Added: 0000837
01-02-06 17:00 vapier Note Added: 0000840
01-02-06 17:02 vapier Note Added: 0000841
01-02-06 17:39 thomas_chou Note Added: 0000842
01-02-06 17:46 vapier Note Added: 0000843
01-03-06 20:10 thomas_chou Note Added: 0000846
01-03-06 20:14 thomas_chou File Added: nios2-uClibc.diff.bz2
01-03-06 20:15 thomas_chou Note Edited: 0000846
01-03-06 20:21 thomas_chou Note Edited: 0000846
01-03-06 20:23 thomas_chou Note Edited: 0000846
01-03-06 21:26 thomas_chou Note Added: 0000848
01-03-06 21:42 thomas_chou Note Edited: 0000848
01-03-06 21:46 thomas_chou Note Edited: 0000848
01-03-06 22:23 thomas_chou File Added: nios-uClibc.diff.bz2
01-03-06 22:51 thomas_chou Note Added: 0000849
01-03-06 23:08 vapier Note Added: 0000850
01-04-06 01:10 psm Note Added: 0000851
01-04-06 23:22 thomas_chou Note Added: 0000852
01-04-06 23:30 thomas_chou Note Edited: 0000852
01-05-06 18:27 thomas_chou File Added: elf2flt.diff.bz2
01-05-06 18:30 thomas_chou Note Added: 0000857
01-05-06 18:56 thomas_chou Note Deleted: 0000857
01-05-06 19:33 thomas_chou Note Added: 0000861
01-06-06 00:04 psm Note Added: 0000863
01-06-06 07:03 thomas_chou File Added: nios2-uClibc-02.diff.bz2
01-06-06 07:03 thomas_chou File Added: nios-uCLibc-02.diff.bz2
01-06-06 07:06 thomas_chou Note Added: 0000866
01-06-06 07:45 thomas_chou Note Edited: 0000866
01-06-06 07:45 thomas_chou Note Edited: 0000866
01-08-06 04:36 thomas_chou File Added: nios2-uClibc-03.diff
01-08-06 04:38 thomas_chou Note Added: 0000871
01-08-06 04:39 thomas_chou Note Edited: 0000871
01-08-06 18:31 thomas_chou Note Added: 0000874
01-09-06 00:10 thomas_chou File Added:
linux-libc-headers-2.6.11-nios2nommu.patch.conditional.bz2
01-09-06 00:11 thomas_chou File Added: nios2-buildroot-01.diff
01-09-06 00:15 thomas_chou Note Added: 0000884
01-09-06 18:16 vapier Note Added: 0000893
======================================================================
More information about the uClibc-cvs
mailing list