mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-27 16:51:12 -07:00
images: version stamp in /etc, shown at console and SSH login
Every image writes /etc/forgefirm-version and echoes "ForgeFIRM
<version>" on the serial-console login prompt (/etc/issue, beneath the
OpenGlow banner) and at SSH login (motd). Release images carry
v${FORGEFIRM_RELEASE}; the dev image stamps the build timestamp - the
same DATETIME as the artifact name - tagged (dev) so a bench machine
is never mistaken for a release.
This commit is contained in:
@@ -11,3 +11,7 @@ IMAGE_INSTALL += " \
|
||||
IMAGE_FEATURES += " \
|
||||
tools-debug \
|
||||
"
|
||||
|
||||
# Dev builds identify by build timestamp (matches the artifact name),
|
||||
# tagged so a bench machine is never mistaken for a release.
|
||||
FORGEFIRM_VERSION_STRING = "${DATETIME} (dev)"
|
||||
|
||||
@@ -17,3 +17,20 @@ IMAGE_INSTALL:remove = "gfui-client"
|
||||
# v4l-utils provides media-ctl / v4l2-ctl for the imx-media pipeline (also a
|
||||
# forgectrl runtime dependency, kept explicit here for bring-up use).
|
||||
IMAGE_INSTALL:append = " grblhal-glowforge forgectrl gfhome v4l-utils"
|
||||
|
||||
# Version stamp: /etc/forgefirm-version (machine-readable), echoed on the
|
||||
# serial-console login prompt (/etc/issue) and at SSH login (motd).
|
||||
# Release images carry the release version; the dev image overrides the
|
||||
# string with the build timestamp (the same DATETIME as the artifact
|
||||
# name) plus a dev tag.
|
||||
FORGEFIRM_RELEASE ?= "0.1.0"
|
||||
FORGEFIRM_VERSION_STRING ?= "v${FORGEFIRM_RELEASE}"
|
||||
|
||||
write_forgefirm_version() {
|
||||
echo "${FORGEFIRM_VERSION_STRING}" > ${IMAGE_ROOTFS}${sysconfdir}/forgefirm-version
|
||||
echo "ForgeFIRM ${FORGEFIRM_VERSION_STRING}" >> ${IMAGE_ROOTFS}${sysconfdir}/issue
|
||||
echo "" >> ${IMAGE_ROOTFS}${sysconfdir}/issue
|
||||
echo "ForgeFIRM ${FORGEFIRM_VERSION_STRING}" > ${IMAGE_ROOTFS}${sysconfdir}/motd
|
||||
}
|
||||
write_forgefirm_version[vardepsexclude] += "DATETIME"
|
||||
ROOTFS_POSTPROCESS_COMMAND += "write_forgefirm_version;"
|
||||
|
||||
Reference in New Issue
Block a user