|
@@ -19,6 +19,9 @@
|
|
|
# SITE_REPO_FETCH_METHOD = http, everything except "git" will use the HTTP method for fetchting site repo
|
|
|
# TARGETS = a space separated list of target platforms (if unset, all platforms will be build)
|
|
|
# VERBOSE = 0 (default) or 1, call the make commands with 'V=s' to see actual errors better
|
|
|
+#
|
|
|
+# expert/special usecase only (optional):
|
|
|
+# FAKETIME_LIB = path to libfaketime.so.1 if it is not in the standard location
|
|
|
|
|
|
|
|
|
### includes
|
|
@@ -168,14 +171,19 @@ echo "SITE=${SITE_COMMIT} # ${VERSION}" >> ${build_info_path}
|
|
|
echo "TARGETS=${TARGETS}" >> ${build_info_path}
|
|
|
echo "TS=${BUILD_TS}" >> ${build_info_path}
|
|
|
|
|
|
+### 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}"
|
|
|
+
|
|
|
### BUILD FIRMWARE
|
|
|
progress "Building the firmware - please stand by!"
|
|
|
|
|
|
for target in ${TARGETS} ; do
|
|
|
# configure build environment for our current target
|
|
|
export GLUON_TARGET="${target}"
|
|
|
- gluon_build_env_vars="GLUON_TARGET=\"${target}\" GLUON_RELEASE=\"${VERSION}\" BROKEN=\"${BROKEN}\""
|
|
|
- [ "${AUTOUPDATER}" != "off" ] && gluon_build_env_vars="${gluon_build_env_vars} GLUON_BRANCH=\"${AUTOUPDATER}\""
|
|
|
+ export GLUON_RELEASE="${VERSION}"
|
|
|
+ [ "${AUTOUPDATER}" != "off" ] && export GLUON_BRANCH="${AUTOUPDATER}"
|
|
|
|
|
|
# prepare build environment for our current target
|
|
|
progress "Preparing build environment for target ${target}."
|
|
@@ -190,7 +198,7 @@ for target in ${TARGETS} ; do
|
|
|
|
|
|
# now we can start building the images for the target platform
|
|
|
progress "Building FFHO-flavoured Gluon firmware for target ${target}. You'd better go and fetch some c0ffee!"
|
|
|
- eval "${gluon_build_env_vars} make -j ${MAKEJOBS} prepare ${MAKE_PARAM}"
|
|
|
+ make -j ${MAKEJOBS} prepare ${MAKE_PARAM}
|
|
|
[ "$?" -eq "0" ] || abort "Failed to build firmware for target-platform ${target}."
|
|
|
|
|
|
# finally compile the firmware binaries
|
|
@@ -200,7 +208,7 @@ for target in ${TARGETS} ; do
|
|
|
|
|
|
# compile the modules
|
|
|
progress "Compiling modules."
|
|
|
- eval "${gluon_build_env_vars} make -j ${MAKEJOBS} modules ${MAKE_PARAM}"
|
|
|
+ make -j ${MAKEJOBS} modules ${MAKE_PARAM}
|
|
|
[ "$?" -eq "0" ] || abort "Failed to build modules for target-platform ${target}."
|
|
|
done
|
|
|
|