#!/bin/bash . ./scripts/colors.sh . ./scripts/funcs.sh . ./scripts/config.sh #------------ glibc ---------------------------------------- uclibc() { pkgname=uClibc-ng pkgver=1.0.50 printf "$UGREEN** Building ${pkgname}\n$RESET" mkdir -p $build/${pkgname} # &>> $fulllogfile cd $build/${pkgname} tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.xz # &>> $fulllogfile check $? "Extract ${pkgname}" cd ${pkgname}-${pkgver} cp -rv $UCLIBC_CONFIG_FILE .config sed -i -e "s/KERNEL_HEADERS=/KERNEL_HEADERS=\"..\/..\/kernel-headers\/linux-$KERNEL_VERSION\/usr\/include\"/g" .config make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- oldconfig check $? "Configure ${pkgname}" make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- $makeflags # &>> $fulllogfile check $? "Build ${pkgname}" make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- DESTDIR=$rootfspath install # &>> $fulllogfile check $? "Install ${pkgname} to rootfs" cd $rootfspath find -name \*.a -delete # &>> $fulllogfile find -name \*.o -delete rm -v $rootfspath/usr/lib/libc.so ${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/lib/* $rootfspath/usr/bin/* # &>> $fulllogfile $rootfspath/usr/lib/* rm -rv $rootfspath/usr/include cd $root check $? "Build and install ${pkgname}" } #-----------------------------------------------------------