[Buildroot] [PATCH 10/11] test_mender/post-build.sh: add rootfs image checksum for bootstrap artifact

Adam Duskett <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
Just like the generate_mender_bootstrap_artifact method in
board/mender/x86_64/post-image-efi.sh, calculate the rootfs-image checksum.

Signed-off-by: Adam Duskett <[email protected]>
---
 support/testing/tests/package/test_mender/post-build.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/support/testing/tests/package/test_mender/post-build.sh b/support/testing/tests/package/test_mender/post-build.sh
index 76698fb7d9..db075628e0 100755
--- a/support/testing/tests/package/test_mender/post-build.sh
+++ b/support/testing/tests/package/test_mender/post-build.sh
@@ -4,11 +4,15 @@ COMPATIBLE_TYPE="buildroot-arm"
 ARTIFACT_NAME="RUNTIME_TEST_ARTIFACT_NAME"
 
 generate_mender_bootstrap_artifact() {
+  img_checksum=$(sha256sum "${BINARIES_DIR}"/rootfs.cpio |awk '{print $1}')
+
   "${HOST_DIR}"/bin/mender-artifact \
     write bootstrap-artifact \
+    --compression none \
     --artifact-name "${ARTIFACT_NAME}" \
     --compatible-types "${COMPATIBLE_TYPE}" \
     --provides "rootfs-image.version:${ARTIFACT_NAME}" \
+    --provides "rootfs-image.checksum:${img_checksum}" \
     --clears-provides "rootfs-image.*" \
     --output-path "${TARGET_DIR}"/var/lib/mender/bootstrap.mender \
     --version 3
-- 
2.55.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.