6 $(basename $0) WORKSPACE_DIR
8 WORKSPACE_DIR is the path for the project
23 echo "CMD: ${RUN_CMD}"
31 SCRIPTS_DIR=`dirname $0`
32 SCRIPTS_DIR=`readlink -f $SCRIPTS_DIR`
34 WORKSPACE=`readlink -f $1`
36 SRC_WRL_DIR=${WORKSPACE}/src_wrl1018
37 SRC_ORAN_DIR=${WORKSPACE}/src_oran
38 PRJ_BUILD_DIR=${WORKSPACE}/prj_oran-inf
40 mkdir -p ${SRC_WRL_DIR} ${PRJ_BUILD_DIR} ${SRC_ORAN_DIR}
42 echo_info "The following directories are created in your workspace(${WORKSPACE}):"
43 echo_info "For wrlinux1018 source: ${SRC_WRL_DIR}"
44 echo_info "For oran layer source: ${SRC_ORAN_DIR}"
45 echo_info "For build project: ${PRJ_BUILD_DIR}"
47 # Clone the source of WRLinux BASE 10.18 from github and setup
48 RUN_CMD="git clone --branch WRLINUX_10_18_BASE git://github.com/WindRiver-Labs/wrlinux-x.git"
49 echo_cmd "Cloning wrlinux 1018 source from github:"
53 RUN_CMD="./wrlinux-x/setup.sh --machines intel-x86-64 --layers wrlinux-ovp meta-cloud-services"
54 echo_cmd "Setup wrlinux build project:"
58 echo_info "Cloning oran layer:"
61 RUN_CMD="git clone http://stash.wrs.com/scm/~jhuang0/o-ran-pti-rtp.git"
62 echo_cmd "Cloing with:"
65 # Source the build env
67 . ./environment-setup-x86_64-wrlinuxsdk-linux
69 . ./oe-init-build-env ${PRJ_BUILD_DIR}
71 # Add the meta-oran layer and required layers
73 bitbake-layers add-layer ${SRC_ORAN_DIR}/o-ran-pti-rtp/meta-oran
75 # Add extra configs into local.conf
76 cat << EOF >> conf/local.conf
77 ########################
78 # Configs for oran-inf #
79 ########################
84 # Build the oran-inf-host image
86 TIMESTAMP=`date +"%Y%m%d_%H%M%S"`
87 bitbake wrlinux-image-oran-host 2>&1|tee logs/bitbake_wrlinux-image-oran-host_${TIMESTAMP}.log