Add support for IEEE 802.c stylc CRC32 computation to the sparse image tools
Add support for computing the CRC32 of the data when we make a sparse image,
and storing that CRC in the header. Also update the simg2img tool that reads
sparse images to compute the CRC32 as it writes the image, and check to make
sure it matches what's in the header.
Change-Id: Iadea3a760f91fa9b1efd22a3580dd1943b1ff52e
diff --git a/ext4_utils/Android.mk b/ext4_utils/Android.mk
index 1470254..c7934a3 100644
--- a/ext4_utils/Android.mk
+++ b/ext4_utils/Android.mk
@@ -14,6 +14,7 @@
indirect.c \
uuid.c \
sha1.c \
+ sparse_crc32.c
LOCAL_SRC_FILES := $(libext4_utils_src_files)
LOCAL_MODULE := libext4_utils
@@ -63,7 +64,8 @@
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := simg2img.c
+LOCAL_SRC_FILES := simg2img.c \
+ sparse_crc32.c
LOCAL_MODULE := simg2img
include $(BUILD_HOST_EXECUTABLE)