build.sh: add support to set build timestamp
By default is enabled the reproducible builds feature and to provide a real timestamp for the build system, we include it in our local.conf file. https://onedigi.atlassian.net/browse/DEL-7574 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
4e2fc007a1
commit
b9599a6c80
|
|
@ -45,6 +45,12 @@ ZIP_INSTALLER_CFG="
|
|||
DEY_IMAGE_INSTALLER = \"1\"
|
||||
"
|
||||
|
||||
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
|
||||
BUILD_TIMESTAMP="
|
||||
SOURCE_DATE_EPOCH = \"${SOURCE_DATE_EPOCH}\"
|
||||
REPRODUCIBLE_TIMESTAMP_ROOTFS = \"${SOURCE_DATE_EPOCH}\"
|
||||
"
|
||||
|
||||
BACKEND_REMOVAL_CFG="
|
||||
DISTRO_FEATURES_remove = \"x11 wayland vulkan\"
|
||||
"
|
||||
|
|
@ -192,6 +198,7 @@ for platform in ${DY_PLATFORMS}; do
|
|||
conf/local.conf
|
||||
printf "${RM_WORK_CFG}" >> conf/local.conf
|
||||
printf "${ZIP_INSTALLER_CFG}" >> conf/local.conf
|
||||
printf "${BUILD_TIMESTAMP}" >> conf/local.conf
|
||||
# Remove all desktop backend distro features if building framebuffer images
|
||||
if [ "${DY_FB_IMAGE}" = "true" ]; then
|
||||
printf "${BACKEND_REMOVAL_CFG}" >> conf/local.conf
|
||||
|
|
|
|||
10
sdk/build.sh
10
sdk/build.sh
|
|
@ -49,6 +49,12 @@ ZIP_INSTALLER_CFG="
|
|||
DEY_IMAGE_INSTALLER = \"1\"
|
||||
"
|
||||
|
||||
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
|
||||
BUILD_TIMESTAMP="
|
||||
SOURCE_DATE_EPOCH = \"${SOURCE_DATE_EPOCH}\"
|
||||
REPRODUCIBLE_TIMESTAMP_ROOTFS = \"${SOURCE_DATE_EPOCH}\"
|
||||
"
|
||||
|
||||
REPO="$(which repo)"
|
||||
|
||||
error() {
|
||||
|
|
@ -260,6 +266,10 @@ for platform in ${DY_PLATFORMS}; do
|
|||
if [ -n "${DY_EXTRA_LOCAL_CONF}" ]; then
|
||||
printf "%s\n" "${DY_EXTRA_LOCAL_CONF}" >> conf/local.conf
|
||||
fi
|
||||
# Add build timestamp
|
||||
if [ -n "${BUILD_TIMESTAMP}" ]; then
|
||||
printf "${BUILD_TIMESTAMP}" >> conf/local.conf
|
||||
fi
|
||||
# Check if it is a manufacturing job and, if the mfg layer is not there, add it
|
||||
if [ "${DY_MFG_IMAGE}" = "true" ] && ! grep -qs "meta-digi-mfg" conf/bblayers.conf; then
|
||||
sed -i -e "/meta-digi-dey/a\ ${YOCTO_INST_DIR}/sources/meta-digi-mfg \\\\" conf/bblayers.conf
|
||||
|
|
|
|||
Loading…
Reference in New Issue