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>
This commit is contained in:
committed by
Petr Štetiar
parent
261df949fa
commit
fd104daa2f
@@ -243,14 +243,14 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
|
||||
memset(desc, 0, sizeof(struct fis_image_desc));
|
||||
memcpy(desc->hdr.name, part->name, sizeof(desc->hdr.name));
|
||||
desc->crc.desc = 0;
|
||||
desc->crc.file = 0;
|
||||
desc->crc.file = part->crc;
|
||||
|
||||
desc->hdr.flash_base = offset;
|
||||
desc->hdr.mem_base = part->loadaddr;
|
||||
desc->hdr.entry_point = part->loadaddr;
|
||||
desc->hdr.size = (part->size > 0) ? part->size : size;
|
||||
desc->hdr.data_length = desc->hdr.size;
|
||||
|
||||
desc->hdr.data_length = (part->length > 0) ? part->length :
|
||||
desc->hdr.size;
|
||||
offset += desc->hdr.size;
|
||||
size -= desc->hdr.size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user