|
@@ -8,6 +8,7 @@
|
|
|
# BRANCH = Firmware Branch (stable/testing/experimental)
|
|
|
# SITE = specific site repository commit-id (leave blank to use HEAD)
|
|
|
# VERSION = the version tag (can only be empty if BRANCH=experimental)
|
|
|
+# BUILD_TS = build timestamp (format: %Y-%m-%d %H:%M:%S)
|
|
|
#
|
|
|
|
|
|
if [ "_$BRANCH" == "_" ]; then
|
|
@@ -29,6 +30,7 @@ MY_DIR=$(dirname $0)
|
|
|
MY_DIR=$(readlink -f "$MY_DIR")
|
|
|
CODE_DIR="src"
|
|
|
pushd $MY_DIR > /dev/null
|
|
|
+[ "_$BUILD_TS" == "_" ] && export BUILD_TS=$(date +"%Y-%m-%d %H:%M:%S")
|
|
|
|
|
|
. functions.sh
|
|
|
|
|
@@ -84,14 +86,14 @@ make update
|
|
|
|
|
|
### BUILD TOOLCHAIN
|
|
|
progress "Building toolchain if necessary (this is not possible on a fresh build) ..."
|
|
|
-make toolchain -j 1
|
|
|
+faketime "$BUILD_TS" make toolchain -j 1
|
|
|
|
|
|
### BUILD FIRMWARE
|
|
|
progress "Building the firmware - please stand by!"
|
|
|
if [ "$BRANCH" != "experimental" ]; then
|
|
|
- GLUON_BRANCH=$BRANCH GLUON_RELEASE=$VERSION make -j 4
|
|
|
+ GLUON_BRANCH=$BRANCH GLUON_RELEASE=$VERSION faketime "$BUILD_TS" make -j 4
|
|
|
else
|
|
|
- GLUON_BRANCH=experimental make -j 4
|
|
|
+ GLUON_BRANCH=experimental faketime "$BUILD_TS" make -j 4
|
|
|
fi
|
|
|
|
|
|
[ "$?" -eq "0" ] || abort "Failed to build the firmware, mimimi."
|
|
@@ -106,6 +108,7 @@ echo "VERSION=${VERSION}" >> "output/${BRANCH}/build_info.txt"
|
|
|
echo "GLUON=${GLUON_COMMIT} # ${BASE}" >> "output/${BRANCH}/build_info.txt"
|
|
|
echo "BRANCH=${BRANCH}" >> "output/${BRANCH}/build_info.txt"
|
|
|
echo "SITE=${SITE_COMMIT} # ${VERSION}" >> "output/${BRANCH}/build_info.txt"
|
|
|
+echo "TS=${BUILD_TS}" >> "output/${BRANCH}/build_info.txt"
|
|
|
|
|
|
# compress all binaries into 7z archive
|
|
|
progress "Assembling images.7z ..."
|