added support for downloading to our custom bootloader
diff --git a/bbb_cape/src/bbb/crc.h b/bbb_cape/src/bbb/crc.h
index 7a8eb95..4d1dea7 100644
--- a/bbb_cape/src/bbb/crc.h
+++ b/bbb_cape/src/bbb/crc.h
@@ -4,11 +4,24 @@
 #include <string.h>
 #include <stdint.h>
 
+namespace bbb {
+
+class ByteReaderInterface;
+
+}  // namespace bbb
 namespace cape {
 
 // Calculates a CRC32 checksum for data. This is definitely the same one as the
 // cape MCU does in hardware which seems to be the same one as Ethernet etc use.
-uint32_t CalculateChecksum(uint8_t *data, size_t length);
+// length is the number of bytes of data to read. It must be a multiple of 4.
+// initial can be a previous return value to continue the same checksum over
+// more data.
+uint32_t CalculateChecksum(uint8_t *data, size_t length,
+                           uint32_t initial = 0xFFFFFFFF);
+// Reads all data out of reader and does a checksum over all of it in reasonably
+// sized pieces. Does all of the reads with a timeout of 0. Stops on the first
+// timeout.
+uint32_t CalculateChecksum(::bbb::ByteReaderInterface *reader);
 
 }  // namespace cape