64549437fb9d36539e757f51dd7d6b5cc06bdf57
[o-du/l2.git] / docs / README
1 Directory Structure :
2 ---------------------
3 1. l2/build/ : contains files required to compile the code
4    a. common : contains individual module's makefile
5    b. odu    : contains main makefile to generate an executable binary
6    c. scripts: contains scripts for logging
7    d. o1     : contains main makefile to generate an executable binary
8
9 2. l2/docs/  : contains README and other configuration files for building docs
10         
11 3. l2/src/ : contains layer specific source code
12    a. 5gnrmac  : MAC source code
13    b. 5gnrrlc  : RLC source code
14    c. cm       : common, environment and interface files
15    d. cu_stub  : Stub code for CU
16    e. du_app   : DU application and F1 code 
17    f. mt       : wrapper functions over OS
18    g. phy_stub : Stub code for Physical layer
19    h. rlog     : logging module
20    i. o1       : o1 module
21
22
23 Pre-requisite for Compilation :
24 -------------------------------
25 1. Linux 32-bit/64-bit machine
26 2. GCC version 4.6.3 and above
27 3. Install LKSCTP
28    a. On Ubuntu : sudo apt-get install -y libsctp-dev
29    b. On CentOS : yum install lksctp-tools-devel
30 4. Install PCAP:
31    a. On ubuntu : sudo apt-get install -y libpcap-dev
32    b. On CentOS : yum install libpcap-devel
33
34
35 Pre-requisite for running O1 module:
36 -----------------------------------
37 Install netconf server
38 ----------------------
39
40 1.      Create new netconf user (login with root user and run following command)
41         $adduser --system netconf && \
42         echo "netconf:netconf" | chpasswd
43
44         $mkdir -p /home/netconf/.ssh && \
45         ssh-keygen -A && \
46         ssh-keygen -t dsa -P '' -f /home/netconf/.ssh/id_dsa && \
47         cat /home/netconf/.ssh/id_dsa.pub > /home/netconf/.ssh/authorized_keys
48 2.      Install netconf packages. 
49         $cd l2/build/o1/
50         $chmod +x install_lib.sh
51         $ ./install_lib.sh
52
53 Install the yang module
54 -----------------------
55 1. cd l2/build/o1/yang
56    sysrepoctl -i o-ran-sc-odu-alarm-v1.yang
57
58
59 How to Clean and Build:
60 -----------------------
61 1. Building ODU binary:
62    a. Build folder
63          cd l2/build/odu
64    b. Building ODU binary
65          make odu MACHINE=BIT64 MODE=FDD
66
67          Build with O1 module enabled:
68          make odu MACHINE=BIT64 MODE=FDD O1_ENABLE=YES
69
70    c. Cleaning ODU binary
71          make clean_odu MACHINE=BIT64 MODE=FDD
72
73 2. Building CU Stub binary:
74    a. Build folder
75          cd l2/build/odu
76    b. Building CU Stub binary
77          make cu_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
78    c. Cleaning CU Stub binary
79          make clean_cu NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
80
81 3. Building RIC Stub binary:
82    a. Build folder
83          cd l2/build/odu
84    b. Building RIC Stub binary
85          make ric_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
86    c. Cleaning RIC Stub binary
87          make clean_ric NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
88
89 4. Cleaning ODU, CU Stub and RIC Stub:
90       make clean_all
91
92 5. Building O1 binary:
93    a. Build folder
94          cd l2/build/o1
95    b. Building O1 binary
96          make o1 MACHINE=BIT64
97    c. Cleaning O1 binary
98          make clean_o1 
99
100
101 How to execute:
102 ---------------
103 1. Assign virtual IP addresses as follows:
104       ifconfig <interface name>:ODU "192.168.130.81"
105       ifconfig <interface name>:CU_STUB "192.168.130.82"
106       ifconfig <interface name>:RIC_STUB "192.168.130.80"
107
108 2. CU execution folder:
109       cd l2/bin/cu_stub
110      
111 3. Run CU Stub binary:
112       ./cu_stub
113
114 4. RIC execution folder:
115       cd l2/bin/ric_stub
116      
117 5. Run RIC Stub binary:
118       ./ric_stub
119
120 6. DU execution folder:
121       cd l2/bin/odu
122      
123 7. Run ODU binary:
124       ./odu
125
126 8. O1 execution folder:
127       cd l2/build/o1/bin/o1
128
129 9. Run O1 binary:
130       ./o1
131
132 PS: CU stub and RIC stub must be run (in no particular sequence) before ODU
133     If O1 module is enabled it must be run before ODU