blob: fb7c9121e1a6bf85628ef66baaaf2a946a7608d7 [file] [log] [blame]
Xiaohua Zhangd56a96b2019-10-25 09:32:32 +08001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
Jackie Huang9d2dd052019-11-14 15:01:29 +08002.. SPDX-License-Identifier: CC-BY-4.0
3.. Copyright (C) 2019 Wind River Systems, Inc.
4
5Developer-Guide
6===============
Xiaohua Zhangd56a96b2019-10-25 09:32:32 +08007
weichen247a1d52019-11-06 04:20:43 -05008.. contents::
9 :depth: 3
10 :local:
Xiaohua Zhangd56a96b2019-10-25 09:32:32 +080011
Chris Lott5972d172019-11-06 15:28:01 +000012
Jackie Huang9d2dd052019-11-14 15:01:29 +080013This project implements a real time platform to deploy the O-CU and O-DU and it's based on Yocto/OpenEmbedded.
Chris Lott5972d172019-11-06 15:28:01 +000014
Jackie Huang9d2dd052019-11-14 15:01:29 +080015This includes a Yocto/OpenEmbedded compatible layer meta-oran and wrapper scripts
16to pull all required Yocto/OE layers to build out the reference platform.
Xiaohua Zhangd56a96b2019-10-25 09:32:32 +080017
Jackie Huang9d2dd052019-11-14 15:01:29 +080018To contribute on this project, basic knowledge of Yocto/OpenEmbedded is needed, please refer to the following docs if you want to learn about how to develop with Yocto/OpenEmbedded:
Xiaohua Zhangd56a96b2019-10-25 09:32:32 +080019
Jackie Huang9d2dd052019-11-14 15:01:29 +080020- `Yocto dev manual`_
21- `OpenEmbedded wiki`_
Xiaohua Zhangd56a96b2019-10-25 09:32:32 +080022
Jackie Huang9d2dd052019-11-14 15:01:29 +080023.. _`Yocto dev manual`: https://www.yoctoproject.org/docs/2.6.3/dev-manual/dev-manual.html
24.. _`OpenEmbedded wiki`: http://www.openembedded.org/wiki/Main_Page
Xiaohua Zhangd56a96b2019-10-25 09:32:32 +080025
26
27Processes
28---------
29
Jackie Huang9d2dd052019-11-14 15:01:29 +0800301. Prerequisite for build environment
31`````````````````````````````````````
32
33* Your host need to meet the requirements for Yocto, please refer to:
34
35 * `Compatible Linux Distribution`_
36 * `Supported Linux Distributions`_
37 * `Required Packages for the Build Host`_
38
39* The recommended and tested host is Ubuntu 16.04/18.04 and CentOS 7.
40
41 * To install the required packages for Ubuntu 16.04/18.04:
42
43.. _`Compatible Linux Distribution`: https://www.yoctoproject.org/docs/2.6.3/brief-yoctoprojectqs/brief-yoctoprojectqs.html#brief-compatible-distro
Jackie Huang7ed35602019-11-14 16:53:51 +080044.. _`Supported Linux Distributions`: https://www.yoctoproject.org/docs/2.6.3/ref-manual/ref-manual.html#detailed-supported-distros
Jackie Huang9d2dd052019-11-14 15:01:29 +080045.. _`Required Packages for the Build Host`: https://www.yoctoproject.org/docs/2.6.3/ref-manual/ref-manual.html#required-packages-for-the-build-host
46
47::
48
49 $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
50 build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
51 xz-utils debianutils iputils-ping make xsltproc docbook-utils fop dblatex xmlto \
52 python-git
53
54 * To install the required packages for CentOS 7:
55
56::
57
58 $ sudo yum install -y epel-release
59 $ sudo yum makecache
60 $ sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \
61 diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat \
62 perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-Digest-SHA \
63 python34-pip xz which SDL-devel xterm
Xiaohua Zhangd56a96b2019-10-25 09:32:32 +080064
65
Jackie Huang4ea6c302020-06-10 10:25:32 +0800662. Use wrapper script build_inf.sh to setup build env and build the INF AIO x86 image
67`````````````````````````````````````````````````````````````````````````````````````
Jackie Huang7694fb22020-06-08 15:19:52 +080068
69::
70
71 # Get the wrapper script with either curl or wget
72 $ curl -o build_inf.sh 'https://gerrit.o-ran-sc.org/r/gitweb?p=pti/rtp.git;a=blob_plain;f=scripts/build_inf.sh;hb=HEAD'
73 $ wget -O build_inf.sh 'https://gerrit.o-ran-sc.org/r/gitweb?p=pti/rtp.git;a=blob_plain;f=scripts/build_inf.sh;hb=HEAD'
74
75 $ chmod +x build_inf.sh
76 $ WORKSPACE=/path/to/workspace
77 $ ./build_inf.sh -w ${WORKSPACE}
78
79If all go well, you will get the ISO image in:
80${WORKSPACE}/prj_oran_inf_anaconda/tmp-glibc/deploy/images/intel-corei7-64/inf-image-aio-installer-intel-corei7-64.iso
81
Jackie Huang4ea6c302020-06-10 10:25:32 +0800823. (Optional) Use wrapper script build_oran.sh to setup build env and build the lagecy x86 image
83````````````````````````````````````````````````````````````````````````````````````````````````
84
85Note: The lagecy image is the Kubernetes Cluster image as the same one in Amber (1.0) release.
Xiaohua Zhangd56a96b2019-10-25 09:32:32 +080086
Jackie Huang9d2dd052019-11-14 15:01:29 +080087::
88
89 # Get the wrapper script with either curl or wget
90 $ curl -o build_oran.sh 'https://gerrit.o-ran-sc.org/r/gitweb?p=pti/rtp.git;a=blob_plain;f=scripts/build_oran.sh;hb=HEAD'
91 $ wget -O build_oran.sh 'https://gerrit.o-ran-sc.org/r/gitweb?p=pti/rtp.git;a=blob_plain;f=scripts/build_oran.sh;hb=HEAD'
Jackie Huang4ea6c302020-06-10 10:25:32 +080092
Jackie Huang9d2dd052019-11-14 15:01:29 +080093 $ chmod +x build_oran.sh
Jackie Huang7694fb22020-06-08 15:19:52 +080094 $ WORKSPACE=/path/to/workspace_lagecy
Jackie Huang9d2dd052019-11-14 15:01:29 +080095 $ ./build_oran.sh -w ${WORKSPACE}
96
97If all go well, you will get the ISO image in:
Jackie Huang4ea6c302020-06-10 10:25:32 +080098${WORKSPACE}/prj_oran_inf/tmp-glibc/deploy/images/intel-x86-64/oran-image-inf-host-intel-x86-64.iso
99
1004. (Optional) Use wrapper script build_oran.sh to setup build env and build the ARM Kubernetes Cluster image
101``````````````````````````````````````````````````````````````````````````````````````````````````````````````
102Note:
103 * the ARM Kubernetes Cluster image only supports the BSP nxp-lx2xxx and is verified with the board NXP LX2160ARDB
104 * The ISO image is supported yet.
105
106::
107
108 # Get the wrapper script with either curl or wget
109 $ curl -o build_oran.sh 'https://gerrit.o-ran-sc.org/r/gitweb?p=pti/rtp.git;a=blob_plain;f=scripts/build_oran.sh;hb=HEAD'
110 $ wget -O build_oran.sh 'https://gerrit.o-ran-sc.org/r/gitweb?p=pti/rtp.git;a=blob_plain;f=scripts/build_oran.sh;hb=HEAD'
111
112 $ chmod +x build_oran.sh
113 $ WORKSPACE=/path/to/workspace_arm
114 $ ./build_oran.sh -w ${WORKSPACE} -b nxp-lx2xxx
115
116If all go well, you will get the rootfs image in:
117${WORKSPACE}/prj_oran_inf/tmp-glibc/deploy/images/nxp-lx2xxx/oran-image-inf-host-nxp-lx2xxx.tar.bz2