[uClibc 0000618]: uclinux with nios2 hang in busybox init

bugs at busybox.net bugs at busybox.net
Thu Jan 5 07:22:48 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-04-2006 23:22 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:22  
---------------------------------------------------------------------- 
I have checked the new buildroot with a "fresh and clean" linux.
The exec prefix in 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' 

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




More information about the uClibc-cvs mailing list