The uClibc package contains ... TO BE WRITTEN
Put the pre-generated locale tarball where uClibc can find it:
install -m444 ../uClibc-locale-030818.tgz extra/locale/
This patch will get you started:
patch -Np1 -i ../uClibc-20070404-config-1.patch
Next run menuconfig. This is very similar to the kernel's menuconfig.
UCLIBC_HAS_WCHAR is needed to build g++. UCLIBC_HAS_RPC is needed to build Util-Linux (nfsmount). UCLIBC_HAS_FULL_RPC is not required, but Util-Linux will use pre-generated data if it is not enabled. DO_C99_MATH is needed for Iproute2 for the rint(3) function. UCLIBC_HAS_GLIBC_CUSTOM_PRINTF (printf.h) is needed for some packages, like Reiserfsprogs, but nothing in the base system. UCLIBC_HAS_WORDEXP is needed to install Alsa-Lib. Enable all the security options, ignore the SSP kill signal option (they all do the same thing). Use your own judgment for the rest. The make defconfig and make allyesconfig targets are not recommended.
Things you might want to add are Processor-Family, and IPV6.
make menuconfig
The run time path gets hard coded into ldd, and so on. So we reset these installations paths now before compiling anything. While we're at it we can tell uClibc where to find the new kernel headers:
sed -e \
's@.*SHARED_LIB_LOADER_PREFIX.*@SHARED_LIB_LOADER_PREFIX="/lib"@g' \
-e 's@.*RUNTIME_PREFIX.*@RUNTIME_PREFIX="/"@g' \
-e 's@.*DEVEL_PREFIX.*@DEVEL_PREFIX="/usr/"@g' \
-e 's@.*KERNEL_HEADERS.*@KERNEL_HEADERS="/usr/include"@g' -i.orig .config
Compile and install the package:
make make install
Then make and install the utilities:
make headers
make CC="gcc -Wl,--dynamic-linker,/lib/ld-uClibc.so.0 /lib/libc.so.0" \
-C utils
make -C utils install
Remove the static libs. Save libc.a for GCC's tests. libdl.a is needed for Binutils testsuite:
install -vd /usr/lib/static/
mv -v /usr/lib/{libcrypt,libm,libnsl,libpthread}.a /usr/lib/static
mv -v /usr/lib/{libresolv,librt,libutil}.a /usr/lib/static/
Remove these symlinks:
rm -v /usr/lib/{libc_pic,libcrypt_pic,libm_pic,libnsl_pic}.a
rm -v /usr/lib/{libpthread_pic,libresolv_pic,librt_pic,libutil_pic}.a
Unpack and cd to the Gettext source, then configure and build libintl:
cd gettext-runtime/
./configure --prefix=/usr --libdir=/lib \
--with-included-gettext --disable-static \
--enable-relocatable --disable-rpath
make -C intl/
Install the libintl.so library and header:
make -C intl/ install rm -v /lib/libintl.so ln -vsf ../../lib/libintl.so.3 /usr/lib/libintl.so
Create a new file /etc/ld.so.conf by running the following:
echo "/usr/local/lib" > ld.so.conf.new install -v -m644 ld.so.conf.new /etc/ld.so.conf
The system timezone is set with the /etc/TZ file. Users can use the TZ environment variable for their local time. See http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html and/or http://leaf.sourceforge.net/doc/guide/buci-tz.html#id2599108 for a more complete description. This example is for eastern standard time, and it will adjust by 1 hour automatically for daylight savings time:
echo "EST5EDT" > TZ.new install -m644 TZ.new /etc/TZ