openwrt/package/system/mtd/src/fis.h
Daniel Gimpelevich fd104daa2f mtd: add CRC signature to RedBoot partition map
The code for calculating the CRC32 signatures for RedBoot FIS partitions
was already included, but for unknown reasons, it was never invoked. Some
bootloaders enforce checking these for loaded kernels, so they should be
written. This patch does so.

Tested-by: Brian Gonyer <bgonyer@gmail.com>
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
2019-07-17 22:59:29 +02:00

17 lines
340 B
C

#ifndef __FIS_H
#define __FIS_H
struct fis_part {
unsigned char name[16];
uint32_t offset;
uint32_t loadaddr;
uint32_t size;
uint32_t length;
uint32_t crc;
};
int fis_validate(struct fis_part *old, int n_old, struct fis_part *new, int n_new);
int fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new);
#endif