Commit 4e690de1 authored by Navid Nikaein's avatar Navid Nikaein

update the build script

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5802 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 3f83d5d4
......@@ -275,26 +275,20 @@ check_install_oai_software() {
test_install_package automake
test_install_package bison
test_install_package build-essential
test_install_package cmake
test_install_package cmake-curses-gui
test_install_package dkms
test_install_package flex
test_install_package gawk
test_install_package gcc
test_install_package gdb
test_install_package make
test_install_package cmake
test_install_package openssh-client
test_install_package openssh-server
test_install_package swig
test_install_package unzip
test_install_package valgrind
test_install_package autoconf
test_install_package automake
test_install_package bison
test_install_package build-essential
test_install_package check
test_install_package cmake
test_install_package cmake-curses-gui
test_install_package ethtool
test_install_package flex
test_install_package g++
......@@ -330,46 +324,34 @@ check_install_oai_software() {
test_install_package libtasn1-3-dev
test_install_package libxml2
test_install_package libxml2-dev
test_install_package linux-headers-`uname -r`
test_install_package make
test_install_package openssh-client
test_install_package openssh-server
# test_install_package linux-headers-`uname -r`
test_install_package openssl
test_install_package libssl-dev
test_install_package nettle-dev
test_install_package nettle-bin
test_install_package openvpn
test_install_package libssl-dev
test_install_package pkg-config
test_install_package python-dev
test_install_package python-pexpect
test_install_package sshfs
test_install_package subversion
test_install_package swig
test_install_package tshark
test_install_package uml-utilities
test_install_package unzip
test_install_package valgrind
test_install_package vlan
test_install_package doxygen
# uninstall some automatically installed packges
# we need a newer version
# test_uninstall_package libnettle4
check_install_freediamter
else
if [ ! -d /usr/local/etc/freeDiameter ]; then
check_install_freediamter
fi
fi
echo "$OPENAIR_TARGETS/bin/install_log.txt"
if [ $OAI_INSTALLED = 1 ]; then
touch ./.lock_oaibuild
fi
if [ ! -d /usr/local/etc/freeDiameter ]; then
# This script make certificates also
# echo "run the install script for free diameter "
# cd $OPENAIRCN_DIR/S6A/freediameter/ && ./install_freediameter.sh
check_install_freediamter
else
echo_success "freediameter is installed"
check_s6a_certificate
fi
echo_success "freediameter is installed"
check_s6a_certificate
test_command_install_script "asn1c" "$OPENAIRCN_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash $SUDO"
......@@ -427,6 +409,8 @@ check_install_hss_software() {
test_install_package sshfs
test_install_package swig
test_install_package unzip
test_install_package nettle-bin
test_install_package nettle-dev
test_install_package valgrind
}
......@@ -727,8 +711,8 @@ install_oaisim() {
###############################
set_openair_env(){
index=`pwd | grep -b -o targets | cut -d: -f1`
if [ $index = "" ] || [ $index= " " ] ; then
index=`pwd | grep -b -o /targets | cut -d: -f1`
if [ $index = "" ] ; then
echo_error "Please run the script from targets directory or any child directories"
else
oai_path=`pwd | cut -c1-$index`
......
......@@ -159,7 +159,7 @@ mkdir -m 777 -p bin
build_date=`date +%Y_%m_%d`
oai_build_date="oai_built_${build_date}"
touch bin/${oai_build_date}
touch bin/install_log.txt
################################
# cleanup first
################################
......@@ -242,8 +242,7 @@ echo "OAISIM Compilation directive: $OAISIM_DIRECTIVES" >> bin/${oai_build_d
echo_info "3. Setting the OAI PATHS ..."
output=$(set_openair_env 2>&1)
set_openair_env
cecho "OPENAIR_HOME = $OPENAIR_HOME" $green
cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
......@@ -265,8 +264,7 @@ echo "OPENAIR_TARGETS = $OPENAIR_TARGETS" >> bin/${oai_build_date}
echo_info "6. Checking the installation ..."
output=$(check_install_oai_software >> bin/install_log.txt 2>&1 )
check_install_oai_software
############################################
# compile
......@@ -279,18 +277,18 @@ oaisim_compiled=1
unisim_compiled=1
if [ $TARGET = "ALL" ]; then
echo "############# compile_ltesoftmodem #############" >> bin/install_log.txt
output=$(compile_ltesoftmodem $OAI_CLEAN >> bin/install_log.txt 2>&1 )
echo "############# compile_ltesoftmodem #############"
output=$(compile_ltesoftmodem $OAI_CLEAN )
softmodem_compiled=$?
check_for_ltesoftmodem_executable
echo "################ compile_oaisim #################" >> bin/install_log.txt
output=$(compile_oaisim $OAI_CLEAN >> bin/install_log.txt 2>&1 )
echo "################ compile_oaisim #################"
output=$(compile_oaisim $OAI_CLEAN )
oaisim_compiled=$?
check_for_oaisim_executable
echo "################## compile_unisim ##################" >> bin/install_log.txt
output=$(compile_unisim $OAI_CLEAN >> bin/install_log.txt 2>&1 )
echo "################## compile_unisim ##################"
output=$(compile_unisim $OAI_CLEAN )
unisim_compiled=$?
check_for_dlsim_executable
check_for_ulsim_executable
......@@ -303,20 +301,20 @@ if [ $TARGET = "ALL" ]; then
else
if [ $TARGET = "SOFTMODEM" ]; then
echo "################ compile_ltesoftmodem #################" >> bin/install_log.txt
output=$(compile_ltesoftmodem $OAI_CLEAN >> bin/install_log.txt 2>&1 )
echo "################ compile_ltesoftmodem #################"
output=$(compile_ltesoftmodem $OAI_CLEAN )
softmodem_compiled=$?
check_for_ltesoftmodem_executable
fi
if [ $TARGET = "OAISIM" ]; then
echo "################ compile_oaisim ###############" >> bin/install_log.txt
output=$(compile_oaisim $OAI_CLEAN >> bin/install_log.txt 2>&1 )
echo "################ compile_oaisim ###############"
output=$(compile_oaisim $OAI_CLEAN )
oaisim_compiled=$?
check_for_oaisim_executable
fi
if [ $TARGET = "UNISIM" ]; then
echo "################ compile_unisim ###############" >> bin/install_log.txt
output=$(compile_unisim $OAI_CLEAN >> bin/install_log.txt 2>&1 )
echo "################ compile_unisim ###############"
output=$(compile_unisim $OAI_CLEAN )
unisim_compiled=$?
check_for_dlsim_executable
check_for_ulsim_executable
......@@ -338,19 +336,20 @@ echo_info "8. Installing ..."
if [ $softmodem_compiled = 0 ]; then
echo_success "target lte-softmodem built "
echo "target lte-softmodem built " >> bin/${oai_build_date}
output=$(install_ltesoftmodem $RT $HW $ENB_S1 >> bin/install_log.txt 2>&1)
output=$(install_ltesoftmodem $RT $HW $ENB_S1 )
fi
if [ $oaisim_compiled = 0 ]; then
echo_success "target oaisim built "
echo "target oaisim built " >> bin/${oai_build_date}
output=$(install_oaisim $ENB_S1 >> bin/install_log.txt 2>&1 )
output=$(install_oaisim $ENB_S1 )
fi
if [ $unisim_compiled = 0 ]; then
echo_success "target unisim built "
echo "target unisim built " >> bin/${oai_build_date}
fi
echo_info "build terminated, see logs is $OPENAIR_TARGETS/bin/install_log.txt"
echo_info "build terminated, binaries are located in bin/"
echo_info "build terminated, logs are located in bin/${oai_build_date}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment