Skip to content

Commit 4e2aa1b

Browse files
committed
Trying to add traceability in devel images
1 parent 0abe440 commit 4e2aa1b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

recipes-samples/images/lmp-devel-arduino-image.bb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,12 @@ CORE_IMAGE_BASE_INSTALL += " \
6060
u-boot-fw-utils \
6161
${OPENCV} \
6262
"
63+
64+
# Custom task to write git SHA to /etc/os-release
65+
write_git_sha() {
66+
META_LAYER_DIR="${BSPDIR}/layers/meta-partner-arduino"
67+
GIT_SHA=$(cd ${META_LAYER_DIR} && git rev-parse HEAD)
68+
echo "META_LAYER_GIT_SHA=${GIT_SHA}" >> ${IMAGE_ROOTFS}/etc/os-release
69+
}
70+
71+
ROOTFS_POSTPROCESS_COMMAND += "write_git_sha; "

0 commit comments

Comments
 (0)