6 $(basename $0) <-w WORKSPACE_DIR> [-n] [-h]
8 -w WORKSPACE_DIR is the path for the project
9 -n dry-run only for bitbake
25 echo "CMD: ${RUN_CMD}"
29 echo "Missing options!"
36 SCRIPTS_DIR=`dirname $0`
37 SCRIPTS_DIR=`readlink -f $SCRIPTS_DIR`
39 while getopts "w:nh" OPTION; do
42 WORKSPACE=`readlink -f ${OPTARG}`
54 if [ -z ${WORKSPACE} ]; then
55 echo_info "No workspace specified, a directory 'workspace' will be created in current directory as the workspace"
56 WORKSPACE=`readlink -f workspace`
59 SRC_WRL_DIR=${WORKSPACE}/src_wrl1018
60 SRC_ORAN_DIR=${WORKSPACE}/src_oran
61 PRJ_BUILD_DIR=${WORKSPACE}/prj_oran-inf
63 mkdir -p ${SRC_WRL_DIR} ${PRJ_BUILD_DIR} ${SRC_ORAN_DIR}
65 echo_info "The following directories are created in your workspace(${WORKSPACE}):"
66 echo_info "For wrlinux1018 source: ${SRC_WRL_DIR}"
67 echo_info "For oran layer source: ${SRC_ORAN_DIR}"
68 echo_info "For build project: ${PRJ_BUILD_DIR}"
70 # Clone the source of WRLinux BASE 10.18 from github and setup
71 RUN_CMD="git clone --branch WRLINUX_10_18_BASE git://github.com/WindRiver-Labs/wrlinux-x.git"
72 echo_cmd "Cloning wrlinux 1018 source from github:"
76 RUN_CMD="./wrlinux-x/setup.sh --machines intel-x86-64 --layers meta-cloud-services"
77 echo_cmd "Setup wrlinux build project:"
81 echo_info "Cloning oran layer:"
84 RUN_CMD="git clone https://gerrit.o-ran-sc.org/r/pti/rtp"
85 echo_cmd "Cloing with:"
88 # Source the build env
90 . ./environment-setup-x86_64-wrlinuxsdk-linux
92 . ./oe-init-build-env ${PRJ_BUILD_DIR}
94 # Add the meta-oran layer and required layers
96 bitbake-layers add-layer ${SRC_ORAN_DIR}/rtp/meta-oran
98 # Add extra configs into local.conf
99 cat << EOF >> conf/local.conf
100 ########################
101 # Configs for oran-inf #
102 ########################
105 WRTEMPLATE += "feature/oran-host-rt-tune"
108 # Build the oran-inf-host image
110 TIMESTAMP=`date +"%Y%m%d_%H%M%S"`
112 bitbake ${DRYRUN} oran-image-inf-host 2>&1|tee logs/bitbake_oran-image-inf-host_${TIMESTAMP}.log