diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash b/targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash index f6d52173f509612707c659ccedd107893bda365a..10b22c088c03c26a976d360d9ace8ccbb213f180 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash @@ -93,7 +93,7 @@ ########################################################### # Parameters ########################################################### -declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 Rel10=1 ASN_DEBUG=1 EMIT_ASN_DEBUG=1" +declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim DEBUG=1 ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 Rel10=1 ASN_DEBUG=1 EMIT_ASN_DEBUG=1" declare MAKE_IP_DRIVER_TARGET="ue_ip.ko" declare IP_DRIVER_NAME="ue_ip" declare LTEIF="oip1" @@ -101,7 +101,7 @@ declare UE_IPv4="10.0.0.8" declare UE_IPv6="2001:1::8" declare UE_IPv6_CIDR=$UE_IPv6"/64" declare UE_IPv4_CIDR=$UE_IPv4"/24" - +PACKAGE_LIST= ########################################################### THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) @@ -119,16 +119,54 @@ else fi -test_command_install_package "tshark" "tshark" "--force-yes" -test_command_install_package "gccxml" "gccxml" "--force-yes" -test_command_install_package "vconfig" "vlan" -test_command_install_package "iptables" "iptables" -test_command_install_package "iperf" "iperf" -test_command_install_package "ip" "iproute" -#test_command_install_script "ovs-vsctl" "$OPENAIRCN_DIR/SCRIPTS/install_openvswitch1.9.0.bash" -test_command_install_package "tunctl" "uml-utilities" -#test_command_install_lib "/usr/lib/libconfig.so" "libconfig-dev" - +test_install_package libxml2 +test_install_package libxml2-dev +test_install_package libforms-bin +test_install_package libforms-dev +test_install_package openssl +test_install_package libatlas-base-dev +test_install_package libatlas-dev +test_install_package autoconf +test_install_package automake +test_install_package gawk +test_install_package cmake +test_install_package make +test_install_package gcc +test_install_package flex +test_install_package bison +test_install_package libsctp1 +test_install_package libsctp-dev +test_install_package libidn2-0-dev +test_install_package libidn11-dev +test_install_package libmysqlclient-dev +test_install_package libxml2-dev +test_install_package swig +test_install_package python-dev +test_install_package cmake-curses-gui +test_install_package valgrind +test_install_package guile-2.0-dev +test_install_package libgmp-dev +test_install_package libgcrypt11-dev +test_install_package gdb +test_install_package unzip +test_install_package libtasn1-3-dev +test_install_package g++ +test_install_package linux-headers-`uname -r` +test_install_package build-essential +test_install_package libblas +test_install_package libblas-dev +test_install_package libgtk-3-dev +test_install_package tshark +test_install_package gccxml +test_install_package vlan +test_install_package iptables +test_install_package iperf +test_install_package iproute +test_install_package uml-utilities +test_install_package libconfig-dev +test_install_package libsctp-dev +test_install_package libsctp1 +test_install_package libpthread-stubs0-dev test_command_install_script "asn1c" "$OPENAIRCN_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash" diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash b/targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash index c94af52aa9b57cd33343fabbe632131f7d0c9697..436390d1c4f8a52e0deabb42b318c52a4879891d 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash @@ -112,24 +112,54 @@ else fi -test_command_install_package "tshark" "tshark" "--force-yes" -test_command_install_package "gccxml" "gccxml" "--force-yes" -test_command_install_package "gcc" "gcc" "--force-yes" -test_command_install_package "g++" "g++" "--force-yes" -test_command_install_package "automake" "automake" "--force-yes" -test_command_install_package "vconfig" "vlan" "--force-yes" -test_command_install_package "iptables" "iptables" -test_command_install_package "iperf" "iperf" "--force-yes" -test_command_install_package "ip" "iproute" -test_command_install_script "ovs-vsctl" "$OPENAIRCN_DIR/SCRIPTS/install_openvswitch1.9.0.bash" -test_command_install_package "tunctl" "uml-utilities" -test_command_install_package "bison" "bison" "--force-yes" -test_command_install_package "flex" "flex" "--force-yes" -test_command_install_package "libtool" "libtool" "--force-yes" -#test_command_install_lib "/usr/lib/libconfig.so" "libconfig-dev" "--force-yes" -#test_command_install_lib "/usr/lib/libsctp-dev.so" "libsctp-dev" "--force-yes" -#test_command_install_lib "/usr/lib/libsctp.so" "libsctp1" "--force-yes" -#test_command_install_lib "/usr/lib/libpthread-stubs0-dev.so" "libpthread-stubs0-dev" "--force-yes" +test_install_package libxml2 +test_install_package libxml2-dev +test_install_package libforms-bin +test_install_package libforms-dev +test_install_package openssl +test_install_package libatlas-base-dev +test_install_package libatlas-dev +test_install_package autoconf +test_install_package automake +test_install_package gawk +test_install_package cmake +test_install_package make +test_install_package gcc +test_install_package flex +test_install_package bison +test_install_package libsctp1 +test_install_package libsctp-dev +test_install_package libidn2-0-dev +test_install_package libidn11-dev +test_install_package libmysqlclient-dev +test_install_package libxml2-dev +test_install_package swig +test_install_package python-dev +test_install_package cmake-curses-gui +test_install_package valgrind +test_install_package guile-2.0-dev +test_install_package libgmp-dev +test_install_package libgcrypt11-dev +test_install_package gdb +test_install_package unzip +test_install_package libtasn1-3-dev +test_install_package g++ +test_install_package linux-headers-`uname -r` +test_install_package build-essential +test_install_package libblas +test_install_package libblas-dev +test_install_package libgtk-3-dev +test_install_package tshark +test_install_package gccxml +test_install_package vlan +test_install_package iptables +test_install_package iperf +test_install_package iproute +test_install_package uml-utilities +test_install_package libconfig-dev +test_install_package libsctp-dev +test_install_package libsctp1 +test_install_package libpthread-stubs0-dev if [ ! -d /usr/local/etc/freeDiameter ] then # This script make certificates also diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash b/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash index 97e3c64d0b190d90719fec9dd39dc4882fa40868..151c715b649ee5febf262af6ee0f05537f8503d9 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash @@ -302,31 +302,16 @@ assert() { } -test_command_install_lib() { - # usage: test_command_install_package searched_binary package_to_be_installed_if_binary_not_found optional_option_to_apt_get_install - if [ ! -f $1 ]; then - echo_warning "$2 seems to be not installed, trying..." - apt-get install $3 $2 -y - if [ ! -f $1 ]; then - echo_fatal "$1 unavailable" - fi +test_install_package() { + # usage: test_install_package package_name + if [ $# -eq 1 ]; then + dpkg -s "$1" > /dev/null 2>&1 && { + echo "$1 is installed." + } || { + echo "$1 is not installed." + apt-get install $1 --force-yes + } fi - echo_success "$1 available" -} - - -test_command_install_package() { - # usage: test_command_install_package searched_binary package_to_be_installed_if_binary_not_found optional_option_to_apt_get_install - if [ $# -eq 2 ]; then - command -v $1 >/dev/null 2>&1 || { echo_warning "Program $1 is not installed. Trying installing it." >&2; apt-get install $2 -y; command -v $1 >/dev/null 2>&1 || { echo_fatal "Program $1 is not installed. Aborting." >&2;};} - else - if [ $# -eq 3 ]; then - command -v $1 >/dev/null 2>&1 || { echo_warning "Program $1 is not installed. Trying installing it (apt-get install $3 $2)." >&2; apt-get install $3 $2 -y; command -v $1 >/dev/null 2>&1 || { echo_fatal "Program $1 is not installed. Aborting." >&2; };} - else - echo_fatal "test_command_install_package: BAD PARAMETER" - fi - fi - echo_success "$1 available" } test_command_install_script() {