mirror of https://github.com/thesofproject/sof.git
manifest_module: rename fw_size to output_size
Changed the name of the fw_size variable to a more clear one and added a description. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
This commit is contained in:
parent
99195d2ee6
commit
7367fdf1e6
|
@ -109,7 +109,7 @@ static int elf_read_sections(struct image *image, struct manifest_module *module
|
|||
/* fall through */
|
||||
case SHT_PROGBITS:
|
||||
/* text or data */
|
||||
module->fw_size += section[i].size;
|
||||
module->output_size += section[i].size;
|
||||
|
||||
if (section[i].flags & SHF_EXECINSTR)
|
||||
module->text_size += section[i].size;
|
||||
|
@ -637,8 +637,8 @@ int elf_parse_module(struct image *image, int module_index, const char *name)
|
|||
|
||||
elf_find_section(module, "");
|
||||
|
||||
fprintf(stdout, " module: input size %d (0x%x) bytes %d sections\n",
|
||||
module->fw_size, module->fw_size, module->num_sections);
|
||||
fprintf(stdout, " module: input size %zu (0x%zx) bytes %d sections\n",
|
||||
module->output_size, module->output_size, module->num_sections);
|
||||
fprintf(stdout, " module: text %d (0x%x) bytes\n"
|
||||
" data %d (0x%x) bytes\n"
|
||||
" bss %d (0x%x) bytes\n\n",
|
||||
|
|
|
@ -294,11 +294,11 @@ int simple_write_firmware(struct image *image)
|
|||
|
||||
for (i = 0; i < image->num_modules; i++) {
|
||||
module = &image->module[i];
|
||||
module->fw_size += sizeof(struct snd_sof_blk_hdr) *
|
||||
module->output_size += sizeof(struct snd_sof_blk_hdr) *
|
||||
(module->num_sections - module->num_bss);
|
||||
module->fw_size += sizeof(struct snd_sof_mod_hdr) *
|
||||
module->output_size += sizeof(struct snd_sof_mod_hdr) *
|
||||
hdr.num_modules;
|
||||
hdr.file_size += module->fw_size;
|
||||
hdr.file_size += module->output_size;
|
||||
}
|
||||
|
||||
count = fwrite(&hdr, sizeof(hdr), 1, image->out_fd);
|
||||
|
|
|
@ -54,6 +54,10 @@ struct manifest_module {
|
|||
/* Following fields are used in manifest creation process */
|
||||
int fw_size;
|
||||
|
||||
/* Size of the module in the output image.
|
||||
* Includes text and data sections size + image headers*/
|
||||
size_t output_size;
|
||||
|
||||
/* executable header module */
|
||||
int exec_header;
|
||||
|
||||
|
|
Loading…
Reference in New Issue