build_inf_yocto.sh: add -k option for bitbake
[pti/rtp.git] / scripts / build_inf_yocto / build_inf_yocto.sh
index cdba10f..74c6d0c 100755 (executable)
@@ -78,6 +78,7 @@ SUB_LAYER_META_OE_ANACONDA="\
 "
 
 SCRIPTS_DIR=$(dirname $(dirname $(readlink -f $0)))
+SCRIPTS_NAME=$(basename $0)
 TIMESTAMP=`date +"%Y%m%d_%H%M%S"`
 
 #########################################################################
@@ -87,7 +88,7 @@ TIMESTAMP=`date +"%Y%m%d_%H%M%S"`
 help_info () {
 cat << ENDHELP
 Usage:
-$(basename $0) [-w WORKSPACE_DIR] [-b BSP] [-n] [-u] [-h] [-r Yes|No] [-e EXTRA_CONF]
+${SCRIPTS_NAME} [-w WORKSPACE_DIR] [-b BSP] [-n] [-u] [-h] [-r Yes|No] [-e EXTRA_CONF]
 where:
     -w WORKSPACE_DIR is the path for the project
     -b BPS is one of supported BSP: "${SUPPORTED_BSP}"
@@ -106,14 +107,14 @@ ENDHELP
 echo_step_start() {
     [ -n "$1" ] && msg_step=$1
     echo "#########################################################################################"
-    echo "## STEP START: ${msg_step}"
+    echo "## ${SCRIPTS_NAME} - STEP START: ${msg_step}"
     echo "#########################################################################################"
 }
 
 echo_step_end() {
     [ -n "$1" ] && msg_step=$1
     echo "#########################################################################################"
-    echo "## STEP END: ${msg_step}"
+    echo "## ${SCRIPTS_NAME} - STEP END: ${msg_step}"
     echo "#########################################################################################"
     echo
 }
@@ -283,7 +284,7 @@ ISO_INF_ALIAS=${PRJ_OUTPUT_DIR}/inf-image-yocto-aio-${IMG_ARCH}.iso
 SSTATE_CONTAINER_IMG=infbuilder/inf-yocto-sstate:2022.05
 
 prepare_workspace () {
-    msg_step="Create workspace for the build"
+    msg_step="Create workspace for the Yocto build"
     echo_step_start
 
     mkdir -p ${PRJ_BUILD_DIR} ${SRC_ORAN_DIR} ${PRJ_BUILD_DIR_ANACONDA} \
@@ -348,7 +349,7 @@ prepare_src () {
 
     echo_step_end
 
-# Not andy meta-patch is needed for the time being, but new ones may be needed and added
+# Not any meta-patch is needed for the time being, but new ones may be needed and added
 # sometime in the future, so just leave these code commented out here.
 #    # Apply meta patches
 #    for l in $(ls -1 ${SRC_META_PATCHES}); do
@@ -465,7 +466,7 @@ build_stx_image () {
 
     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
+    bitbake -k ${DRYRUN} ${IMG_STX} 2>&1|tee logs/bitbake_${IMG_STX}_${TIMESTAMP}.log
 
     echo_step_end
 
@@ -549,7 +550,7 @@ build_anaconda_image () {
     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
+    bitbake -k ${DRYRUN} ${IMG_ANACONDA} 2>&1|tee logs/bitbake_${IMG_ANACONDA}_${TIMESTAMP}.log
 
     if [ -z "${DRYRUN}" ]; then
         cp -Pf ${ISO_ANACONDA} ${ISO_INF}