When some automation script gets some rimage flag wrong then rimage
exits and does not run at all. In such a case we want the build to fail
immediately and see the error at the bottom of the build logs and not
obscured by other, consecutive failures caused by the lack of rimage
output.
Take control of the exit code away from usage() and give it back to
main() where it belongs.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch removes the unnecessary and unscalable -x option.
This option aims to add an offset to the .data section of
its parent .module section. This is horrible idea because this
offset will vary depend on the compiler used. It is better and
much easier to just store only the .data section so the offset
is always 0.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This makes is more obvious when the filename is empty, which happened in
bug https://github.com/thesofproject/sof/pull/4711
Also prefix identical log statements with their different __func__
names.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
After commit 916fc2cd73ff: "config: Remove unused adsp structs"
those defines are unused.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Return value, for error case should be unified.
For those functions, default error value is UINT32_MAX.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Developer should know what is ther return value for error cases.
Improved doxydoc may be used eg. by IDE to speed-up code development.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This enum value is used only to distinguish suecreek from other
platforms, which can be done also by platform name.
Manual enumeration, in separate toml files with manual synchronization
in enum definition is quite error prone. After commit
9bf46d3: "rimage: Add support for mt8195" and
9716e10: "config: Add imx8ulp.toml" there are two different
platform with the same enum value 15 specified, which proves such a
thesis.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
After commit 2965908 "manifest: Remove -m option" those
structs are unused. ADSP configuration comes from toml
configuration files.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This patch fixes the potential overflow which may happen during
conversion of signed long. On a platforms where signed long
is only 32 bits the address which is stored in temp_s will experience
overflow.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
memory clearly has exit path through argument, factor out temporary
variable to silence cppcheck
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
'key' argument must describe 'key' which triggered error message
to keep stderr output helpful.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
sec_buffer allocated inside elf_read_section()
was not being freed before and is freed now.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Add support of cavs extended manifest and modules. Now
we will have another config tgl-cavs for tgl.
Signed-off-by: Rander Wang <rander.wang@intel.com>
This comment is meant for "git grep salt", that's its main purpose.
Much more obvious timestamps aside, this new code is the only
non-deterministic part of rimage - learned the very hard way
(OpenSSL "documentation" calls it "sLen"...)
A/B testing of build system changes is much, much easier when
locally and temporarily making the build 100% deterministic.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This type was used by early versions of meu, but the hash is not
used in later versions. Leave the code in in case it has to come back.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add simple crc32 function to calculate the checksum for v2.5 headers.
Implementation is very simple using shift register as we don't require
speed. Calculate the v2.5 header checksum with crc-32/iso-hdlc
parameters.
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>