| Anonymous | Login | Signup for a new account | 11-10-2008 10:55 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0000618 | [uClibc] Architecture Specific | block | always | 01-01-06 18:16 | 06-03-08 01:48 | ||||
| Reporter | thomas_chou | View Status | public | ||||||
| Assigned To | uClibc | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | |||||||
| Summary | 0000618: 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. |
||||||||
| Additional Information | |||||||||
| Attached Files |
|
||||||||
|
|
|||||||||
Notes |
|
|
(0000833) thomas_chou 01-01-06 19:45 edited on: 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. |
|
(0000834) thomas_chou 01-01-06 19:53 edited on: 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... |
|
(0000837) thomas_chou 01-02-06 01:45 |
it is svn 11983, which caused the crashs now. |
|
(0000840) vapier 01-02-06 17:00 |
ive fixed __uClibc_main.c so it runs __uClibc_init() for non-mmu cases again |
|
(0000841) 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 ... |
|
(0000842) thomas_chou 01-02-06 17:39 |
yes, 11982 is OK. but almost everything crash with the make system updated in 11983/11984. |
|
(0000843) 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 ... |
|
(0000846) thomas_chou 01-03-06 20:10 edited on: 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 |
|
(0000848) thomas_chou 01-03-06 21:26 edited on: 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()? |
|
(0000849) 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. |
|
(0000850) 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 |
|
(0000851) 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 |
|
(0000852) thomas_chou 01-04-06 23:22 edited on: 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' |
|
(0000861) 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. |
|
(0000863) 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) |
|
(0000866) thomas_chou 01-06-06 07:06 edited on: 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. |
|
(0000871) thomas_chou 01-08-06 04:38 edited on: 01-08-06 04:39 |
nios2-uClibc-03.diff uClibc/extra/Configs/ remove CROSS which prevent buildroot to make uClibc. |
|
(0000874) 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: . |
|
(0000884) 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 |
|
(0000893) 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 |
|
(0000897) thomas_chou 01-09-06 20:19 |
Thank you. Would you please sync up the elf2flt patch from marc's 0000273 ? Many people need them to run busybox/apps on uClinux. |
|
(0000902) 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 |
|
(0000915) thomas_chou 01-10-06 17:49 edited on: 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". |
|
(0000916) vapier 01-10-06 17:53 |
added nios2-uClibc-04.diff |
|
(0000917) thomas_chou 01-10-06 18:05 |
Thank you. I found the rootfs.nios2.ext2 has the correct dev nodes. So it is OK. |
|
(0000920) thomas_chou 01-10-06 19:26 edited on: 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"? |
|
(0000923) thomas_chou 01-10-06 22:45 edited on: 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. |
|
(0000924) thomas_chou 01-11-06 01:40 edited on: 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. :-) |
|
(0000926) 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 ? |
|
(0000927) thomas_chou 01-12-06 00:10 edited on: 01-12-06 01:08 |
Yes, it patched to the wrong place. And you are right about the cygwin-elf.h |
|
(0000928) 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. |
|
(0000929) 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 |
|
(0000930) vapier 01-13-06 04:18 |
ok, upstream uClinux has committed the nios2 fix and ive pulled it into buildroot |
|
(0000932) 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. :( |
|
(0000933) thomas_chou 01-14-06 14:37 |
nios2-gcc-01.diff , use crt1.o for start file. |
|
(0000934) 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. |
|
(0000935) 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 ? |
|
(0000936) thomas_chou 01-14-06 20:03 |
Yes, I have built and tested on nios2 board. |
|
(0000937) vapier 01-14-06 20:13 |
ok, ive added the updated nios2 patch to svn then |
|
(0000939) thomas_chou 01-15-06 07:10 |
nios2-uClibc-06.diff, misplaced comment / |
|
(0000940) vapier 01-15-06 10:51 |
nios2-uClibc-06.diff committed |
|
(0000941) thomas_chou 01-15-06 16:40 |
Thank you. svn 13346 broken, should not build shared when we want static objs |
|
(0000942) thomas_chou 01-15-06 16:53 |
nios2-buildroot-04.diff, update buildroot to use busybox 1.1.0 release. |
|
(0000943) thomas_chou 01-15-06 23:43 |
previous note (0000941) about shared busybox lib is not an issue. I found there is a config to turn it off. Just the default is on, and makes me confused. sorry. |
|
(0000944) thomas_chou 01-17-06 04:41 |
nios2-buildroot-05.diff, Ive tested gcc 3.4.4 and 3.4.5, please copy gcc/3.4.3/900-nios2.patch to gcc/3.4.4 and gcc/3.4.5 |
|
(0000947) thomas_chou 01-18-06 18:08 |
nios2-buildroot-06.diff, some users may not have static libc to link with. |
|
(0000950) vapier 01-19-06 01:45 |
nios2-buildroot-04.diff / nios2-buildroot-05.diff: committed |
|
(0000993) thomas_chou 01-24-06 19:28 |
nios2-buildroot-07.diff, to compile libstdc++-v3 but failed in the middle, buildroot/toolchain_build_nios2/gcc-3.4.5-final/nios2-linux-uclibc/mno-hw-mul/libstdc++-v3/include/nios2-linux-uclibc/bits/c++locale.h:103: error: `snprintf' is not a member of `std' |
|
(0001045) thomas_chou 02-05-06 20:51 |
The libstdc++-v3 issue resolved. Please apply nios2-buildroot-07.diff . Please apply nios2-buildroot-08.diff to gcc/3.4.2-3.4.5 . With buildroot .config , BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-cxx-flags=-static" The c++ and libstdc++ can be built successfully. Please remove "broken" tag of nios2 on uClibc . Thanks. |
|
(0001046) vapier 02-05-06 21:07 |
nios2-buildroot-06.diff: committed nios2-buildroot-07.diff: does this really matter ? nios2-buildroot-08.diff: seems this should really be solved a diff way ... removed broken tag in uClibc |
|
(0001054) thomas_chou 02-06-06 20:47 |
1. nios2-buildroot-07.diff, if os is none, the configure will complain "no supported host/target" for libstdc++ 2. nios2-buildroot-08.diff, there is a similar buildin in gcc/config/mips/linux.h line 62 and other archs. it is needed for several include files, such as, stdio.h, stdlib.h, math.h. Without it, the config.h generated by configure will be wrong. And the make will fail. |
|
(0001056) vapier 02-06-06 21:01 |
ok, added 07.diff and 08.diff |
|
(0001096) thomas_chou 02-14-06 07:36 |
update elf2flt.nios2.conditional, in buildroot/toolchain/elf2flt for svn13961, need these def from normal ld script. maybe needed for other arch. error message, LINK busybox busybox.elf2flt(.text+0x60714): In function `__uClibc_fini': : undefined reference to `__fini_array_start' busybox.elf2flt(.text+0x60718): In function `__uClibc_fini': : undefined reference to `__fini_array_start' busybox.elf2flt(.text+0x6071c): In function `__uClibc_fini': : undefined reference to `__fini_array_end' busybox.elf2flt(.text+0x60720): In function `__uClibc_fini': : undefined reference to `__fini_array_end' ..... |
|
(0001101) thomas_chou 02-14-06 17:11 |
another thought, for the elf2flt.ld issue of svn 13961, may be it is better to sync up the elf2flt.ld to the ld script from binutils. A lot of stuff are missing in the current elf2flt.ld. |
|
(0008034) vda 06-02-08 20:10 |
I guess this can be closed? Future exchanges like this are better directed to mailing list(s). |
|
(0008044) thomas_chou 06-02-08 20:27 |
Yes. Please close this issue. They were resolved long ago. |
| Copyright © 2000 - 2006 Mantis Group |