Commit Graph

13 Commits

Author SHA1 Message Date
Andrey Borisovich ee5c3e1deb Added handling of OpenSSL on Windows with MSYS2
Added new MSYS_INSTALL_DIR variable that points to MSYS2 installation
for Windows users. It is used to include POSIX native headers from
/usr/include also required openssl headers.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-02-02 10:13:25 +00:00
Andrey Borisovich ecb6a66932 Update to C99 standard to match SOF. Silenced warning generated by newest GCC compiler related to int cast of char typed values that may result in negative values. Syntax fix in linkage of crypto library to more generic approach. 2022-01-21 17:29:24 +00:00
Marc Herbert bcbcec79e5 cmake: drop binutils-specific '-Wl,-EL' option
Fixes clang failure:

  clang: error: -Wl,-EL: 'linker' input unused [-Werror,-Wunused-command-line-argument]

-EL has an effect only when using OUTPUT_FORMAT or --oformat but rimage
uses neither.

The binaries produced by ld version 2.34 are strictly identical before
and after this removal.

It is not clear why -EL was ever added. It was added to src/Makefile.am
by commit 0d33e87433 and to src/CMakeLists.txt by commit 4e3ead0096
but these commits were initial additions of the entire files and they
did not get into detail.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-26 20:13:55 +01:00
Marc Herbert ecb921227e cmake: drop '3' from -Wimplicit-fallthrough=3, it's the default value
From the gcc documentation:

'-Wimplicit-fallthrough'

     '-Wimplicit-fallthrough' is the same as '-Wimplicit-fallthrough=3'
     and '-Wno-implicit-fallthrough' is the same as
     '-Wimplicit-fallthrough=0'.

clang supports only the number-less option.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-26 20:13:55 +01:00
Karol Trzcinski 2965908135 manifest: Remove -m option
Used platform should be defined by config file, given in
-c option. Double ways of defining platform may lead to
missalignement, so old way should be removed.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-09-16 15:15:14 +01:00
Karol Trzcinski de1b0f7def config: Add configuration file parsing interface
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 <karolx.trzcinski@linux.intel.com>
2020-09-16 15:15:14 +01:00
Marc Herbert 4348e2a2bd cmake: use CMAKE_BUILD_TYPE and default to Debug
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 <marc.herbert@intel.com>
2020-06-16 08:50:28 +01:00
Karol Trzcinski 9f3f2d7d71 headers: Use full path to header
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 <karolx.trzcinski@linux.intel.com>
2020-05-25 12:36:12 +01:00
Karol Trzcinski 116e141193 headers: Move headers to rimage namespace
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 <karolx.trzcinski@linux.intel.com>
2020-05-25 12:36:12 +01:00
Karol Trzcinski f0c6ee0f3a ext_man: Create extended manifest
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 <karolx.trzcinski@linux.intel.com>
2020-04-21 09:09:18 +01:00
Daniel Leung ea04cb816e Remove cmake option SOF_SOURCE_DIR
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 <danielcp@gmail.com>
2020-04-05 20:02:13 +01:00
Daniel Leung e09354a5b5 Update rimage to remove ldc generation ability
This reflects the changes on SOF project commit
b3c16790cd.

Signed-off-by: Daniel Leung <danielcp@gmail.com>
2020-04-05 20:02:13 +01:00
Daniel Leung a264697961 Use CMake to build rimage
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 <danielcp@gmail.com>
2020-03-26 09:41:34 +00:00