meta-digi-del: create '/etc/build' file with build statistics

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2013-05-28 19:58:42 +02:00
parent 2b7fb6b3cf
commit 7dd9c33154
1 changed files with 23 additions and 0 deletions

View File

@ -12,10 +12,33 @@ PACKAGE_GROUP_del-network = "packagegroup-del-network"
PACKAGE_GROUP_del-qt = "packagegroup-del-qt" PACKAGE_GROUP_del-qt = "packagegroup-del-qt"
PACKAGE_GROUP_del-wireless = "packagegroup-del-wireless" PACKAGE_GROUP_del-wireless = "packagegroup-del-wireless"
## Auxiliar variables and functions (used in del_rootfs_tuning)
LAYERS_REV = "${@'\n'.join(get_layers_branch_rev(d))}"
DEL_TAG = "${@del_tag(d).strip()}"
def del_tag(d):
import subprocess
for layer in d.getVar('BBLAYERS', True).split():
if 'meta-digi-del' in layer:
cmd = 'git describe --tags --exact-match 2>/dev/null || true'
return subprocess.Popen(cmd, cwd=layer, shell=True, stdout=subprocess.PIPE).stdout.read()
return ""
## DEL rootfs final tuning ## DEL rootfs final tuning
del_rootfs_tuning() { del_rootfs_tuning() {
#######################################################################
## Create '/etc/build' with build statistics
#######################################################################
cat >${IMAGE_ROOTFS}/etc/build <<-_EOF_
TIMESTAMP=${DATETIME}
DEL_TAG=${DEL_TAG}
Layers revisions:
=================
${LAYERS_REV}
_EOF_
####################################################################### #######################################################################
## Set root password to 'root' if 'debug-tweaks' is NOT enabled. ## Set root password to 'root' if 'debug-tweaks' is NOT enabled.
## command: echo -n 'root' | mkpasswd -5 -s
####################################################################### #######################################################################
MD5_ROOT_PASSWD='$1$SML0de4S$lOWs3t82QAH0oEf8NyNKA0' MD5_ROOT_PASSWD='$1$SML0de4S$lOWs3t82QAH0oEf8NyNKA0'
if echo "${IMAGE_FEATURES}" | grep -qs debug-tweaks; then if echo "${IMAGE_FEATURES}" | grep -qs debug-tweaks; then