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() { ...@@ -275,26 +275,20 @@ check_install_oai_software() {
test_install_package automake test_install_package automake
test_install_package bison test_install_package bison
test_install_package build-essential 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 flex
test_install_package gawk test_install_package gawk
test_install_package gcc test_install_package gcc
test_install_package gdb test_install_package gdb
test_install_package make test_install_package make
test_install_package cmake
test_install_package openssh-client test_install_package openssh-client
test_install_package openssh-server test_install_package openssh-server
test_install_package swig
test_install_package unzip test_install_package unzip
test_install_package valgrind
test_install_package autoconf test_install_package autoconf
test_install_package automake test_install_package automake
test_install_package bison test_install_package bison
test_install_package build-essential test_install_package build-essential
test_install_package check test_install_package check
test_install_package cmake
test_install_package cmake-curses-gui
test_install_package ethtool test_install_package ethtool
test_install_package flex test_install_package flex
test_install_package g++ test_install_package g++
...@@ -330,46 +324,34 @@ check_install_oai_software() { ...@@ -330,46 +324,34 @@ check_install_oai_software() {
test_install_package libtasn1-3-dev test_install_package libtasn1-3-dev
test_install_package libxml2 test_install_package libxml2
test_install_package libxml2-dev test_install_package libxml2-dev
test_install_package linux-headers-`uname -r` # test_install_package linux-headers-`uname -r`
test_install_package make
test_install_package openssh-client
test_install_package openssh-server
test_install_package openssl test_install_package openssl
test_install_package libssl-dev test_install_package libssl-dev
test_install_package nettle-dev
test_install_package nettle-bin
test_install_package openvpn
test_install_package pkg-config test_install_package pkg-config
test_install_package python-dev test_install_package python-dev
test_install_package python-pexpect test_install_package python-pexpect
test_install_package sshfs test_install_package sshfs
test_install_package subversion 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 valgrind
test_install_package vlan
test_install_package doxygen
# uninstall some automatically installed packges # uninstall some automatically installed packges
# we need a newer version # we need a newer version
# test_uninstall_package libnettle4 # test_uninstall_package libnettle4
check_install_freediamter
else
if [ ! -d /usr/local/etc/freeDiameter ]; then
check_install_freediamter
fi
fi fi
echo "$OPENAIR_TARGETS/bin/install_log.txt"
if [ $OAI_INSTALLED = 1 ]; then if [ $OAI_INSTALLED = 1 ]; then
touch ./.lock_oaibuild touch ./.lock_oaibuild
fi fi
if [ ! -d /usr/local/etc/freeDiameter ]; then echo_success "freediameter is installed"
# This script make certificates also check_s6a_certificate
# 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
test_command_install_script "asn1c" "$OPENAIRCN_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash $SUDO" test_command_install_script "asn1c" "$OPENAIRCN_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash $SUDO"
...@@ -427,6 +409,8 @@ check_install_hss_software() { ...@@ -427,6 +409,8 @@ check_install_hss_software() {
test_install_package sshfs test_install_package sshfs
test_install_package swig test_install_package swig
test_install_package unzip test_install_package unzip
test_install_package nettle-bin
test_install_package nettle-dev
test_install_package valgrind test_install_package valgrind
} }
...@@ -727,8 +711,8 @@ install_oaisim() { ...@@ -727,8 +711,8 @@ install_oaisim() {
############################### ###############################
set_openair_env(){ set_openair_env(){
index=`pwd | grep -b -o targets | cut -d: -f1` index=`pwd | grep -b -o /targets | cut -d: -f1`
if [ $index = "" ] || [ $index= " " ] ; then if [ $index = "" ] ; then
echo_error "Please run the script from targets directory or any child directories" echo_error "Please run the script from targets directory or any child directories"
else else
oai_path=`pwd | cut -c1-$index` oai_path=`pwd | cut -c1-$index`
......
...@@ -159,7 +159,7 @@ mkdir -m 777 -p bin ...@@ -159,7 +159,7 @@ mkdir -m 777 -p bin
build_date=`date +%Y_%m_%d` build_date=`date +%Y_%m_%d`
oai_build_date="oai_built_${build_date}" oai_build_date="oai_built_${build_date}"
touch bin/${oai_build_date} touch bin/${oai_build_date}
touch bin/install_log.txt
################################ ################################
# cleanup first # cleanup first
################################ ################################
...@@ -242,8 +242,7 @@ echo "OAISIM Compilation directive: $OAISIM_DIRECTIVES" >> bin/${oai_build_d ...@@ -242,8 +242,7 @@ echo "OAISIM Compilation directive: $OAISIM_DIRECTIVES" >> bin/${oai_build_d
echo_info "3. Setting the OAI PATHS ..." echo_info "3. Setting the OAI PATHS ..."
output=$(set_openair_env 2>&1) set_openair_env
cecho "OPENAIR_HOME = $OPENAIR_HOME" $green cecho "OPENAIR_HOME = $OPENAIR_HOME" $green
cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
...@@ -265,8 +264,7 @@ echo "OPENAIR_TARGETS = $OPENAIR_TARGETS" >> bin/${oai_build_date} ...@@ -265,8 +264,7 @@ echo "OPENAIR_TARGETS = $OPENAIR_TARGETS" >> bin/${oai_build_date}
echo_info "6. Checking the installation ..." echo_info "6. Checking the installation ..."
output=$(check_install_oai_software >> bin/install_log.txt 2>&1 ) check_install_oai_software
############################################ ############################################
# compile # compile
...@@ -279,18 +277,18 @@ oaisim_compiled=1 ...@@ -279,18 +277,18 @@ oaisim_compiled=1
unisim_compiled=1 unisim_compiled=1
if [ $TARGET = "ALL" ]; then if [ $TARGET = "ALL" ]; then
echo "############# compile_ltesoftmodem #############" >> bin/install_log.txt echo "############# compile_ltesoftmodem #############"
output=$(compile_ltesoftmodem $OAI_CLEAN >> bin/install_log.txt 2>&1 ) output=$(compile_ltesoftmodem $OAI_CLEAN )
softmodem_compiled=$? softmodem_compiled=$?
check_for_ltesoftmodem_executable check_for_ltesoftmodem_executable
echo "################ compile_oaisim #################" >> bin/install_log.txt echo "################ compile_oaisim #################"
output=$(compile_oaisim $OAI_CLEAN >> bin/install_log.txt 2>&1 ) output=$(compile_oaisim $OAI_CLEAN )
oaisim_compiled=$? oaisim_compiled=$?
check_for_oaisim_executable check_for_oaisim_executable
echo "################## compile_unisim ##################" >> bin/install_log.txt echo "################## compile_unisim ##################"
output=$(compile_unisim $OAI_CLEAN >> bin/install_log.txt 2>&1 ) output=$(compile_unisim $OAI_CLEAN )
unisim_compiled=$? unisim_compiled=$?
check_for_dlsim_executable check_for_dlsim_executable
check_for_ulsim_executable check_for_ulsim_executable
...@@ -303,20 +301,20 @@ if [ $TARGET = "ALL" ]; then ...@@ -303,20 +301,20 @@ if [ $TARGET = "ALL" ]; then
else else
if [ $TARGET = "SOFTMODEM" ]; then if [ $TARGET = "SOFTMODEM" ]; then
echo "################ compile_ltesoftmodem #################" >> bin/install_log.txt echo "################ compile_ltesoftmodem #################"
output=$(compile_ltesoftmodem $OAI_CLEAN >> bin/install_log.txt 2>&1 ) output=$(compile_ltesoftmodem $OAI_CLEAN )
softmodem_compiled=$? softmodem_compiled=$?
check_for_ltesoftmodem_executable check_for_ltesoftmodem_executable
fi fi
if [ $TARGET = "OAISIM" ]; then if [ $TARGET = "OAISIM" ]; then
echo "################ compile_oaisim ###############" >> bin/install_log.txt echo "################ compile_oaisim ###############"
output=$(compile_oaisim $OAI_CLEAN >> bin/install_log.txt 2>&1 ) output=$(compile_oaisim $OAI_CLEAN )
oaisim_compiled=$? oaisim_compiled=$?
check_for_oaisim_executable check_for_oaisim_executable
fi fi
if [ $TARGET = "UNISIM" ]; then if [ $TARGET = "UNISIM" ]; then
echo "################ compile_unisim ###############" >> bin/install_log.txt echo "################ compile_unisim ###############"
output=$(compile_unisim $OAI_CLEAN >> bin/install_log.txt 2>&1 ) output=$(compile_unisim $OAI_CLEAN )
unisim_compiled=$? unisim_compiled=$?
check_for_dlsim_executable check_for_dlsim_executable
check_for_ulsim_executable check_for_ulsim_executable
...@@ -338,19 +336,20 @@ echo_info "8. Installing ..." ...@@ -338,19 +336,20 @@ echo_info "8. Installing ..."
if [ $softmodem_compiled = 0 ]; then if [ $softmodem_compiled = 0 ]; then
echo_success "target lte-softmodem built " echo_success "target lte-softmodem built "
echo "target lte-softmodem built " >> bin/${oai_build_date} 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 fi
if [ $oaisim_compiled = 0 ]; then if [ $oaisim_compiled = 0 ]; then
echo_success "target oaisim built " echo_success "target oaisim built "
echo "target oaisim built " >> bin/${oai_build_date} 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 fi
if [ $unisim_compiled = 0 ]; then if [ $unisim_compiled = 0 ]; then
echo_success "target unisim built " echo_success "target unisim built "
echo "target unisim built " >> bin/${oai_build_date} echo "target unisim built " >> bin/${oai_build_date}
fi 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