Commit Graph

56 Commits

Author SHA1 Message Date
Marcin Maka 7fb720a172
Merge pull request #914 from jajanusz/windows-build
cmake: build on windows
2019-01-31 14:29:52 +01:00
Janusz Jankowski 5afec83728 rimage: use fopen binary mode 2019-01-30 08:05:36 +01:00
Janusz Jankowski 0cb4457cad rimage: use time_t for localtime
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 07:53:06 +01:00
Janusz Jankowski a8d33b2d36 rimage: cast size_t to correct format types
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 07:47:10 +01:00
Janusz Jankowski 05912c5639 rimage: fix for gcc8.1 -Wstringop-truncation
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 07:33:30 +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
Janusz Jankowski ad3d864ca0 rimage: elf.h: use stdint 2019-01-30 06:47:41 +01:00
Janusz Jankowski 46a38ce4f1 rimage: import elf.h
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 06:43:09 +01:00
Daniel Baluta a40e1fd009 rimage: Fix file_format.h include guard
This is most likely due to copy/paste.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-01-29 12:15:51 +00:00
Daniel Baluta f4900e7dcd rimage: Use fw.h instead of duplicating the code
This is very useful when updating one of the types in UAPI
because with the current implementation one needs to be careful
to also update file_format.h

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-01-29 12:15:51 +00:00
Janusz Jankowski d91be6da67 buildsystem: remove autotools from sof
This commit doesn't touch tools buildsystem.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 0beb84b828 cmake: add rimage build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 9af711c761 rimage: remove config.h dependency
man_* files don't need it
pkcs can use PEM_KEY_PREFIX from passed in defines

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Bard liao fa2fc61fe6 rimage: make block divisible by 4
Add pandding to each block if the block size is not divisible by 4.
Which can avoid unaligned memory accesses.

Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
2018-12-26 11:37:02 +00:00
Liam Girdwood cadfc6aca2 rimage: Add support for Sue creek
WiP.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-22 14:30:49 +00:00
Liam Girdwood 801272e242 rimage: make sure cavs1.5 manifest uses correct file offsets.
cavs1.5 manifest file structure and offsets are different than cavs
version 1.8

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-22 14:30:49 +00:00
Tomasz Lauda 4bd543c337 rimage: fix possible buffer overflow
Fixes possible buffer overflow with strcpy.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-11-28 12:35:57 +01:00
Liam Girdwood 2ba01165b9 uapi: split ipc.h and abi.h into small files.
Split the larger ABI files into smaller more manageable chunks. Also
split by end user into IPC and user space ABIs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-09 21:19:11 +00:00
Zhu Yingjiang 5912e40fe3 change the 1.8 and 1.5 header defines
add comments and change the 1.5 1.8 header defines

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-08 18:53:29 +08:00
Zhu Yingjiang f1c5a15c8a rimage: add build scripts to build 1.5 image
add to build scripts and Makefiles to build firmware binary
for kbl and skl

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-05 18:36:03 +08:00
Zhu Yingjiang 328c4ea6e5 rimage: add 1.5 rimage package API
add API for making 1.5 rimage binary

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-05 18:36:02 +08:00
Zhu Yingjiang 7e0a9d8b6f rimage: add 1.5 rimage defines
add 1.5 rimage defines for skl and kbl

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-05 18:36:02 +08:00
Zhu Yingjiang 5d6a43c278 rimage: manifest: add manifest APIs
add the 1.5 manifest operation APIs

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-05 18:36:02 +08:00
Zhu Yingjiang dc17f286b9 rimage: manifest: add 1.5 manifest define
add 1.5 manifest structure define, macro define, KBL and
SKL 1.5 manifest defines

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-05 18:35:48 +08:00
Zhu Yingjiang f89a4a5418 rimage: manifest: rename old manifest to 1.8
rename old API and comments print info to 1.8, as for add
1.5 manifest.

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-05 16:19:49 +08: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
Zhu Yingjiang 5aa722e72b rimage: add firmware 1.5 manifest binary descryptor
add the 1.5 version manifest, for skylake and kabylake

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-10-18 14:42:58 +08:00
Zhu Yingjiang f1a40cff1f rimage: add firmware 1.5 manifest header
add manifest for skylake/kabylake, version 1.5

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-10-18 14:41:40 +08:00
Zhu Yingjiang 0a829ea0bb rimage: modify the API to version 1.8
change the define to 1.8
modify the API name to 1.8

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-10-18 14:38:12 +08:00
Zhu Yingjiang e539fa0965 rimage: rename the old css_header and fw_image_manifest
rename css_header to css_header_v1_8
rename fw_image_manifest to fw_image_manifest_v1_8

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-10-18 10:02:38 +08:00
Liam Girdwood 99473f3200 rimage: add initial support for sue creek.
Build tested.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-10-01 20:03:06 +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
Janusz Jankowski 054a218e83 autoconf: optional implicit-fallthrough
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-09-11 12:13:17 +02:00
Janusz Jankowski c0f156b2ba icl: initial support
Added icelake platform to platforms.
Updated rimage to support icelake.
Updated autoconf and automake files.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-08-31 19:52:48 +02:00
Zhang Keqiao a78a0f4a95 rimage: adding an include for all gcc version build
Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2018-07-02 14:00:40 +08:00
Pan Xiuli e2550ee75c rimage: fix function returns address of local variable bug
path may return out the function from rimage->key_name.
Switch the usage for local variable to avoid this bug.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-29 15:50:29 +08:00
Tomasz Lauda ac7b0c227a rimage: add support for automatic MEU signing
This patch allows rimage to sign FW binaries using MEU tool.
Paths to MEU and private key have to be provided during config step.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-04 13:54:25 +01:00
Tomasz Lauda e499997302 rimage: add correct FW version to binary
Now correct FW version is included into binary.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-04 13:54:25 +01: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 7c5dd8cfdf Merge remote-tracking branch 'sof/master' 2018-05-14 15:12:38 +02:00
Pan Xiuli 8fbc230fbb rimage: openssl: add compatibility for openssl 1.1.0
Add compatibility support for openssl 1.0.2 support alongsid with
openssl 1.1.0

References:
https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes
Compatibility Layer

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-14 15:12:13 +02:00
Pan Xiuli 1e231b9dd2 rimage: add error handler for localtime call
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-11 10:18:43 +01:00
Pan Xiuli ffa3e84584 rimage: fix wrong error message
If keyname can not be open, error message should output keyname insert
of tmp path.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-11 10:18:43 +01:00
Liam Girdwood 6c96fd34fa rimage: openssl: fix build for openssl 1.1.0
Openssl 1.1.0 is latest stable version with minor API differences.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-05-11 10:11:51 +01:00
Yan Wang 3ad69eb715 FIX: Remove unused variable.
The variable "i" shouldn't be used.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2018-04-24 08:09:52 -07: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 301418d94d rimage: fix formatting and alignment of manifest section printf
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 16:40:31 +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
Liam Girdwood 08f857088c cnl: core: Add support for xcc
xcc has more strict rules than gcc:
- Add missing sections to linker scripts
- Fix compile warnings
- Extend memory enabling timeout to infinite (too small delay for xcc)

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>

# Conflicts:
#	src/platform/apollolake/platform.c
#	src/platform/cannonlake/platform.c
2018-03-30 14:44:17 +01:00
Liam Girdwood f65131645f rimage: manifest: Move text offset into non immutable ROM structure.
text_offset was added to an immutable ROM structure that would break
some tools and cause instability. Fix this by creating a new structure
for rimage manifest data that can be modified without breaking the ROM
ABI.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-19 08:34:52 +00:00