From ea679de8371e4e74fe4e78fb8df8e5df19efffdc Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Fri, 29 Sep 2017 18:22:30 +0200 Subject: atjboottool: put afi and fw code in its own files Change-Id: I16347ebee0f82d5fdf32f5aa8f955c07fe148eba --- utils/atj2137/atjboottool/afi.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'utils/atj2137/atjboottool/afi.h') diff --git a/utils/atj2137/atjboottool/afi.h b/utils/atj2137/atjboottool/afi.h index bb264cefdf..6756364d2a 100644 --- a/utils/atj2137/atjboottool/afi.h +++ b/utils/atj2137/atjboottool/afi.h @@ -23,7 +23,13 @@ #include -/* Check if a file looks like a FWU file */ +uint32_t afi_checksum(void *ptr, size_t size); +/* Unpack an AFI file: the callback function will be called once for each file in the archive with + * its name and content. If the callback returns a nonzero value, the function will stop and return + * that value. Returns 0 on success */ +typedef int (*afi_extract_callback_t)(const char *name, uint8_t *buf, size_t size); +int afi_unpack(uint8_t *buf, size_t size, afi_extract_callback_t cb); +/* Check if a file looks like an AFI file */ bool afi_check(uint8_t *buf, size_t size); #endif /* __AFI_H__ */ -- cgit v1.2.3