diff --git a/build/conf/local.conf-dist b/build/conf/local.conf-dist index fbbb139ef..1f4e99c77 100644 --- a/build/conf/local.conf-dist +++ b/build/conf/local.conf-dist @@ -1,5 +1,9 @@ CONF_VERSION = "1" +# Enable parallel builds on multi-core machines +BB_NUMBER_THREADS ?= "4" +PARALLEL_MAKE ?= "-j 4" + # 1) Basic config # ## TODO: DISTRO should be in auto.conf diff --git a/do_build.sh b/do_build.sh index 1ba09c55b..1c02fc9cd 100755 --- a/do_build.sh +++ b/do_build.sh @@ -1,7 +1,7 @@ #! /bin/bash -e set -o pipefail -STEPS="setupoe,initramfs,stubinitramfs,dom0,uivm,ndvm,syncvm,installer,installer2,syncui,source,sdk,license,sourceinfo,ship" +STEPS="setupoe,initramfs,stubinitramfs,dom0,uivm,ndvm,syncvm,installer,installer2,source,sdk,license,sourceinfo,ship" # Additional steps: @@ -16,6 +16,17 @@ STEPS="setupoe,initramfs,stubinitramfs,dom0,uivm,ndvm,syncvm,installer,installer # Packages tree can use hardlinks to save disk space, if $SYNC_CACHE_OE/oe-archives is populated # Requires a valid NETBOOT_HTTP_URL in .config +# OpenXT build requires system shell to be bash +SYSTEM_SHELL=$(basename $(readlink -f /bin/sh)) +[[ ${SYSTEM_SHELL} == "bash" ]] || \ + { echo "OpenXT build requires bash as system shell. Please symlink /bin/sh to bash"; exit 1; } + +# Keep bitbake memory-resident between invocations +export BB_SERVER_TIMEOUT=30 + +# Optional interactive use: set to 1 to disable logs +INTERACTIVE=0 + TOPDIR=`pwd` OUTPUT_DIR="$TOPDIR/build-output" CMD="$0" @@ -30,6 +41,17 @@ BRANCH=master BUILD_UID=`id -u` export BUILD_UID +DEBUG="" +CONFIG="" +XC_TOOLS_BUILD="" +ARGNAME="" +OE_BUILD_CACHE_DL="" +OE_TARBALL_MIRROR="" +NETBOOT_HTTP_URL="" +FREEZE_URIS="" + +CONF_LOCAL="conf/local.conf" + # TODO: move some of the above definitions into common-config if [ -f ${CMD_DIR}/common-config ]; then @@ -89,16 +111,18 @@ do_oe_setup() mkdir -p conf fi - if [ ! -f "conf/local.conf" -o "conf/local.conf" -ot "conf/local.conf-dist" ]; then - cp conf/local.conf-dist conf/local.conf + # Force generation of local.conf with latest build version + rm -f ${CONF_LOCAL} + if [ ! -f "${CONF_LOCAL}" -o "${CONF_LOCAL}" -ot "${CONF_LOCAL}-dist" ]; then + cp "${CONF_LOCAL}-dist" "${CONF_LOCAL}" if [ ! -z "${OE_TARBALL_MIRROR}" ] ; then - cat >> conf/local.conf <> ${CONF_LOCAL} <> conf/local.conf <> ${CONF_LOCAL} <> conf/local.conf + echo "XENCLIENT_BUILD = \"$ID\"" >> ${CONF_LOCAL} else - echo "XENCLIENT_BUILD = \"$NAME\"" >> conf/local.conf + echo "XENCLIENT_BUILD = \"$NAME\"" >> ${CONF_LOCAL} fi - cat >> conf/local.conf <> ${CONF_LOCAL} <> conf/local.conf <> ${CONF_LOCAL} <> conf/local.conf <> ${CONF_LOCAL} <> conf/local.conf <> ${CONF_LOCAL} <> conf/local.conf <> ${CONF_LOCAL} <