1 ################################################################################
2 # Copyright (c) [2020] [Radisys] #
4 # Licensed under the Apache License, Version 2.0 (the "License"); #
5 # you may not use this file except in compliance with the License. #
6 # You may obtain a copy of the License at #
8 # http://www.apache.org/licenses/LICENSE-2.0 #
10 # Unless required by applicable law or agreed to in writing, software #
11 # distributed under the License is distributed on an "AS IS" BASIS, #
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
13 # See the License for the specific language governing permissions and #
14 # limitations under the License. #
15 ################################################################################
16 # This script is used to setup environment and install O-DU High
19 if [[ $# -eq 0 ]] ; then
20 echo "ERROR : Missing input to the script"
21 echo "Required : ./install <O-DU_High_Directory_Path_To_Clone_Code>"
28 echo "***** Installation Start *****"
30 if [ -f /etc/os-release ]; then
35 echo "===> Installing GCC"
36 if [ $OS == "ubuntu" ] ; then
37 sudo apt-get install -y build-essential
39 sudo yum groups mark install -y “Development Tools”
43 echo "===> Installing LKSCTP"
44 if [ $OS == "ubuntu" ] ; then
45 sudo apt-get install -y libsctp-dev
47 sudo yum install -y lksctp-tools-devel
51 echo "===> Installing PCAP"
52 if [ $OS == "ubuntu" ] ; then
53 sudo apt-get install -y libpcap-dev
55 sudo yum install -y libpcap-devel
59 echo "===> Installing XTERM"
60 if [ $OS == "ubuntu" ] ; then
61 sudo apt-get install -y xterm
63 sudo yum install -y xterm
67 echo "***** Installation Complete *****"
70 echo "***** Cloning O-DU High *****"
72 git clone "https://gerrit.o-ran-sc.org/r/o-du/l2"
75 cd $CLONE_DIR/l2/build/odu
76 echo "***** Building O-DU Binary *****"
77 make odu MACHINE=BIT64 MODE=FDD
79 echo "***** Building CU Stub Binary *****"
80 make cu_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
82 echo "***** Building RIC Stub Binary *****"
83 make ric_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
86 echo "***** Assigning IP addresses *****"
87 INTERFACE=$(ip route | grep default | sed -e "s/^.*dev.//" -e "s/.proto.*//")
88 INTERFACE="$(echo -e "${INTERFACE}" | tr -d '[:space:]')"
89 ifconfig $INTERFACE:ODU "192.168.130.81"
90 ifconfig $INTERFACE:CU_STUB "192.168.130.82"
91 ifconfig $INTERFACE:RIC_STUB "192.168.130.80"
93 xterm -hold -e "cd $CLONE_DIR/l2/bin/cu_stub; ./cu_stub" &
95 xterm -hold -e "cd $CLONE_DIR//l2/bin/ric_stub; ./ric_stub" &
97 xterm -hold -e "cd $CLONE_DIR//l2/bin/odu; ./odu" &
100 ################################################################################
102 ################################################################################