Commit Graph

22 Commits

Author SHA1 Message Date
Adrian Bonislawski a82b44043f rimage: change error to warning if section not found
Thats because this function is used also to find optional sections so it will be decided later (outside of this func) if this is actually error

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-23 22:55:32 +01:00
Adrian Bonislawski 6c908797c6 rimage: make .static_log_entries optional section
Thats because this section is optional in FW, it will be created only with TRACE enabled

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-23 22:55:32 +01:00
Janusz Jankowski 1dd7a0724b rimage: ignore sections not used by bootloader
In case of multiple modules, rimage should not expect these sections
in bootloader module: .bss, .static_log_entries .fw_ready.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-11 09:05:26 +02:00
Janusz Jankowski 107537b56b rimage: change license to bsd
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Diana Ungureanu 806af330d0 rimage: elf: Break down multiple assignment
Multiple assignment should be avoided.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 894c332997 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>
2019-03-14 10:29:17 +00:00
Diana Ungureanu a90cee2378 rimage: Remove blank lines before/after braces
Blank lines aren't necessary after/before open or closed
braces.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 5032a493e9 rimage: Remove explicit comparisons to NULL in the rimage/*.c files
Comparisons to NULL are now implicit as the checkpatch.pl requires.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu a953d95878 rimage: Fix code alignment and indentation issues
This was reported by checkpatch.pl and makes code
easier to read.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Adrian Bonislawski ef8b2d6ddf rimage: make a "Module reading" view similar to "Module writing" view
Size column in both cases instread of Bytes and Size
Hex view in both cases instead of Dec and Hex

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-03-06 15:00:59 +00:00
Daniel Baluta de7173fbc3 rimage: Describe memory as an array of zones
Use new block types added to describe memory for
a platform as an array of zones. The block type
will be an index into the array.

A memory zone is described by (base, size, host_offset).

With this map we can now easily find for a given section
in which memory zone it belongs.

Because we have 10 zones reserved this patch will allocate
extra 12 * 10 = 120 bytes that are not used yet.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-02-05 12:19:01 +00:00
Janusz Jankowski 5afec83728 rimage: use fopen binary mode 2019-01-30 08:05:36 +01:00
Janusz Jankowski c82f759420 rimage: use local elf.h
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 06:52:35 +01:00
ArturX Kloniecki 0f3f9c0807 rimage: debugability: include fw_version in .ldc file
Extract fw_version from fw_ready section of elf and include it in
header of .ldc file to allow verification by sof-logger.

Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2018-10-30 12:21:56 +01:00
ArturX Kloniecki 4e5fa7723b debugability: rimage: extract .static_log_entries from elf
.static_log_entries section is extracted to logs dictionary
to remove xtensa toolchain dependency from logs parser.

Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2018-09-26 08:05:03 +02:00
Marcin Maka 45e9bc422a Removing unneeded XTOS sections from boot_ldr and main fw.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-05-24 12:38:56 +02:00
Liam Girdwood 7db25d8924 rimage: add support to build and sign runtime modules
Currently rimage only supports building ELF images with know TEXT, DATA
and BSS addresses. This patch adds support to build runtime relocatable
modules that can be loaded linked into the base SOF FW at runtime.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 21:49:19 +01:00
Liam Girdwood 0e26f15448 rimage: display ELF section names.
Display the name of each ELF section to aid build and debug.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 08:58:02 +01:00
Pan Xiuli 3943df6f45 rimage: read the fixup text size form ELF
The actual text size will change and the hard code base_fw_text_size_fixup
could not fit the changing size. We should get the fixup size from the
module info just from the memory mapping.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-02 09:06:30 +00:00
Liam Girdwood 9d5c466380 rimage: fix elf section collision detection.
Section end was not checked. Now fixed. Added more error output to
identify.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:52:10 +00:00
Liam Girdwood f09ce2a6a0 rimage: elf: validate module sections internally.
Make sure we validate all module sections against each other.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:50:03 +00:00
Liam Girdwood 05ef4343d1 rimage: import rimage image creation and signing tool
rimage is being moved from tools repo to sof repo since there is now a
cyclic dependency between both repos and sof needs rimage for it's
build.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-13 20:29:40 +00:00