mirror of https://github.com/thesofproject/sof.git
rimage: Split lines over 80 characters
Change long lines so they don't exceed 80 characters. Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
This commit is contained in:
parent
a90cee2378
commit
894c332997
37
rimage/elf.c
37
rimage/elf.c
|
@ -127,20 +127,20 @@ static int elf_read_sections(struct image *image, struct module *module)
|
||||||
if (!image->verbose)
|
if (!image->verbose)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
fprintf(stdout, " %s section-%d: \ttype\t 0x%8.8x\n", module->elf_file,
|
fprintf(stdout, " %s section-%d: \ttype\t 0x%8.8x\n",
|
||||||
i, section[i].type);
|
module->elf_file, i, section[i].type);
|
||||||
fprintf(stdout, " %s section-%d: \tflags\t 0x%8.8x\n", module->elf_file,
|
fprintf(stdout, " %s section-%d: \tflags\t 0x%8.8x\n",
|
||||||
i, section[i].flags);
|
module->elf_file, i, section[i].flags);
|
||||||
fprintf(stdout, " %s section-%d: \taddr\t 0x%8.8x\n", module->elf_file,
|
fprintf(stdout, " %s section-%d: \taddr\t 0x%8.8x\n",
|
||||||
i, section[i].vaddr);
|
module->elf_file, i, section[i].vaddr);
|
||||||
fprintf(stdout, " %s section-%d: \toffset\t 0x%8.8x\n", module->elf_file,
|
fprintf(stdout, " %s section-%d: \toffset\t 0x%8.8x\n",
|
||||||
i, section[i].off);
|
module->elf_file, i, section[i].off);
|
||||||
fprintf(stdout, " %s section-%d: \tsize\t 0x%8.8x\n", module->elf_file,
|
fprintf(stdout, " %s section-%d: \tsize\t 0x%8.8x\n",
|
||||||
i, section[i].size);
|
module->elf_file, i, section[i].size);
|
||||||
fprintf(stdout, " %s section-%d: \tlink\t 0x%8.8x\n", module->elf_file,
|
fprintf(stdout, " %s section-%d: \tlink\t 0x%8.8x\n",
|
||||||
i, section[i].link);
|
module->elf_file, i, section[i].link);
|
||||||
fprintf(stdout, " %s section-%d: \tinfo\t 0x%8.8x\n\n", module->elf_file,
|
fprintf(stdout, " %s section-%d: \tinfo\t 0x%8.8x\n\n",
|
||||||
i, section[i].info);
|
module->elf_file, i, section[i].info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -267,7 +267,8 @@ static void elf_module_size(struct image *image, struct module *module,
|
||||||
if (module->text_start > section->vaddr)
|
if (module->text_start > section->vaddr)
|
||||||
module->text_start = section->vaddr;
|
module->text_start = section->vaddr;
|
||||||
if (module->text_end < section->vaddr + section->size)
|
if (module->text_end < section->vaddr + section->size)
|
||||||
module->text_end = section->vaddr + section->size;
|
module->text_end = section->vaddr +
|
||||||
|
section->size;
|
||||||
|
|
||||||
fprintf(stdout, "\tTEXT\t");
|
fprintf(stdout, "\tTEXT\t");
|
||||||
} else {
|
} else {
|
||||||
|
@ -275,7 +276,8 @@ static void elf_module_size(struct image *image, struct module *module,
|
||||||
if (module->data_start > section->vaddr)
|
if (module->data_start > section->vaddr)
|
||||||
module->data_start = section->vaddr;
|
module->data_start = section->vaddr;
|
||||||
if (module->data_end < section->vaddr + section->size)
|
if (module->data_end < section->vaddr + section->size)
|
||||||
module->data_end = section->vaddr + section->size;
|
module->data_end = section->vaddr +
|
||||||
|
section->size;
|
||||||
|
|
||||||
fprintf(stdout, "\tDATA\t");
|
fprintf(stdout, "\tDATA\t");
|
||||||
}
|
}
|
||||||
|
@ -501,7 +503,8 @@ int elf_find_section(struct image *image, struct module *module,
|
||||||
|
|
||||||
count = fread(buffer, 1, section->size, module->fd);
|
count = fread(buffer, 1, section->size, module->fd);
|
||||||
if (count != section->size) {
|
if (count != section->size) {
|
||||||
fprintf(stderr, "error: can't read string section %d\n", -errno);
|
fprintf(stderr, "error: can't read string section %d\n",
|
||||||
|
-errno);
|
||||||
ret = -errno;
|
ret = -errno;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,7 +194,8 @@ static int simple_write_module(struct image *image, struct module *module)
|
||||||
|
|
||||||
err = write_block(image, module, section);
|
err = write_block(image, module, section);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
fprintf(stderr, "error: failed to write section #%d\n", i);
|
fprintf(stderr, "error: failed to write section #%d\n",
|
||||||
|
i);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
/* write_block will return padding size */
|
/* write_block will return padding size */
|
||||||
|
@ -328,7 +329,8 @@ static int simple_write_firmware(struct image *image)
|
||||||
module = &image->module[i];
|
module = &image->module[i];
|
||||||
module->fw_size += sizeof(struct snd_sof_blk_hdr) *
|
module->fw_size += sizeof(struct snd_sof_blk_hdr) *
|
||||||
(module->num_sections - module->num_bss);
|
(module->num_sections - module->num_bss);
|
||||||
module->fw_size += sizeof(struct snd_sof_mod_hdr) * hdr.num_modules;
|
module->fw_size += sizeof(struct snd_sof_mod_hdr) *
|
||||||
|
hdr.num_modules;
|
||||||
hdr.file_size += module->fw_size;
|
hdr.file_size += module->fw_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,7 +413,8 @@ int write_logs_dictionary(struct image *image)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (module->logs_index > 0) {
|
if (module->logs_index > 0) {
|
||||||
Elf32_Shdr *section = &module->section[module->logs_index];
|
Elf32_Shdr *section =
|
||||||
|
&module->section[module->logs_index];
|
||||||
|
|
||||||
header.base_address = section->vaddr;
|
header.base_address = section->vaddr;
|
||||||
header.data_length = section->size;
|
header.data_length = section->size;
|
||||||
|
@ -436,7 +439,8 @@ int write_logs_dictionary(struct image *image)
|
||||||
count = fwrite(buffer, 1, section->size,
|
count = fwrite(buffer, 1, section->size,
|
||||||
image->ldc_out_fd);
|
image->ldc_out_fd);
|
||||||
if (count != section->size) {
|
if (count != section->size) {
|
||||||
fprintf(stderr, "error: can't write section %d\n",
|
fprintf(stderr,
|
||||||
|
"error: can't write section %d\n",
|
||||||
-errno);
|
-errno);
|
||||||
ret = -errno;
|
ret = -errno;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -90,7 +90,8 @@ void module_sha256_complete(struct image *image, uint8_t *hash)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ri_hash(struct image *image, unsigned int offset, unsigned int size, uint8_t *hash)
|
void ri_hash(struct image *image, unsigned int offset, unsigned int size,
|
||||||
|
uint8_t *hash)
|
||||||
{
|
{
|
||||||
module_sha256_create(image);
|
module_sha256_create(image);
|
||||||
module_sha256_update(image, image->fw_image + offset, size);
|
module_sha256_update(image, image->fw_image + offset, size);
|
||||||
|
|
|
@ -430,7 +430,8 @@ static int man_module_create(struct image *image, struct module *module,
|
||||||
|
|
||||||
/* bss is last */
|
/* bss is last */
|
||||||
man_module->segment[SOF_MAN_SEGMENT_BSS].file_offset = 0;
|
man_module->segment[SOF_MAN_SEGMENT_BSS].file_offset = 0;
|
||||||
man_module->segment[SOF_MAN_SEGMENT_BSS].v_base_addr = module->bss_start;
|
man_module->segment[SOF_MAN_SEGMENT_BSS].v_base_addr =
|
||||||
|
module->bss_start;
|
||||||
pages = (module->bss_end - module->bss_start) / MAN_PAGE_SIZE;
|
pages = (module->bss_end - module->bss_start) / MAN_PAGE_SIZE;
|
||||||
if ((module->bss_end - module->bss_start) % MAN_PAGE_SIZE)
|
if ((module->bss_end - module->bss_start) % MAN_PAGE_SIZE)
|
||||||
pages += 1;
|
pages += 1;
|
||||||
|
@ -463,7 +464,8 @@ static int man_module_create(struct image *image, struct module *module,
|
||||||
man_module, i);
|
man_module, i);
|
||||||
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
fprintf(stderr, "error: failed to write section #%d\n", i);
|
fprintf(stderr, "error: failed to write section #%d\n",
|
||||||
|
i);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -811,8 +813,8 @@ static int man_write_fw_v1_5_sue(struct image *image)
|
||||||
m->desc.header.preload_page_count = preload_size / MAN_PAGE_SIZE;
|
m->desc.header.preload_page_count = preload_size / MAN_PAGE_SIZE;
|
||||||
|
|
||||||
fprintf(stdout, "Firmware file size 0x%x page count %d\n",
|
fprintf(stdout, "Firmware file size 0x%x page count %d\n",
|
||||||
FILE_TEXT_OFFSET_V1_5_SUE - MAN_DESC_OFFSET_V1_5_SUE + image->image_end,
|
FILE_TEXT_OFFSET_V1_5_SUE - MAN_DESC_OFFSET_V1_5_SUE +
|
||||||
m->desc.header.preload_page_count);
|
image->image_end, m->desc.header.preload_page_count);
|
||||||
|
|
||||||
/* calculate hash for each module */
|
/* calculate hash for each module */
|
||||||
man_hash_modules(image, &m->desc);
|
man_hash_modules(image, &m->desc);
|
||||||
|
|
|
@ -168,7 +168,8 @@ int pkcs_v1_5_sign_man_v1_8(struct image *image,
|
||||||
EVP_PKEY *privkey;
|
EVP_PKEY *privkey;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
const BIGNUM *n, *e, *d;
|
const BIGNUM *n, *e, *d;
|
||||||
unsigned char digest[SHA256_DIGEST_LENGTH], mod[MAN_RSA_KEY_MODULUS_LEN];
|
unsigned char digest[SHA256_DIGEST_LENGTH];
|
||||||
|
unsigned char mod[MAN_RSA_KEY_MODULUS_LEN];
|
||||||
unsigned int siglen = MAN_RSA_SIGNATURE_LEN;
|
unsigned int siglen = MAN_RSA_SIGNATURE_LEN;
|
||||||
char path[256];
|
char path[256];
|
||||||
int ret = -EINVAL, i;
|
int ret = -EINVAL, i;
|
||||||
|
|
Loading…
Reference in New Issue