tools: Allow crc8 to be used
authoroliver@schinagl.nl <oliver@schinagl.nl>
Fri, 25 Nov 2016 15:30:31 +0000 (16:30 +0100)
committerJoe Hershberger <joe.hershberger@ni.com>
Tue, 7 Feb 2017 16:54:32 +0000 (10:54 -0600)
This patch enables crc8 to be used from within the tools directory using
u-boot/crc.h.

Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
include/u-boot/crc.h
tools/Makefile

index 754ac729cec2adc71b189288bf5da6d6b30dc546..6764d58babac8197dbe8f593fdf70658c4419414 100644 (file)
@@ -9,6 +9,9 @@
 #ifndef _UBOOT_CRC_H
 #define _UBOOT_CRC_H
 
+/* lib/crc8.c */
+unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len);
+
 /* lib/crc32.c */
 uint32_t crc32 (uint32_t, const unsigned char *, uint);
 uint32_t crc32_wd (uint32_t, const unsigned char *, uint, uint);
index f5ac6313e1f1b6867a2340b8fdf7bd045588971c..5e089c957e3aa894743db3347fe632d97e334748 100644 (file)
@@ -196,6 +196,7 @@ fdtgrep-objs += $(LIBFDT_OBJS) fdtgrep.o
 # that won't build on some weird host compiler -- though there are lots of
 # exceptions for files that aren't complaint.
 HOSTCFLAGS_crc32.o := -pedantic
+HOSTCFLAGS_crc8.o := -pedantic
 HOSTCFLAGS_md5.o := -pedantic
 HOSTCFLAGS_sha1.o := -pedantic
 HOSTCFLAGS_sha256.o := -pedantic