Xiaohua Zhang | d56a96b | 2019-10-25 09:32:32 +0800 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 2 | .. SPDX-License-Identifier: CC-BY-4.0 |
| 3 | .. Copyright (C) 2019 Wind River Systems, Inc. |
| 4 | |
| 5 | Developer-Guide |
| 6 | =============== |
Xiaohua Zhang | d56a96b | 2019-10-25 09:32:32 +0800 | [diff] [blame] | 7 | |
weichen | 247a1d5 | 2019-11-06 04:20:43 -0500 | [diff] [blame] | 8 | .. contents:: |
| 9 | :depth: 3 |
| 10 | :local: |
Xiaohua Zhang | d56a96b | 2019-10-25 09:32:32 +0800 | [diff] [blame] | 11 | |
Chris Lott | 5972d17 | 2019-11-06 15:28:01 +0000 | [diff] [blame] | 12 | |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 13 | This project implements a real time platform to deploy the O-CU and O-DU and it's based on Yocto/OpenEmbedded. |
Chris Lott | 5972d17 | 2019-11-06 15:28:01 +0000 | [diff] [blame] | 14 | |
Jackie Huang | 0d84adc | 2022-04-19 17:35:17 +0800 | [diff] [blame] | 15 | This includes a Yocto/OpenEmbedded compatible layer meta-stx-oran and wrapper scripts |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 16 | to pull all required Yocto/OE layers to build out the reference platform. |
Xiaohua Zhang | d56a96b | 2019-10-25 09:32:32 +0800 | [diff] [blame] | 17 | |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 18 | To 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 Zhang | d56a96b | 2019-10-25 09:32:32 +0800 | [diff] [blame] | 19 | |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 20 | - `Yocto dev manual`_ |
| 21 | - `OpenEmbedded wiki`_ |
Xiaohua Zhang | d56a96b | 2019-10-25 09:32:32 +0800 | [diff] [blame] | 22 | |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 23 | .. _`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 Zhang | d56a96b | 2019-10-25 09:32:32 +0800 | [diff] [blame] | 25 | |
| 26 | |
Xiaohua Zhang | d56a96b | 2019-10-25 09:32:32 +0800 | [diff] [blame] | 27 | |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 28 | 1. Prerequisite for build environment |
Xiaohua Zhang | 0d1338c | 2020-06-02 09:25:12 -0400 | [diff] [blame] | 29 | ------------------------------------- |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 30 | |
| 31 | * Your host need to meet the requirements for Yocto, please refer to: |
| 32 | |
| 33 | * `Compatible Linux Distribution`_ |
| 34 | * `Supported Linux Distributions`_ |
| 35 | * `Required Packages for the Build Host`_ |
| 36 | |
Jackie Huang | 6a5f10c | 2021-12-03 14:30:37 +0800 | [diff] [blame] | 37 | The recommended and tested host is Ubuntu 16.04/18.04 and CentOS 7. |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 38 | |
Jackie Huang | 6a5f10c | 2021-12-03 14:30:37 +0800 | [diff] [blame] | 39 | * To install the required packages for Ubuntu 16.04/18.04: |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 40 | |
| 41 | .. _`Compatible Linux Distribution`: https://www.yoctoproject.org/docs/2.6.3/brief-yoctoprojectqs/brief-yoctoprojectqs.html#brief-compatible-distro |
Jackie Huang | 7ed3560 | 2019-11-14 16:53:51 +0800 | [diff] [blame] | 42 | .. _`Supported Linux Distributions`: https://www.yoctoproject.org/docs/2.6.3/ref-manual/ref-manual.html#detailed-supported-distros |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 43 | .. _`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 |
| 44 | |
| 45 | :: |
| 46 | |
| 47 | $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ |
| 48 | build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ |
| 49 | xz-utils debianutils iputils-ping make xsltproc docbook-utils fop dblatex xmlto \ |
| 50 | python-git |
| 51 | |
Jackie Huang | 6a5f10c | 2021-12-03 14:30:37 +0800 | [diff] [blame] | 52 | * To install the required packages for CentOS 7: |
Jackie Huang | 9d2dd05 | 2019-11-14 15:01:29 +0800 | [diff] [blame] | 53 | |
| 54 | :: |
| 55 | |
| 56 | $ sudo yum install -y epel-release |
| 57 | $ sudo yum makecache |
| 58 | $ sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \ |
| 59 | diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat \ |
| 60 | perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-Digest-SHA \ |
| 61 | python34-pip xz which SDL-devel xterm |
Xiaohua Zhang | d56a96b | 2019-10-25 09:32:32 +0800 | [diff] [blame] | 62 | |
Jackie Huang | 4ea6c30 | 2020-06-10 10:25:32 +0800 | [diff] [blame] | 63 | 2. Use wrapper script build_inf.sh to setup build env and build the INF AIO x86 image |
Xiaohua Zhang | 0d1338c | 2020-06-02 09:25:12 -0400 | [diff] [blame] | 64 | ------------------------------------------------------------------------------------- |
Jackie Huang | 7694fb2 | 2020-06-08 15:19:52 +0800 | [diff] [blame] | 65 | |
| 66 | :: |
| 67 | |
| 68 | # Get the wrapper script with either curl or wget |
| 69 | $ 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' |
| 70 | $ 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' |
| 71 | |
| 72 | $ chmod +x build_inf.sh |
| 73 | $ WORKSPACE=/path/to/workspace |
| 74 | $ ./build_inf.sh -w ${WORKSPACE} |
| 75 | |
| 76 | If all go well, you will get the ISO image in: |
| 77 | ${WORKSPACE}/prj_oran_inf_anaconda/tmp-glibc/deploy/images/intel-corei7-64/inf-image-aio-installer-intel-corei7-64.iso |
| 78 | |