Embedded 版 (精华区)
发信人: he (无情的雨), 信区: Embedded_system
标 题: linux for ppc chapter 12
发信站: 哈工大紫丁香 (2001年06月04日11:06:02 星期一), 站内信件
----------------------------------------------------------------------------
----
12. Runtime Library
12.1 glibc
http://www.gnu.org/software/libc/ and http://sources.redhat.com/glibc/
Modern releases of glibc are very large for a traditional embedded system. I
f your application requires only one or two user programs, you can staticall
y link them to avoid requiring the entire dynamic library. Another option is
to hand-strip the dynamic library to a bare minimum.
The are some modifications required to official glibc-2.1.x releases to make
them work in the embedded PowerPC environment, such as cache line size mods
. See: http://lists.linuxppc.org/listarcs/linuxppc-embedded/199909/msg00000.
html
After applying these mods, glibc-2.1.x can be configured for cross-compiling
with:
#!/bin/sh
export PATH=/path/to/local/i686-pc-linux-gnu/bin:$PATH
export CFLAGS="-msoft-float -O2 -DNDEBUG=1"
export CC=powerpc-linux-gcc
export AR=powerpc-linux-ar
export RANLIB=powerpc-linux-ranlib
configure --host=powerpc-linux --prefix=/path/to/local/powerpc-linux \
--with-headers=/path/to/linux-2.2.13/include --enable-add-ons=linuxthrea
ds \
--with-gnu-as --with-gnu-ld --disable-sanity-checks --without-fp
There is a magic script named mklibs.sh which removes unused functions from
the shared C library in the Debian Boot Floppies package, at: ftp://ftp.us.d
ebian.org/debian/dists/potato/main/source/admin/boot-floppies_2.2.16.tar.gz
12.2 sglibc
http://sourceforge.net/projects/sglibc and http://external-lists.varesearch.
com/lists/listinfo/sglibc
This is an attempt to produce a small glibc-compatible C runtime library sub
set suitable for embedded systems.
To cut down some of the bloat in glibc, apply the patches at: http://externa
l-lists.varesearch.com/archives/sglibc/1999-September/000007.html ftp://ftp.
valinux.com/pub/support/hjl/glibc/glibc-old_version.tar.gz
12.3 uClibc
http://opensource.lineo.com/cgi-bin/cvsweb/uClibc/
uC-Libc is a C library for embedded systems developed originally for uClinux
, and now being ported to other architectures including PowerPC. It has a di
er architectures including PowerPC. It has a di
fferent set of design goals from GNU libc, but for many embedded systems it
is a sensible choice.
12.4 dietlibc
http://www.fefe.de/dietlibc/
This project aims to make it easy to create small statically linked programs
under Linux.
12.5 newlib
http://sources.redhat.com/newlib/
Newlib is a free C library intended for use on embedded systems, with less r
estrictive licensing than the GPL. However, it currently lacks the libgloss
layer necessary to use it as the C library under Linux.
12.6 libc5
Older Linux libc's are often quite small, but generally not supported by any
one now.
----------------------------------------------------------------------------
----
--
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.235.250]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.144毫秒