Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test rimage move #8286

Closed
wants to merge 354 commits into from
Closed

Conversation

marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Oct 5, 2023

No description provided.

dcpleung and others added 30 commits March 26, 2020 09:41
CMake is to be used instead of autotools. So remove the autotools
files.

This revert commit f6bf4b0 and
commit 0d33e87

Signed-off-by: Daniel Leung <[email protected]>
This adds the necessary bits to allow building rimage
with CMake with similar configure options as the just
removed autotools files.

Also update README.md for new build instructions.

Signed-off-by: Daniel Leung <[email protected]>
This reflects the changes on SOF project commit
b3c1679.

Signed-off-by: Daniel Leung <[email protected]>
Since both fw.h and manifest.h are being used in the main SOF
repo and also here in the standalone rimage repo, to prevent
them getting out of sync, the SOF main repo is going to use
the ones coming from the rimage repo. So there is no need for
the option anymore.

Signed-off-by: Daniel Leung <[email protected]>
Code formatting should be consistent and function arguments
should be aligned to opening parenthesis.

Signed-off-by: Karol Trzcinski <[email protected]>
Unused arguments shouldn't be passed to function because it
makes code messy.

Signed-off-by: Karol Trzcinski <[email protected]>
This changes the LICENSE file to match the LICENSE file
from the main SOF repo, except they entries for the kconfig
scripts which are not here in this repo.

Signed-off-by: Daniel Leung <[email protected]>
Fixes following error when compiling code:
...
src/elf.c: In function ‘elf_find_section’:
src/elf.c:469:20: error: initialization discards ‘const’ qualifier
           from pointer target type [-Werror=discarded-qualifiers]
  469 |  Elf32_Ehdr *hdr = &module->hdr;
      |                    ^
cc1: all warnings being treated as errors
...

Signed-off-by: Andrei Emeltchenko <[email protected]>
Fixes issue ".init_array" is not copied to ri image making it zero
filled. This causes Zephyr crashing trying to execute functions from
this section.

Signed-off-by: Andrei Emeltchenko <[email protected]>
Enable simple build test for rimage.

Signed-off-by: Pan Xiuli <[email protected]>
In many functions there is need to read user section content
and check firmware version or write section content to some
manifest or dictionary. Previously to do it, in each function
was loop to search for proper section in proper module,
then allocate buffer, read content and check for possible error
between each step what is quite overwhelming. After change there
will be one function responsible for this task.

Signed-off-by: Karol Trzcinski <[email protected]>
Extended manifest is a place to store metadata about firmware, known during
compilation time - for example firmware version or used compiler.
Given information are read on host side before firmware startup.
This part of output binary is not signed.

Signed-off-by: Karol Trzcinski <[email protected]>
This name is used in different part of source code so should refer
to single place instead by copied.

Signed-off-by: Karol Trzcinski <[email protected]>
Such a solution improve code hermentization and flexibility.
Also such a solution is more relevant because of focus on particular
module during section reading, so there won't be possibility to
implicity scan section 'A' from first module and section 'B' from
second one.

Signed-off-by: Karol Trzcinski <[email protected]>
elf_read_section() returns section size when everything is ok,
so ret value should be reset to 0 after this function call

Signed-off-by: Karol Trzcinski <[email protected]>
Try to build extended manifest only when `e` flag will be set,
to prevent error and warning printing during creating optional
part of formware image.

Signed-off-by: Karol Trzcinski <[email protected]>
ret variable is always set in elf_read_section(), to initial value
is not important.

Signed-off-by: Karol Trzcinski <[email protected]>
This part of binary should contain valid firmware version.

Signed-off-by: Karol Trzcinski <[email protected]>
Sometimes they will be different and this will make developer
aware of the differences

Signed-off-by: Adrian Bonislawski <[email protected]>
some sections may use different lma than vma address,
in such case rimage needs to use lma

Signed-off-by: Adrian Bonislawski <[email protected]>
Generator is part of rimage tool and there is any reference to them
in kernel source code, so it should be moved out of kernel folder.

Signed-off-by: Karol Trzcinski <[email protected]>
Because there is possibility to reference headers from this repo
from another one, there is a need to put every header into rimage
namespace. Otherwise reference to headers from duplicated
namespace (like kernel) from external repo may be ambiguous.
Update guard ifdef/define/endif sequence value, to make it more
unique

Signed-off-by: Karol Trzcinski <[email protected]>
Path added to include should end at 'include' as usual, then
it is easy to see where specific headers comes from during reading
source code. It is especially important for projects composed from
a few parts, like firmware, driver, build and debug tools in this
project.
Moreover changed "" to <> in include directives because there is
specified full path to file from project include root and to be
aligned with code style from firmware repository,

Signed-off-by: Karol Trzcinski <[email protected]>
Unlike hardcoded target_compile_options(-g) can be overriden from the
command line, from the parent ExternalProject_Add(CMAKE_ARGS) (tested)
or from a CMake GUI (not tested).

Default to Debug because the time spent running rimage is negligible
compared to building the image to sign and because the time saved
learning CMake when it crashes can be huge for some people.

BTW -O2 -g is rarely ever useful.

Signed-off-by: Marc Herbert <[email protected]>
This makes the write_firmware NULL pointer added by commit
dd77445 and corresponding crash more user-friendly.
Before:

  Program received signal SIGSEGV, Segmentation fault.

After:

  rimage: src/rimage.c:197: main: Assertion `image.adsp->write_firmware'
  failed.

Signed-off-by: Marc Herbert <[email protected]>
This feature is not used by SOF anyway and only causes
FW load failures, we can set it to 0xffff so it will
work for ADL+ platforms.

Signed-off-by: Janusz Jankowski <[email protected]>
TOML aims to be a minimal configuration file format that's easy to read
due to obvious semantics. TOML is designed to map unambiguously to a hash table.

Signed-off-by: Karol Trzcinski <[email protected]>
This part should be moved to separate function,
to allow easily add another way of machine description.

Signed-off-by: Karol Trzcinski <[email protected]>
Exported function will be used in configuration parser, to
assign correct function version depending on manifest versiony

Signed-off-by: Karol Trzcinski <[email protected]>
This allow to add new platform with old version of rimage tool.
Default values are easily to define for any fields, so fields
duplication in config files should be reduced.

Signed-off-by: Karol Trzcinski <[email protected]>
singalsu and others added 15 commits August 28, 2023 11:51
This PR adds the crossover component for MTL and LNL. The
parameters are copied from TGL and TGL-H configuration of
crossover.

Signed-off-by: Seppo Ingalsuo <[email protected]>
Add CPS and CPC consumptions for given modules

Signed-off-by: Krzysztof Frydryk <[email protected]>
Fill in measured cps consumption data for: mixin, mixout, copier,
peakvol, gain, src, updwnmixer for a range of supported formats.

Signed-off-by: Krzysztof Frydryk <[email protected]>
Fill in measured cps consumption data for ASRC module for various
formats.

Signed-off-by: Krzysztof Frydryk <[email protected]>
Fill in measured cps consumption data for SMATEST module

Signed-off-by: Adrian Bonislawski <[email protected]>
Fill in measured cps consumption data for EQIIR module

Signed-off-by: Adrian Bonislawski <[email protected]>
Fill in measured cps consumption data for COPIER & GAIN  modules

Signed-off-by: Adrian Bonislawski <[email protected]>
This patch allows to load the Multiband-DRC component.

Signed-off-by: Seppo Ingalsuo <[email protected]>
This patch enables load of the DC blocker component.

Signed-off-by: Seppo Ingalsuo <[email protected]>
A structure was created to represent a file, a section and a strings
section. Created a new functions to read a elf file, retrieve a section
header based on index or name, read a section contents based on
a header or name, retrieve section name and functions that print file,
section and program headers.

Signed-off-by: Adrian Warecki <[email protected]>
A structure was created to represent the module, module section and section
informations. Added a set of new functions for parsing a module and reading
its contents.

Signed-off-by: Adrian Warecki <[email protected]>
Moved the module information to the new module structure. Used new
functions to parse module.

Signed-off-by: Adrian Warecki <[email protected]>
Removed elf.c file that is no longer in use.

Signed-off-by: Adrian Warecki <[email protected]>
This patch enables load the of Time domain fixed beamformer (TDFB).

Signed-off-by: Seppo Ingalsuo <[email protected]>
@marc-hb marc-hb changed the title Test rimage removal Test rimage move Oct 5, 2023
… sof

Preparation to move everything back into the
https://github.com/thesofproject/sof/ repo, see
thesofproject#8178 for details.

Signed-off-by: Marc Herbert <[email protected]>
Merge full rimage.git history back into tools/rimage/ subdir of
sof.git thanks to:

   git merge --allow-unrelated-histories rimage-repo/main

Also list incoming tools/rimage/tomlc99 16000 gitlink in
sof/.gitmodules to avoid breaking all git submodule commands.
This MUST be done as part of this merge commit to avoid
git submodule errors and preserve git bisectability.

Signed-off-by: Marc Herbert <[email protected]>
.gitmodules files have no effect unless they're at the top-level.

Signed-off-by: Marc Herbert <[email protected]>
Add it both as a git submodule and west submodule to minimize
disruption. The current focus is on rimage and that's a dramatic enough
change; one problem at at time.

Signed-off-by: Marc Herbert <[email protected]>
Switch away from the independent rimage submodule. Long story in
thesofproject#8178 and others.

Signed-off-by: Marc Herbert <[email protected]>
Switch away from the independent rimage submodule. Long story in
thesofproject#8178 and others.

Signed-off-by: Marc Herbert <[email protected]>
Switch away from the independent rimage submodule. Long story in
thesofproject#8178 and others.

Signed-off-by: Marc Herbert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.