diff --git a/targets/build_helper.bash b/targets/build_helper.bash index f10cc1d04af6b1e35a515f53e90d26ef89c0dda6..4909d384ab9227a53c733f39ac73ad09fa032e3b 100755 --- a/targets/build_helper.bash +++ b/targets/build_helper.bash @@ -157,6 +157,55 @@ make_certs(){ } +check_install_nettle(){ + if [ ! -f ./.lock_oaibuild ]; then + if [ $UBUNTU_REL = "12.04" ]; then + test_uninstall_package nettle-dev + test_uninstall_package nettle-bin + + if [ ! -d /usr/local/src/ ]; then + echo "/usr/local/src/ doesn't exist please create one" + exit -1 + fi + + if [ ! -w /usr/local/src/ ]; then + echo "You don't have permissions to write to /usr/local/src/, installing as a sudoer" + # exit -1 + fi + + cd /usr/local/src/ + + echo "Downloading nettle archive" + + if [ -f nettle-2.5.tar.gz ]; then + $SUDO rm -f nettle-2.5.tar.gz + fi + if [ -f nettle-2.5.tar ]; then + $SUDO rm -f nettle-2.5.tar + fi + if [ -d nettle-2.5 ]; then + $SUDO rm -rf nettle-2.5/ + fi + + + $SUDO wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz + $SUDO gunzip nettle-2.5.tar.gz + $SUDO echo "Uncompressing nettle archive" + $SUDO tar -xf nettle-2.5.tar + cd nettle-2.5/ + $SUDO ./configure --disable-openssl --enable-shared --prefix=/usr + if [ $? -ne 0 ]; then + exit -1 + fi + echo "Compiling nettle" + $SUDO make -j $NUM_CPU + $SUDO make check + $SUDO make install + cd ../ + fi + fi +} + check_install_freediamter(){ if [ $UBUNTU_REL = "12.04" ]; then @@ -647,8 +696,13 @@ compile_ltesoftmodem() { make $SOFTMODEM_DIRECTIVES make -j $NUM_CPU $SOFTMODEM_DIRECTIVES if [ $? -ne 0 ]; then - echo_error "Build lte-softmodem failed, returning" - return 1 + if [ ! -f ./lte-softmodem ]; then + echo_error "Build lte-softmodem failed, returning" + return 1 + else + cp -f ./lte-softmodem $OPENAIR_TARGETS/bin + return 0 + fi else cp -f ./lte-softmodem $OPENAIR_TARGETS/bin return 0 diff --git a/targets/build_oai.bash b/targets/build_oai.bash index a0db324e686e0aeb4d106d65815c0916de02e909..650f894258752c23b10d10267b285c846991b08d 100755 --- a/targets/build_oai.bash +++ b/targets/build_oai.bash @@ -312,7 +312,8 @@ build_enb(){ check_install_usrp_uhd_driver fi check_install_asn1c - + check_install_nettle + ############################################ # compile ############################################