About uClibc

4 views
Skip to first unread message

hkr2000

unread,
Oct 9, 2008, 5:49:22 AM10/9/08
to tmlinux
Now in your version uClibc,it does not use the default makefile
system, but the new version have some problems in cygwin, could you
please use the default uClibc makefile system?

Guo Hongruan

unread,
Oct 9, 2008, 7:04:14 AM10/9/08
to tml...@googlegroups.com
What makes you say so?

--
Guo Hongruan, Embedded Linux Consultant
Mobile: +86-0-13484056007
Skype: camelguo
http://www.gulessoft.com

freeoicq freeoicq

unread,
Oct 9, 2008, 9:02:08 PM10/9/08
to tml...@googlegroups.com
I manage to compile the uclibc source after I change some code and copy some files to the includes directory, but the kernel run the app seems ok, except the following error, where "simple test" is my test app's printout, so I think it is the uclibc's problem:

TMLinux start!
start_kerneler
<5>Linux version 2.6.14.7-tiny1 (Boss@SWXA) () #38 Thu Oct 9 23:43:48 2008
<6>


TMLinux pnx1500 on nohhost with 64 bit float point (Little endian) supported by came...@gmail.com
<7>start_mem is 0x262000
virtual_end is 0x3a61000
<7>before free_area_init
<7>free_area_init -> start_mem is 0x262000
virtual_end is 0x3a61000
<7>On node 0 totalpages: 14945
<7>  DMA zone: 0 pages, LIFO batch:1
<7>  Normal zone: 14945 pages, LIFO batch:7
<7>  HighMem zone: 0 pages, LIFO batch:1
Built 1 zonelists
<5>Kernel command line: 
PID hash table entries: 256 (order: 8, 4096 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
<7>Mem_init: start=262000, end=3a61000
<6>Memory available: 56704k/57340k RAM.
<7>Calibrating delay loop... 171.21 BogoMIPS (lpj=856064)
Mount-cache hash table entries: 512
switch_to: from (0) to (1)
switch_to: from (1) to (2)
switch_to: from (2) to (1)
do_pre_smp_initcalls ok
populate_rootfs ok
switch_to: from (1) to (2)
switch_to: from (2) to (3)
switch_to: from (3) to (1)
switch_to: from (1) to (3)
switch_to: from (3) to (4)
switch_to: from (4) to (1)
<6>Linux NoNET1.0 for Linux 2.6
kernel\kthread.c: helper_init
switch_to: from (1) to (4)
switch_to: from (4) to (5)
switch_to: from (5) to (1)
kernel\ksysfs.c: ksysfs_init
fs\binfmt_tcs.c: init_tcs_binfmt
fs\locks.c: filelock_init
fs\binfmt_misc.c: init_misc_binfmt
fs\binfmt_script.c: init_script_binfmt
drivers\char\tty_io.c: tty_class_init
fs\bio.c: init_bio
drivers\char\misc.c: misc_init
drivers\block\genhd.c: genhd_device_init
switch_to: from (1) to (5)
switch_to: from (5) to (6)
switch_to: from (6) to (5)
switch_to: frm (5) to (1)
drivers\input\input.c: input_init
fs\pipe.c: init_pipe_fs
drivers\char\mem.c: chr_dev_init
kernel\user.c: uid_cache_init
kernel\params.c: param_sysfs_init
kernel\posix-timers.c: init_posix_timers
kernel\posix-cpu-timers.c: init_posix_cpu_timers
kernel\futex.c: init
mm\page_alloc.c: init_per_zone_pages_min
mm\pdflush.c: pdflush_init
switch_to: from (1) to (5)
switch_to: from (5) to (7)
switch_to: from (7) to (5)
switch_to: from (5) to (6)
switch_to: from (6) to (1)
switch_to: from (1) to (7)
switch_to: from (7) to (5)
switch_to: from (5) to (8)
switch_to: from (8) to (5)
switch_to: from (5) to (1)
mm\vmscan.c: kswapd_init
mm\tiny-shmem.c: init_tmpfs
fs\fcntl.c: fasync_init
fs\aio.c: aio_setup
switch_to: from (1) to (5)
switch_to: from (5) to (8)
switch_to: from (8) to (10)
switch_to: from (10) to (5)
switch_to: from (5) to (1)
fs\eventpoll.c: eventpoll_init
fs\devpts\inode.c: init_devpts_fs
fs\ramfs\inode.c: init_ramfs_fs
fs\romfs\inode.c: init_romfs_fs
drivers\char\random.c: rand_initialize
drivers\char\tty_io.c: tty_init
drivers\char\pty.c: pty_init
drivers\block\noop-iosched.c: noop_init
<6>io scheduler noop registered
drivers\input\mousedev.c: mousedev_init
<6>mice: PS/2 mouse device common for all mice
drivers\char\random.c: seqgen_init
do_basic_setup ok
sys_access ...
sys_access ok
free_initmem ok
run_init_process 1...
switch_to: from (1) to (10)
switch_to: from (10) to (1)
simple test
<0>Kernel panic - not syncing: Attempted to kill init!


2008/10/9 Guo Hongruan <guo.ho...@gulessoft.com>

freeoicq freeoicq

unread,
Oct 9, 2008, 9:06:41 PM10/9/08
to tml...@googlegroups.com
What's more, I think if we want to support tm1500 board, we must use windows's tcs to compile the kernel and sysroots, now, I change the kernel's makefile, just touch a depfile,
then the kernel would be made successly.Now the uclibc does not.

2008/10/10 freeoicq freeoicq <hkr...@gmail.com>

Guo Hongruan

unread,
Oct 9, 2008, 10:30:47 PM10/9/08
to tml...@googlegroups.com
Empty depfile will break the complete build procedure. TCS Linux edtion
works OK.

在 Fri, 10 Oct 2008 09:06:41 +0800,freeoicq freeoicq <hkr...@gmail.com>
写道:

> What's more, I think if we want to support tm1500 board, we must use
> windows's tcs to compile the kernel and sysroots, now, I change the
> kernel's
> makefile, just touch a depfile,then the kernel would be made

freeoicq freeoicq

unread,
Oct 9, 2008, 10:35:54 PM10/9/08
to tml...@googlegroups.com
Yes, so the linux kernel could be built, now we need to build the uclibc in cygwin, but I have not success except I change some codes, but this make the app runs not correctly, so I think we need a uclibc for cygwin.

2008/10/10 Guo Hongruan <guo.ho...@gulessoft.com>

freeoicq freeoicq

unread,
Oct 12, 2008, 9:12:50 PM10/12/08
to tml...@googlegroups.com
The app run on tmsim does not exit correctly, it returns with "Kernel panic - not syncing: Attempted to kill init", I think there is something wrong with it.
Second, the busybox does not get compiled.

2008/10/10 freeoicq freeoicq <hkr...@gmail.com>

Guo Hongruan

unread,
Oct 12, 2008, 11:00:49 PM10/12/08
to tml...@googlegroups.com
Standard Linux can not allow the init process to exit.

The init process can not exit, or else, you will get this panic.

If you want to dynamically load application which need to exit, you should
do like the following:

in the init process:

if(vfork()){
......
}else{
exece("my_app",......);
}

Then in my_app, you can exit normally.


On Mon, 13 Oct 2008 09:12:50 +0800, freeoicq freeoicq <hkr...@gmail.com>
wrote:

> The app run on tmsim does not exit correctly, it returns with "Kernel
> panic
> - not syncing: Attempted to kill init", I think there is something wrong
> with it.Second, the busybox does not get compiled.

freeoicq freeoicq

unread,
Oct 12, 2008, 11:14:26 PM10/12/08
to tml...@googlegroups.com
Ok, I know,then how about the busybox?

2008/10/13 Guo Hongruan <came...@gmail.com>

Guo Hongruan

unread,
Oct 12, 2008, 11:22:46 PM10/12/08
to tml...@googlegroups.com
I can compile busybox easily in my computer. Maybe you have not configure
it correctly. But I am not sure for I don't know your question.

On Mon, 13 Oct 2008 11:14:26 +0800, freeoicq freeoicq <hkr...@gmail.com>

freeoicq freeoicq

unread,
Oct 12, 2008, 11:24:46 PM10/12/08
to tml...@googlegroups.com
What I mean is a full functionial busybox, first it should have a shell, and second some basic tools.I can compile the busybox if I do not select the functioal units.

2008/10/13 Guo Hongruan <came...@gmail.com>

freeoicq freeoicq

unread,
Oct 12, 2008, 11:28:25 PM10/12/08
to tml...@googlegroups.com
There is no vfork in the kernel?

2008/10/13 freeoicq freeoicq <hkr...@gmail.com>

freeoicq freeoicq

unread,
Oct 13, 2008, 4:28:32 AM10/13/08
to tml...@googlegroups.com
你有没有一个完整的带busybox的版本啊?

2008/10/13 freeoicq freeoicq <hkr...@gmail.com>

Guo Hongruan

unread,
Oct 13, 2008, 6:28:52 AM10/13/08
to tml...@googlegroups.com
I have not ported busybox just compiled it.

在 Mon, 13 Oct 2008 16:28:32 +0800,freeoicq freeoicq <hkr...@gmail.com>

Guo Hongruan

unread,
Oct 13, 2008, 6:29:32 AM10/13/08
to tml...@googlegroups.com
Impossible. Read the source code carefully.

在 Mon, 13 Oct 2008 11:28:25 +0800,freeoicq freeoicq <hkr...@gmail.com>

Guo Hongruan

unread,
Oct 13, 2008, 6:30:40 AM10/13/08
to tml...@googlegroups.com
I have not remove any files in this busybox. It should be full
functionial. But I have not enable some configuration options. Just
minimum configuration.

在 Mon, 13 Oct 2008 11:24:46 +0800,freeoicq freeoicq <hkr...@gmail.com>

freeoicq freeoicq

unread,
Oct 13, 2008, 9:03:42 PM10/13/08
to tml...@googlegroups.com
I mangage to compile the full functional busybox,but with some error:
tmld warning : Archive .\libpwdgrp\libpwdgrp.a does not contain a symboltable (maybe created using ar iso. tmar?)
tmld error   : Duplicate symbol _fclose (in c:\tmwork\work_new\sysroots\pnx1500_nohost_uclibc\x86-linux2\..\\sysroot\usr
\lib\\libc.a:fclose.o and c:\tmwork\TCS5.01\lib\tm3260\el\fp64\libam.dll)
tmld error   : Duplicate symbol _fgetc (in c:\tmwork\work_new\sysroots\pnx1500_nohost_uclibc\x86-linux2\..\\sysroot\usr\
lib\\libc.a:fgetc.o and c:\tmwork\TCS5.01\lib\tm3260\el\fp64\libam.dll)
tmld error   : Duplicate symbol _fopen (in c:\tmwork\work_new\sysroots\pnx1500_nohost_uclibc\x86-linux2\..\\sysroot\usr\
lib\\libc.a:fopen.o and c:\tmwork\TCS5.01\lib\tm3260\el\fp64\libam.dll)
tmld error   : Duplicate symbol _fscanf (in c:\tmwork\work_new\sysroots\pnx1500_nohost_uclibc\x86-linux2\..\\sysroot\usr
\lib\\libc.a:fscanf.o and c:\tmwork\TCS5.01\lib\tm3260\el\fp64\libam.dll)
tmld error   : Duplicate symbol _isspace (in c:\tmwork\work_new\sysroots\pnx1500_nohost_uclibc\x86-linux2\..\\sysroot\us
r\lib\\libc.a:isspace.o and c:\tmwork\TCS5.01\lib\tm3260\el\fp64\libam.dll)
tmld error   : Duplicate symbol _strtoul (in c:\tmwork\work_new\sysroots\pnx1500_nohost_uclibc\x86-linux2\..\\sysroot\us
r\lib\\libc.a:strtoul.o and c:\tmwork\TCS5.01\lib\tm3260\el\fp64\libam.dll)
tmld error   : Unresolved symbol _daemon (first referenced in .\debianutils\debianutils.a:start_stop_daemon.o)
tmld fatal   : c:\tmwork\TCS5.01\bin\tmld aborted due to errors
tmcc.exe: tmld command failed
make[1]: *** [busybox_unstripped] Error 1
make: *** [_all] Error 2

Boss@SWXA /cygdrive/c/tmwork/work_new/busybox

2008/10/13 Guo Hongruan <guo.ho...@gulessoft.com>

freeoicq freeoicq

unread,
Oct 13, 2008, 10:00:55 PM10/13/08
to tml...@googlegroups.com
我有个建议,可以把sh和init两个程序发布,他们有独立版本,可以简单编译。我这边编译出现下面的错误:
trimedia-gss-linux-tcs-pnx1500el_fp64-uclibc-gcc sh/sh2.o sh/sh1.o sh/sh3.o sh/s
h4.o sh/sh5.o sh/sh6.o -o sh
tmld error   : Duplicate symbol _getc (in sh\sh5.o and c:\tmwork\TCS5.01\lib\tm3
260\el\fp64\libam.dll)
tmld error   : Duplicate symbol _printf (in sh\sh2.o and c:\tmwork\TCS5.01\lib\t
m3260\el\fp64\libam.dll)
tmld error   : Duplicate symbol _putc (in sh\sh5.o and c:\tmwork\TCS5.01\lib\tm3
260\el\fp64\libam.dll)
tmld error   : Unresolved symbol _environ (first referenced in sh\sh1.o)
tmld error   : Unresolved symbol _geteuid (first referenced in sh\sh1.o)
tmld error   : Unresolved symbol _sys_execve (first referenced in sh\sh3.o)
tmld error   : Unresolved symbol _times (first referenced in sh\sh3.o)
tmld fatal   : c:\tmwork\TCS5.01\bin\tmld aborted due to errors
tmcc.exe: tmld command failed
make: *** [sh] Error 1

还有一个问题请教一下,你在uClibc里面和trimedia-gss-linux-tcs-pnx1500el_fp64-uclibc-gcc脚本里面有symbolrename,不知有什么原则?

Guo Hongruan

unread,
Oct 13, 2008, 10:17:42 PM10/13/08
to tml...@googlegroups.com
Also, I have tried my best to avoid using any functions provided by TCS,
but it is impossible to remove it completely. So I have to include some
important part of TCS libraries which has some symbol conflicted with
uClibc. So I have to rename the symbols of uClibc. You can read TCS manual
for more details about symbolrename.

sh and init process uses lots of functions of uClibc and busybox. I don't
want to break the completeness of busybox.

在 Tue, 14 Oct 2008 09:03:42 +0800,freeoicq freeoicq <hkr...@gmail.com>

freeoicq freeoicq

unread,
Oct 13, 2008, 10:23:21 PM10/13/08
to tml...@googlegroups.com
I know the funcion of symbolrename,I have a ideal that could solve the proble,since we just use some function of tcs, can we export what we use to avod include all the tcs lib?

2008/10/14 Guo Hongruan <came...@gmail.com>

Guo Hongruan

unread,
Oct 13, 2008, 10:24:44 PM10/13/08
to tml...@googlegroups.com
Export? Use dll export, Could you give me more hints

在 Tue, 14 Oct 2008 10:23:21 +0800,freeoicq freeoicq <hkr...@gmail.com>

freeoicq freeoicq

unread,
Oct 13, 2008, 10:35:22 PM10/13/08
to tml...@googlegroups.com
What I said may not solve all problems, but could solve most of the problem。As you know,the tmar has a option d(Delete specified objects),with the tmar we could export some objects and replace some objects, than we reconstruct the lib and replace the standard lib, then there is no conflicts.

2008/10/14 Guo Hongruan <guo.ho...@gulessoft.com>

freeoicq freeoicq

unread,
Oct 13, 2008, 10:46:18 PM10/13/08
to tml...@googlegroups.com
And second, we could replace the libc and libam with our lib, I test it already, I think this could work well.

2008/10/14 freeoicq freeoicq <hkr...@gmail.com>

Guo Hongruan

unread,
Oct 14, 2008, 9:04:49 AM10/14/08
to tml...@googlegroups.com
Sorry, I still can not understand you completely. Could you describe your
idea more detail or give an example.

在 Tue, 14 Oct 2008 10:35:22 +0800,freeoicq freeoicq <hkr...@gmail.com>

freeoicq freeoicq

unread,
Oct 14, 2008, 9:35:55 PM10/14/08
to tml...@googlegroups.com
First you can extract all the objs in a lib, than rebuild a lib with necessary objs, delete the objs that not used, than you can get the lib that you need.

2008/10/14 Guo Hongruan <came...@gmail.com>

Guo Hongruan

unread,
Oct 14, 2008, 9:52:30 PM10/14/08
to tml...@googlegroups.com
In tmlinux, I tried to avoid touching any thing about TCS libraries for
the risk of modifing it is too large.

在 Wed, 15 Oct 2008 09:35:55 +0800,freeoicq freeoicq <hkr...@gmail.com>
Reply all
Reply to author
Forward
0 new messages