diff --git a/scripts/image b/scripts/image index d7644be694..e52bdaf24b 100755 --- a/scripts/image +++ b/scripts/image @@ -319,6 +319,11 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ] # create release tarball tar cf $TARGET_IMG/$IMAGE_NAME.tar -C target $IMAGE_NAME + # create sha256 checksum of tarball + ( cd $TARGET_IMG + sha256sum ${IMAGE_NAME}.tar > ${IMAGE_NAME}.tar.sha256 + ) + # create image files if requested if [[ ( "$1" = "amlpkg" || "$1" = "noobs" || "$1" = "mkimage" ) && -n "$BOOTLOADER" ]]; then # projects can set KERNEL_NAME (kernel.img) @@ -423,6 +428,11 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ] zip -q $TARGET_IMG/$IMAGE_NAME.zip * + # create sha256 checksum of zip + ( cd $TARGET_IMG + sha256sum ${IMAGE_NAME}.zip > ${IMAGE_NAME}.zip.sha256 + ) + popd > /dev/null popd > /dev/null @@ -531,6 +541,11 @@ if [ "$1" = "release" -o "$1" = "mkimage" -o "$1" = "amlpkg" -o "$1" = "noobs" ] # create release tarball tar cf $TARGET_IMG/${IMAGE_NAME}-$1.tar -C $TARGET ${IMAGE_NAME}-$1 + + # create sha256 checksum of tarball + ( cd $TARGET_IMG + sha256sum ${IMAGE_NAME}-$1.tar > ${IMAGE_NAME}-$1.tar.sha256 + ) fi if [ -d $RELEASE_DIR ]; then