From: Marcin Maka marcin.maka@linux.intel.com
Signed-off-by: Marcin Maka marcin.maka@linux.intel.com --- rimage/elf.c | 10 +++++++--- rimage/manifest.c | 5 +++++ src/arch/xtensa/Makefile.am | 6 ------ 3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/rimage/elf.c b/rimage/elf.c index 6c7e3da..4efed7a 100644 --- a/rimage/elf.c +++ b/rimage/elf.c @@ -77,9 +77,12 @@ static int elf_read_sections(struct image *image, struct module *module) /* find manifest module data */ man_section_idx = elf_find_section(image, module, ".bss"); if (man_section_idx < 0) { - return -EINVAL; + /* no bss - it is OK for boot_ldr */ + module->bss_start = 0; + module->bss_end = 0; + } else { + module->bss_index = man_section_idx; } - module->bss_index = man_section_idx;
fprintf(stdout, " BSS module metadata section at index %d\n", man_section_idx); @@ -325,7 +328,8 @@ static void elf_module_limits(struct image *image, struct module *module) uint32_t valid = (SHF_WRITE | SHF_ALLOC | SHF_EXECINSTR); int i;
- module->text_start = module->data_start = module->bss_start = 0xffffffff; + module->text_start = module->data_start = 0xffffffff; + module->bss_start = 0; module->text_end = module->data_end = module->bss_end = 0;
fprintf(stdout, " Found %d sections, listing valid sections......\n", diff --git a/rimage/manifest.c b/rimage/manifest.c index 6bb4ad3..257aa0d 100644 --- a/rimage/manifest.c +++ b/rimage/manifest.c @@ -400,6 +400,11 @@ static int man_module_create(struct image *image, struct module *module, if ((module->bss_end - module->bss_start) % MAN_PAGE_SIZE) pages += 1; man_module->segment[SOF_MAN_SEGMENT_BSS].flags.r.length = pages; + if (pages == 0) { + man_module->segment[SOF_MAN_SEGMENT_BSS].flags.ul = 0; + man_module->segment[SOF_MAN_SEGMENT_BSS].flags.r.type = + SOF_MAN_SEGMENT_EMPTY; + }
fprintf(stdout, "\tNo\tAddress\t\tSize\t\tFile\tType\n");
diff --git a/src/arch/xtensa/Makefile.am b/src/arch/xtensa/Makefile.am index 9f53e88..eafde0d 100644 --- a/src/arch/xtensa/Makefile.am +++ b/src/arch/xtensa/Makefile.am @@ -61,7 +61,6 @@ sof_LDADD = \ ../../audio/libaudio.a \ ../../math/libsof_math.a \ ../../drivers/libdrivers.a \ - libreset.a \ xtos/libxtos.a \ xtos/libxlevel2.a \ xtos/libxlevel3.a \ @@ -111,11 +110,6 @@ boot_ldr_CCASFLAGS = \ boot_ldr_LDADD = \ hal/libhal.a \ libreset.a \ - xtos/libxtos.a \ - xtos/libxlevel2.a \ - xtos/libxlevel3.a \ - xtos/libxlevel4.a \ - xtos/libxlevel5.a \ -lgcc
boot_ldr_LDFLAGS = \