-add_configs_stx_build () {
- msg_step="Add extra configs into local.conf for StarlingX build"
- echo_step_start
-
- cd ${PRJ_BUILD_DIR}
- echo_info "Adding the following extra configs into local.conf"
- cat ${SRC_CONFIGS}/local-stx.conf | \
- sed -e "s/@BSP@/${BSP}/" | tee -a conf/local.conf
-
- echo "DL_DIR = '${PRJ_SHARED_DL_DIR}'" | tee -a conf/local.conf
- echo "SSTATE_DIR = '${PRJ_SHARED_SS_DIR}'" | tee -a conf/local.conf
-
- if [ "${RM_WORK}" == "Yes" ]; then
- echo "INHERIT += 'rm_work'" | tee -a conf/local.conf
- fi
-
-
- if [ "${EXTRA_CONF}" != "" ] && [ -f "${EXTRA_CONF}" ]; then
- cat ${EXTRA_CONF} | tee -a conf/local.conf
- fi
- echo_step_end
-}
-
-setup_stx_build () {
- echo_step_start "Setup StarlingX build project"
-
- add_layer_stx_build
-
- cd ${PRJ_BUILD_DIR}
- if ! grep -q 'Configs for StarlingX' conf/local.conf; then
- add_configs_stx_build
- else
- echo_info "Nothing is added into local.conf"
- fi
-
- echo_step_end "Setup StarlingX build project"
-}
-
-build_stx_image () {
- msg_step="Build StarlingX images"
- echo_step_start
-
- source_env ${PRJ_BUILD_DIR}
-
- mkdir -p logs
-
- RUN_CMD="bitbake ${DRYRUN} ${IMG_STX}"
- echo_cmd "Build the ${IMG_STX} image"
- bitbake ${DRYRUN} ${IMG_STX} 2>&1|tee logs/bitbake_${IMG_STX}_${TIMESTAMP}.log
-
- echo_step_end
-
- echo_info "Build succeeded, you can get the image in ${ISO_STX}"
-}
-
-add_layer_anaconda_build () {
- msg_step="Add required layers to the anaconda (installer) build project"
- echo_step_start
-
- source_env ${PRJ_BUILD_DIR_ANACONDA}
- SRC_LAYERS=""
- for sub_layer in ${SUB_LAYER_META_OE_ANACONDA}; do
- SRC_LAYERS="${SRC_LAYERS} ${SRC_LAYER_DIR}/meta-openembedded/${sub_layer}"
- done
- SRC_LAYERS="${SRC_LAYERS} ${SRC_LAYER_DIR}/meta-intel"
- SRC_LAYERS="${SRC_LAYERS} ${SRC_LAYER_DIR}/meta-anaconda"
- SRC_LAYERS="${SRC_LAYERS} ${SRC_ORAN_DIR}/rtp/meta-stx"
-
- for src_layer in ${SRC_LAYERS}; do
- RUN_CMD="bitbake-layers add-layer ${src_layer}"
- echo_cmd "Add the ${src_layer} layer into the build project"
- ${RUN_CMD}
- done
-
- echo_step_end
-}
-
-add_configs_anaconda_build () {
- msg_step="Add extra configs into local.conf for anaconda (installer) build"
- echo_step_start
-
- cd ${PRJ_BUILD_DIR_ANACONDA}
- echo_info "Adding the following extra configs into local.conf"
- cat ${SRC_CONFIGS}/local-anaconda.conf | \
- sed -e "s/@BSP@/${BSP}/" \
- -e "s|@TARGET_BUILD@|${PRJ_BUILD_DIR}|" \
- | tee -a conf/local.conf
-
- echo "DL_DIR = '${PRJ_SHARED_DL_DIR}'" | tee -a conf/local.conf
- echo "SSTATE_DIR = '${PRJ_SHARED_SS_DIR}'" | tee -a conf/local.conf
-
- if [ "${RM_WORK}" == "Yes" ]; then
- echo "INHERIT += 'rm_work'" | tee -a conf/local.conf
- fi
-
- if [ "${EXTRA_CONF}" != "" ] && [ -f "${EXTRA_CONF}" ]; then
- cat ${EXTRA_CONF} | tee -a conf/local.conf
- fi
-
- echo_step_end
-}
-
-setup_anaconda_build () {
- echo_step_start "Setup anaconda (installer) build project"
-
- add_layer_anaconda_build
-
- cd ${PRJ_BUILD_DIR_ANACONDA}
- if ! grep -q 'Configs for anaconda' conf/local.conf; then
- add_configs_anaconda_build
- else
- echo_info "Nothing is added into local.conf"
- fi
-
- echo_step_end "Setup anaconda build project"
-}
-
-build_anaconda_image () {
- echo_step_start "Build anaconda (installer) images"
- source_env ${PRJ_BUILD_DIR_ANACONDA}
-
- mkdir -p logs
-
- if [ -f ${ISO_ANACONDA} ]; then
- bitbake ${DRYRUN} -c clean ${IMG_ANACONDA}
- fi
- RUN_CMD="bitbake ${DRYRUN} ${IMG_ANACONDA}"
- echo_cmd "Build the ${IMG_ANACONDA} image"
- bitbake ${DRYRUN} ${IMG_ANACONDA} 2>&1|tee logs/bitbake_${IMG_ANACONDA}_${TIMESTAMP}.log
-
- if [ -z "${DRYRUN}" ]; then
- cp -Pf ${ISO_ANACONDA} ${ISO_INF}
- fi
-
- echo_step_end
-
- echo_info "Build succeeded, you can get the image in ${ISO_INF}"
-}