|
@@ -22,6 +22,7 @@
|
|
#
|
|
#
|
|
# expert/special usecase only (optional):
|
|
# expert/special usecase only (optional):
|
|
# FAKETIME_LIB = path to libfaketime.so.1 if it is not in the standard location
|
|
# FAKETIME_LIB = path to libfaketime.so.1 if it is not in the standard location
|
|
|
|
+# NO_FAKETIME = 0 (default) or 1, disables the use of Faketime
|
|
|
|
|
|
|
|
|
|
### includes
|
|
### includes
|
|
@@ -54,7 +55,13 @@ pushd ${MY_DIR} > /dev/null
|
|
### set reasonable defaults for unset environment variables
|
|
### set reasonable defaults for unset environment variables
|
|
[ -n "${AUTOUPDATER}" ] || AUTOUPDATER=${BRANCH}
|
|
[ -n "${AUTOUPDATER}" ] || AUTOUPDATER=${BRANCH}
|
|
# ToDo: [ "${BASE}" == "master" ] && BASE="origin/master"
|
|
# ToDo: [ "${BASE}" == "master" ] && BASE="origin/master"
|
|
-[ -n "${BROKEN}" ] || BROKEN=0
|
|
|
|
|
|
+if [ -n "${BROKEN}" ]; then
|
|
|
|
+ if [ "${BROKEN}" -eq "1" ]; then
|
|
|
|
+ export BROKEN
|
|
|
|
+ else
|
|
|
|
+ unset BROKEN
|
|
|
|
+ fi
|
|
|
|
+fi
|
|
[ -n "${BUILD_TS}" ] || BUILD_TS=$(date +"%Y-%m-%d %H:%M:%S")
|
|
[ -n "${BUILD_TS}" ] || BUILD_TS=$(date +"%Y-%m-%d %H:%M:%S")
|
|
|
|
|
|
if [ -z "${DIRCLEAN}" ]; then
|
|
if [ -z "${DIRCLEAN}" ]; then
|
|
@@ -66,14 +73,18 @@ if [ -z "${DIRCLEAN}" ]; then
|
|
fi
|
|
fi
|
|
|
|
|
|
[ -n "${MAKEJOBS}" ] || MAKEJOBS=$(grep -c "^processor" /proc/cpuinfo)
|
|
[ -n "${MAKEJOBS}" ] || MAKEJOBS=$(grep -c "^processor" /proc/cpuinfo)
|
|
|
|
+[ -n "${NO_FAKETIME}" ] || NO_FAKETIME=0
|
|
[ -n "${PRIORITY}" ] || PRIORITY=0
|
|
[ -n "${PRIORITY}" ] || PRIORITY=0
|
|
[ -n "${SITE_REPO_FETCH_METHOD}" ] || SITE_REPO_FETCH_METHOD="http"
|
|
[ -n "${SITE_REPO_FETCH_METHOD}" ] || SITE_REPO_FETCH_METHOD="http"
|
|
-[ -n "${TARGETS}" ] || TARGETS=$(BROKEN=${BROKEN} make list-targets | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
|
|
|
|
[ -n "${VERBOSE}" ] || VERBOSE=0
|
|
[ -n "${VERBOSE}" ] || VERBOSE=0
|
|
|
|
|
|
|
|
+if [ -z "${TARGETS}" ]; then
|
|
|
|
+ TARGETS=$(make list-targets | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
|
|
|
|
+ info "building all tagets: '${TARGETS}'"
|
|
|
|
+fi
|
|
if [ "${BRANCH}" == "experimental" -a -z "${VERSION}" ] ; then
|
|
if [ "${BRANCH}" == "experimental" -a -z "${VERSION}" ] ; then
|
|
VERSION=$(make default-release)
|
|
VERSION=$(make default-release)
|
|
- info "EXPERIMENTAL FIRMWARE: using version tag '$VERSION'"
|
|
|
|
|
|
+ info "EXPERIMENTAL FIRMWARE: using version tag '${VERSION}'"
|
|
fi
|
|
fi
|
|
|
|
|
|
### set some additional variables
|
|
### set some additional variables
|
|
@@ -84,7 +95,7 @@ else
|
|
fi
|
|
fi
|
|
|
|
|
|
MAKE_PARAM=""
|
|
MAKE_PARAM=""
|
|
-[ "$VERBOSE" -eq "1" ] && MAKE_PARAM="${MAKE_PARAM} V=s"
|
|
|
|
|
|
+[ "${VERBOSE}" -eq "1" ] && MAKE_PARAM="${MAKE_PARAM} V=s"
|
|
|
|
|
|
### INIT /src IF NECESSARY
|
|
### INIT /src IF NECESSARY
|
|
if [ ! -d "${CODE_DIR}" ]; then
|
|
if [ ! -d "${CODE_DIR}" ]; then
|
|
@@ -103,11 +114,11 @@ fi
|
|
pushd ${CODE_DIR} > /dev/null
|
|
pushd ${CODE_DIR} > /dev/null
|
|
|
|
|
|
### CHECKOUT GLUON
|
|
### CHECKOUT GLUON
|
|
-progress "Checking out GLUON '$BASE' ..."
|
|
|
|
|
|
+progress "Checking out GLUON '${BASE}' ..."
|
|
# TODO: check if gluon got modified and bail out if necessary
|
|
# TODO: check if gluon got modified and bail out if necessary
|
|
git fetch
|
|
git fetch
|
|
git checkout -q ${BASE}
|
|
git checkout -q ${BASE}
|
|
-[ "$?" -eq "0" ] || abort "Failed to checkout '$BASE' gluon base version, mimimi." >&2
|
|
|
|
|
|
+[ "$?" -eq "0" ] || abort "Failed to checkout '${BASE}' gluon base version, mimimi." >&2
|
|
GLUON_COMMIT=$(git rev-list --max-count=1 HEAD)
|
|
GLUON_COMMIT=$(git rev-list --max-count=1 HEAD)
|
|
|
|
|
|
|
|
|
|
@@ -172,9 +183,11 @@ echo "TARGETS=${TARGETS}" >> ${build_info_path}
|
|
echo "TS=${BUILD_TS}" >> ${build_info_path}
|
|
echo "TS=${BUILD_TS}" >> ${build_info_path}
|
|
|
|
|
|
### SETUP FAKETIME (consistent build)
|
|
### SETUP FAKETIME (consistent build)
|
|
-[ -z "$FAKETIME_LIB" ] && FAKETIME_LIB="/usr/lib/${MACHTYPE}-${OSTYPE}/faketime/libfaketime.so.1"
|
|
|
|
-export LD_PRELOAD="${FAKETIME_LIB}"
|
|
|
|
-export FAKETIME="${BUILD_TS}"
|
|
|
|
|
|
+if [ "${NO_FAKETIME}" -eq "0" ]; then
|
|
|
|
+ [ -z "${FAKETIME_LIB}" ] && FAKETIME_LIB="/usr/lib/${MACHTYPE}-${OSTYPE}/faketime/libfaketime.so.1"
|
|
|
|
+ export LD_PRELOAD="${FAKETIME_LIB}"
|
|
|
|
+ export FAKETIME="${BUILD_TS}"
|
|
|
|
+fi
|
|
|
|
|
|
### BUILD FIRMWARE
|
|
### BUILD FIRMWARE
|
|
progress "Building the firmware - please stand by!"
|
|
progress "Building the firmware - please stand by!"
|