[uClibc 0000618]: uclinux with nios2 hang in busybox init
bugs at busybox.net
bugs at busybox.net
Mon Jan 16 00:40:09 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-15-2006 16:40 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
----------------------------------------------------------------------
thomas_chou - 01-09-06 20:19
----------------------------------------------------------------------
Thank you.
Would you please sync up the elf2flt patch from marc's
http://busybox.net/bugs/view.php?id=273 ?
Many people need them to run busybox/apps on uClinux.
----------------------------------------------------------------------
vapier - 01-09-06 21:57
----------------------------------------------------------------------
ok, initial elf2flt is in buildroot, but doesnt appear to work quite right
... i had to update a bunch of things against latest versions of elf2flt
----------------------------------------------------------------------
thomas_chou - 01-10-06 17:57
----------------------------------------------------------------------
please find nios2-uClibc-04.diff for the missing "__vfork:".
Thank you.
I am still checking elf2flt update, it got "segment fault".
----------------------------------------------------------------------
vapier - 01-10-06 17:53
----------------------------------------------------------------------
added nios2-uClibc-04.diff
----------------------------------------------------------------------
thomas_chou - 01-10-06 18:05
----------------------------------------------------------------------
Thank you.
I found the rootfs.nios2.ext2 has the correct dev nodes. So it is OK.
----------------------------------------------------------------------
thomas_chou - 01-10-06 19:45
----------------------------------------------------------------------
update nios2-busybox-01.diff for elf2flt obj.
Or is there a better place to add this LDFLAGS for busybox/apps?
eg, in config file with "extra ldflags"?
----------------------------------------------------------------------
thomas_chou - 01-11-06 16:13
----------------------------------------------------------------------
for your ref, configs.zip, are what I used to build and test on nios2
board.
make defconfig,
unzip into buildroot/dl, copy dl/buildroot.config to buildroot/.config.
Then make.
----------------------------------------------------------------------
thomas_chou - 01-12-06 00:02
----------------------------------------------------------------------
please find nios2-elf2flt-01.diff.bz2 to fix "segment fault",
nios2-uClibc-05.diff to keep old atexit() until we are ready,
and nios2-busybox-02.diff to ignore strip fail on flt obj.
please create crt0.o compat link for nios2, as svn 13235 for nios only.
please add dir /sys to rootfs for kernel 2.6 sysfs.
Thanks a lot. :-)
----------------------------------------------------------------------
vapier - 01-11-06 19:01
----------------------------------------------------------------------
nios2-busybox-02.diff:
rather than doing it like this, we should make a buildroot option for
stripping of the target files and when elf2flt is selected, automatically
select 'no stripping' ... then we'd pass STRIPCMD="$(STRIP)" in
packages/busybox/busybox.mk
nios2-elf2flt-01.diff.bz2:
the stuff in cygwin-elf.h is not needed as those defines are already in
... as for the elf2flt.c changes, you just moved the code down a few
hunderd lines right ? you didnt change anything other than moving it ?
----------------------------------------------------------------------
thomas_chou - 01-12-06 01:08
----------------------------------------------------------------------
Yes, it patched to the wrong place.
And you are right about the cygwin-elf.h
----------------------------------------------------------------------
thomas_chou - 01-12-06 01:01
----------------------------------------------------------------------
I checked the uClinux CVS, and found the nios/nios2 was included now.
Things can run more smoothly. :)
Thank you. I still look forward to the update in buildroot.
----------------------------------------------------------------------
vapier - 01-12-06 03:12
----------------------------------------------------------------------
yes, i've been e-mailing the elf2flt updates to the uClinux guys rather
than just including them in buildroot
----------------------------------------------------------------------
vapier - 01-13-06 04:18
----------------------------------------------------------------------
ok, upstream uClinux has committed the nios2 fix and ive pulled it into
buildroot
----------------------------------------------------------------------
thomas_chou - 01-14-06 03:56
----------------------------------------------------------------------
please find nios2-buildroot-02.diff, which fix elf2flt reloc error.
The elf2flt.c has terrible ident, that makes it difficult to read. :(
----------------------------------------------------------------------
thomas_chou - 01-14-06 14:37
----------------------------------------------------------------------
nios2-gcc-01.diff , use crt1.o for start file.
----------------------------------------------------------------------
thomas_chou - 01-14-06 15:05
----------------------------------------------------------------------
nios2-buildroot-03.diff, update to elf2flt.ld, so that
elf2flt.nios2.conditional patch can be removed from elf2flt.mk.
----------------------------------------------------------------------
vapier - 01-14-06 18:54
----------------------------------------------------------------------
nios2-buildroot-02.diff: applied
nios2-gcc-01.diff: applied
so you're saying with nios2-buildroot-03.diff, all the stuff in
elf2flt.nios2.conditional that applies to elf2flt.c is no longer needed ?
just need to tweak the elf2flt.ld and that's it ?
----------------------------------------------------------------------
thomas_chou - 01-14-06 20:03
----------------------------------------------------------------------
Yes, I have built and tested on nios2 board.
----------------------------------------------------------------------
vapier - 01-14-06 20:13
----------------------------------------------------------------------
ok, ive added the updated nios2 patch to svn then
----------------------------------------------------------------------
thomas_chou - 01-15-06 07:10
----------------------------------------------------------------------
nios2-uClibc-06.diff, misplaced comment /
----------------------------------------------------------------------
vapier - 01-15-06 10:51
----------------------------------------------------------------------
nios2-uClibc-06.diff committed
----------------------------------------------------------------------
thomas_chou - 01-15-06 16:40
----------------------------------------------------------------------
Thank you.
svn 13346 broken, should not build shared when we want static objs
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
01-09-06 20:19 thomas_chou Note Added: 0000897
01-09-06 21:57 vapier Note Added: 0000902
01-10-06 17:44 thomas_chou File Added: nios2-uClibc-04.diff
01-10-06 17:49 thomas_chou Note Added: 0000915
01-10-06 17:53 thomas_chou Note Edited: 0000915
01-10-06 17:53 thomas_chou Note Edited: 0000915
01-10-06 17:53 vapier Note Added: 0000916
01-10-06 17:57 thomas_chou Note Edited: 0000915
01-10-06 18:05 thomas_chou Note Added: 0000917
01-10-06 19:24 thomas_chou File Added: nios2-busybox-01.diff
01-10-06 19:26 thomas_chou Note Added: 0000920
01-10-06 19:44 thomas_chou Note Edited: 0000920
01-10-06 19:45 thomas_chou Note Edited: 0000920
01-10-06 22:42 thomas_chou File Added: configs.zip
01-10-06 22:45 thomas_chou Note Added: 0000923
01-10-06 23:23 thomas_chou Note Edited: 0000923
01-11-06 01:37 thomas_chou File Added: nios2-elf2flt-01.diff.bz2
01-11-06 01:37 thomas_chou File Added: nios2-busybox-02.diff
01-11-06 01:40 thomas_chou Note Added: 0000924
01-11-06 03:18 thomas_chou File Added: nios2-uClibc-05.diff
01-11-06 03:19 thomas_chou Note Edited: 0000924
01-11-06 06:43 thomas_chou Note Edited: 0000924
01-11-06 16:13 thomas_chou Note Edited: 0000923
01-11-06 19:01 vapier Note Added: 0000926
01-12-06 00:02 thomas_chou Note Edited: 0000924
01-12-06 00:10 thomas_chou Note Added: 0000927
01-12-06 01:01 thomas_chou Note Added: 0000928
01-12-06 01:08 thomas_chou Note Edited: 0000927
01-12-06 03:12 vapier Note Added: 0000929
01-13-06 04:18 vapier Note Added: 0000930
01-14-06 03:53 thomas_chou File Added: nios2-buildroot-02.diff
01-14-06 03:56 thomas_chou Note Added: 0000932
01-14-06 14:37 thomas_chou File Added: nios2-gcc-01.diff
01-14-06 14:37 thomas_chou Note Added: 0000933
01-14-06 15:02 thomas_chou File Added: nios2-buildroot-03.diff
01-14-06 15:05 thomas_chou Note Added: 0000934
01-14-06 18:54 vapier Note Added: 0000935
01-14-06 20:03 thomas_chou Note Added: 0000936
01-14-06 20:13 vapier Note Added: 0000937
01-15-06 07:08 thomas_chou File Added: nios2-uClibc-06.diff
01-15-06 07:10 thomas_chou Note Added: 0000939
01-15-06 10:51 vapier Note Added: 0000940
01-15-06 16:40 thomas_chou Note Added: 0000941
======================================================================
More information about the uClibc-cvs
mailing list