On Sunday 18 April 2010 11:47:34 Matthias Hofmann wrote: > Hello, > > i use a uclibc crosscompiler toolchain to build programs for my target > system which is based on embedded linux, but my programs are not running > properly there, especially shared libraries. > > how to install uclibc on my embedded target system?
You need to copy the *.so files it generates to your target's /lib directory. (libcrypt, libdl, libm, libpthread, librt, libutil, and of course libuClibc itself). You may also need some symlinks pointing to them (such as libc.so.0 pointing to libuClibc-0.9.31.so), and you'll also need to grab the shared library loader (ld-uClibc-0.9.31.so) which has to be installed at an absolute path (in /usr) so the uClibc builds an "ldd" command that's fairly useful, if you do "make utils". (Or is it "make hostutils"?) That command lists the libraries a shared binary links against, and where they can be found if they're in the current search path. The ldd that comes with glibc doesn't work on uClibc binaries (because the glibc version is stupid and badly designed, if you ask me), the uClibc one works on both. The readelf -a command also gives you this info (and a lot more), you just have to dig through a lot of noise to get the shared library list when using that tool... My Firmware Linux project has prebuilt root filesystem and system image tarballs you can download and investigate, if you like: http://impactlinux.com/fwl/downloads/binaries (The root filesystems are a tarball of files you can chroot into on an appropriate target, the system images are packaged to boot under qemu with the included run-emulator.sh script. The reason they're so big is they contain native development tools, and there's not a lot you can do to get gcc down under 12 megs. Next release I'll probably split out base and development tarballs.) The Linux From Scratch project is a marvelous way to learn all this stuff. You might actually want to grab one of the _old_ versions from back when it was much simpler: http://archive.linuxfromscratch.org/lfs-museum/3.0/LFS-BOOK-3.0-HTML/ The modern book is about twice the size of that, and goes into great detail about the gnu tools that you don't need if you're doing uClibc and BusyBox. (I need to write an embedded linux from scratch, I just haven't yet...) Rob -- Latency is more important than throughput. It's that simple. - Linus Torvalds _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
