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

Transfer rimage git history to subdirectory tools/rimage/ in the sof git repo #8297

Merged
merged 354 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
354 commits
Select commit Hold shift + click to select a range
58acbef
Remove autotools files
dcpleung Mar 25, 2020
a264697
Use CMake to build rimage
dcpleung Mar 25, 2020
e09354a
Update rimage to remove ldc generation ability
dcpleung Apr 5, 2020
ea04cb8
Remove cmake option SOF_SOURCE_DIR
dcpleung Apr 5, 2020
c4701c7
rimage: Align function arguments in rimage.h
ktrzcinx Mar 27, 2020
e433e87
rimage: Remove unused 'image' argument in elf_find_section()
ktrzcinx Mar 27, 2020
6c4c873
Match LICENSE from the main SOF repo
dcpleung Mar 26, 2020
cc5eabb
Fix compiler errors
finikorg Apr 15, 2020
ca65a44
Handle missing .init_array section
finikorg Apr 15, 2020
aecc0b5
CI: Travis: init build test for rimage
xiulipan Apr 17, 2020
f79d8d7
elf: Add function to read section content with allocation
ktrzcinx Mar 27, 2020
f0c6ee0
ext_man: Create extended manifest
ktrzcinx Apr 7, 2020
6b34a04
ext_man: Move data section name to global define
ktrzcinx Apr 22, 2020
0fa22ac
ext_man: elf: Split module and section searching
ktrzcinx Apr 22, 2020
3288674
ext_man: Fix write flow when ext_man should be build
ktrzcinx Apr 22, 2020
76b6301
ext_man: Make extended manifest build optional
ktrzcinx Apr 22, 2020
537255b
ext_man: Remove redundant variable assign
ktrzcinx Apr 24, 2020
ece04f9
manifest: ads: meu: Fill FW version description also when MEU is used
ktrzcinx Apr 30, 2020
932478a
rimage: show LMA and VMA in section view
abonislawski Mar 23, 2020
f23b2c2
rimage: use lma if available
abonislawski Mar 9, 2020
67d09d6
ext_man: Move extended manifest generator out of kernel folder
ktrzcinx May 13, 2020
116e141
headers: Move headers to rimage namespace
ktrzcinx May 13, 2020
9f3f2d7
headers: Use full path to header
ktrzcinx May 13, 2020
4348e2a
cmake: use CMAKE_BUILD_TYPE and default to Debug
marc-hb Jun 16, 2020
2156dcb
rimage.c: add assert(image.adsp->write_firmware[_meu])
marc-hb Jun 16, 2020
7317f2a
manifest: set feature mask to 0xffff
jajanusz Jul 14, 2020
29ed0da
toml: Add TOML parsing library as git submodule
ktrzcinx Sep 4, 2020
210009c
adsp: Refactor machine searching
ktrzcinx Sep 7, 2020
f654d53
manifest: Export man_write_fw_vX_Y() to global context
ktrzcinx Sep 9, 2020
de1b0f7
config: Add configuration file parsing interface
ktrzcinx Sep 7, 2020
a94e12d
toml: Add platform configuration files
ktrzcinx Sep 16, 2020
2965908
manifest: Remove -m option
ktrzcinx Sep 16, 2020
dab9730
toml: Add version information in verbose mode
ktrzcinx Sep 17, 2020
3169dbd
toml: Add adsp_file_ext attributes parsing
ktrzcinx Sep 17, 2020
d3ead75
toml: manifest: Clear manifest allocated on heap before use
ktrzcinx Sep 17, 2020
e9759df
toml: Fix adsp v1.5 parsing
ktrzcinx Sep 17, 2020
6dcf1b6
toml: Use only standard error codes
ktrzcinx Sep 22, 2020
3b2398a
travis: Add more warnings to make command
ktrzcinx Sep 22, 2020
f4e0178
travis: Treat warnings as errors
ktrzcinx Sep 22, 2020
82d4767
Stop silently discarding -l option
marc-hb Sep 19, 2020
91bd4fe
rimage.c: print an error instead of crashing when zero ELF argument
marc-hb Sep 23, 2020
75f9695
elf.c: check ELF32-LE magic number instead of crashing
marc-hb Sep 23, 2020
e67d68e
adsp_config.c: actually check error when parsing "version" array elem…
marc-hb Sep 23, 2020
e29baaa
travis: Use $(...) instead `...` in bash scripts
ktrzcinx Sep 23, 2020
fccf521
travis: Scan patch codestyle
ktrzcinx Sep 22, 2020
7322c02
manifest.c: assert buffer overflow in man_copy_sram()
marc-hb Oct 15, 2020
37323fa
Merge pull request #28 from marc-hb/copy-sram-overflow
marc-hb Oct 15, 2020
86754c1
hash: Assert memory overflow during hash calculation
ktrzcinx Oct 15, 2020
e87db0f
pkcs1_5.c: intermediate named constants in ri_manifest_sign_v1_x()
marc-hb Oct 15, 2020
b9cf1ae
pkcs1_5.c: don't pretend everything is fine when failing to sign
marc-hb Oct 15, 2020
c98a29d
toml: Extract version parsing to separate function
ktrzcinx Oct 15, 2020
8249abf
toml: Keep available manifest parsers in list
ktrzcinx Oct 15, 2020
0d2af68
gitignore: Add checkpatch temporary file to gitignore
ktrzcinx Oct 22, 2020
f0fa661
README: install is optional and missed "sudo". CMake 3.13 -B option.
marc-hb Nov 13, 2020
d6cf696
config: tgl: fix CSE offsets for TGL
lrgirdwo Oct 26, 2020
48ba01e
css: add css header for cavs v2.5
lrgirdwo Oct 26, 2020
8478c03
cse: add simple crc32 function to calculate the v2.5 header checksum
Oct 26, 2020
7e9952f
manifest: Add cavs2.5 structures and offsets
lrgirdwo Oct 26, 2020
0c3f8e2
user: manifest: add macros for SHA385 modulus length
lrgirdwo Oct 26, 2020
df20485
pkcs: Add PSS signing mechanism for CAVS2.5
lrgirdwo Oct 26, 2020
f84676f
hash: make module_sha384_create non static.
lrgirdwo Oct 26, 2020
68b3693
plat_auth: use cavs 2.5 plat auth offsets
lrgirdwo Oct 26, 2020
db40934
cavs: add support for cavs2.5 code signing
lrgirdwo Oct 26, 2020
1c1c09c
manifest: cavs25: Add support for ext data type 0x16
lrgirdwo Nov 12, 2020
7b7c192
verify: add signature verification support
lrgirdwo Nov 12, 2020
2e29db4
config: merge icl and jsl toml file
xiulipan Dec 4, 2020
d1f91ef
config: add tgl-h toml file to support tglh build
xiulipan Dec 4, 2020
0dba230
pkcs_v1_5_sign_man_v2_5(): add "salt length" comment
marc-hb Dec 17, 2020
0d641a7
minor -h fix: -s meu_offset disables rimage signing
marc-hb Mar 9, 2021
dbb49e0
rimage: add cavs fw layout support
RanderWang Apr 12, 2021
6c44aef
ext_man: Fix memory leak after manifest build
ktrzcinx Apr 26, 2021
994ee24
ext_man: Fix code formating
ktrzcinx Apr 26, 2021
0297c67
config: Fix 'module' parsing error messages
ktrzcinx May 5, 2021
8f42ee8
adsp_config: fix out of bounds error
cujomalainey May 3, 2021
1cca9bf
ext_manifest: cppcheck: refactor to silence false positive
cujomalainey May 3, 2021
7764a8b
manifest: close file on error
cujomalainey May 3, 2021
6f45b61
actions: add cppcheck and yamllint
cujomalainey May 4, 2021
5aeb95b
sanity check allocated memory
slawblauciak May 25, 2021
9e50a02
config: tgl: change image_size to the real SRAM size
keyonjie Jul 2, 2021
8073ea3
config: tgl-h: change image_size to the real SRAM size
keyonjie Jul 2, 2021
f52a078
config: icl: change image_size to the real SRAM size
keyonjie Jul 2, 2021
1de9ccc
config: jsl: change image_size to the real SRAM size
keyonjie Jul 2, 2021
8a2ea00
config: cnl: change image_size to the real SRAM size
keyonjie Jul 2, 2021
9a26e45
config: apl: change image_size to the real SRAM size
keyonjie Jul 2, 2021
580e4d6
config: tgl-cavs: change image_size to the real SRAM size
RanderWang Jul 20, 2021
44b37d1
config: sue: change image_size to the real SRAM size
keyonjie Jul 21, 2021
9c9e07c
config: kbl: change image_size to the real SRAM size
keyonjie Jul 23, 2021
246ea64
config: skl: change image_size to the real SRAM size
keyonjie Jul 23, 2021
d1553e9
config: add rn toml file to support renoir build
balakishorepati Jul 26, 2021
b28b993
fixing incorrect data offset in ri_manifest_sign_v1_5
sunilkumardommati Jul 26, 2021
9716e10
config: Add imx8ulp.toml
Apr 12, 2021
aea1969
adsp_config: fix potential overflow in strtol()
mrajwa Aug 25, 2021
9bf46d3
rimage: Add support for mt8195
Aug 26, 2021
916fc2c
config: Remove unused adsp structs
ktrzcinx Aug 31, 2021
c4a7456
config: Remove machine_id field
ktrzcinx Aug 31, 2021
de9177b
config: Adjust return type with function name
ktrzcinx Aug 31, 2021
ada30c1
config: Explicit state return value for error cases in parse_uint32_*…
ktrzcinx Aug 31, 2021
3e20076
config: Return error value in parse_uint32_* functions when key is no…
ktrzcinx Aug 31, 2021
fc4d7b8
rimage: Fix error message content after adsp malloc fail
ktrzcinx Sep 1, 2021
dcfcef8
config: Remove unused, platform specific, memory region definitions
ktrzcinx Sep 1, 2021
4823e87
pkcs: quote the name of key file when logging it
marc-hb Sep 2, 2021
241af31
ext_manifest: Fix incorrect signature
mrajwa Sep 11, 2021
a9faf85
remove '-x' option
mrajwa Sep 14, 2021
6e22944
README.md: explain how to run SOF tests on new rimage code
marc-hb Sep 16, 2021
0d7f2d4
Do not exit(0) on invalid options or parameters
marc-hb Sep 16, 2021
8960097
Revert "ext_manifest: Fix incorrect signature"
marc-hb Sep 17, 2021
c038d62
README.md: add warning that forks must be created using Github
marc-hb Sep 21, 2021
0c66aa9
css.c: add __func__ to "completing manifest" log
marc-hb Oct 4, 2021
ecb9212
cmake: drop '3' from -Wimplicit-fallthrough=3, it's the default value
marc-hb Oct 24, 2021
bcbcec7
cmake: drop binutils-specific '-Wl,-EL' option
marc-hb Oct 24, 2021
bd51ec1
rimage: add functionality to resign fw image
Nov 16, 2021
3c23242
rimage: refactor and add openssl 3.0 support
Nov 24, 2021
0f64a20
manifest: fix buffer init in resign
Dec 1, 2021
32052ad
remove x from getopt
cujomalainey Dec 8, 2021
23a53ac
cse: fix signed integer overflow
cujomalainey Jan 12, 2022
3b4b142
rimage: fix openssl 1.0 support
Jan 12, 2022
8753a9e
Remove unused declaration of global platform specific manifests
ktrzcinx Jan 13, 2022
ce69d7b
adsp_config: fix invalid format specifier
Jan 17, 2022
ecb6a66
Update to C99 standard to match SOF. Silenced warning generated by ne…
Jan 20, 2022
d855fbf
Remove unconditional "(1 || verbose)" debug hack in cavs25
marc-hb Jan 26, 2022
d006212
Fix confusion in headers between uint8_t arrays and strings
marc-hb Jan 26, 2022
1589641
Fixed warning of wrong variable type in fprintf
Jan 26, 2022
ee5c3e1
Added handling of OpenSSL on Windows with MSYS2
Jan 26, 2022
05be213
config: Add mt8186.toml
tinghan-shen Nov 30, 2021
9d45332
Write firmware file micro version to manifest for cAVS platforms
mengdonglin May 4, 2022
1b233f6
config: add rmb toml file to support rembrandt build
balakishorepati May 9, 2022
c484d99
rimage: add ACE V1.5 handling
bkolodzi Jan 20, 2022
af947cb
config: Add toml config for mtl
marcinszkudlinski Dec 6, 2021
fe4dcaa
mtl: Add ASRC module to the manifest
Feb 11, 2022
8ba3d17
adsp_config: fix name parsing error in parse_signed_pkg_ace_v1_5
kfrydryx Mar 11, 2022
73a9d7c
rimage: fix openssl 3.0 support in ver25 signing
Jun 16, 2022
02abc5d
rimage: ace signing functions need openssl 3.0 guards
Jun 16, 2022
452847d
mtl: Add SRC module to the manifest
kfrydryx Jun 7, 2022
12bb327
toml: add tgl-h config file for IPC4
Jun 22, 2022
5504179
Add lib_code module type.
jxstelter Jun 24, 2022
d94cfc9
mtl: add MicSel support
RanderWang Jun 27, 2022
d50aefc
manifest max size for loadable modules
pjdobrowolski Jul 20, 2022
6b4848e
mtl: Add UPDWMIX module to the manifest
Aug 11, 2022
5b076f1
config: tgl-cavs: add probe module
abonislawski Aug 30, 2022
542924d
config: tgl-h-cavs: add probe module
abonislawski Aug 30, 2022
fb28357
config: mtl: add probe module
abonislawski Aug 30, 2022
a1b6e6d
manifest: add fw_ver_micro to manifest
dnikodem Sep 8, 2022
d957e03
rimage: make ace15 signing to support openssl3
Sep 27, 2022
dcfd11b
mux: add mux cfg to list of modules
fkwasowi Oct 10, 2022
1f4a36e
mux: fix module type
fkwasowi Oct 13, 2022
3ee717e
probe: mtl.toml invaliv probe type
fkwasowi Oct 13, 2022
85a2d1e
config: mtl: add kd module
iganakov Nov 8, 2022
6623073
config: mtl: add kpb module
iganakov Nov 8, 2022
f51ff46
rimage: remove incorrect module order check
RanderWang Nov 21, 2022
fe5b959
rimage: correct module type
RanderWang Nov 22, 2022
65f345a
rimage: add src support
gongjun-song Oct 17, 2022
082b626
config: Add mt8188.toml
tinghan-shen Jun 28, 2022
1c48208
config: tgl-cavs: add smart amp test module config
Dec 8, 2022
bdba825
Add a command line option to set an Intel-specific PV bit
lyakh Dec 23, 2022
f3eef3c
Fix IMR type parsing
lyakh Jan 3, 2023
ba8534b
Fix bitmap according to the IMR type
lyakh Dec 23, 2022
bdf48ee
config: tgl-cavs: add fir and iir eq module config
Jan 4, 2023
bc7d49d
config: align module_type with mtl for tgl and tgl-h
Feb 1, 2023
3da7739
config: correct module config load_type
Feb 1, 2023
7bc3cfc
config: mtl: add smart amp test module config
Jan 31, 2023
ec649f3
Convert all ELF addresses to cached for calculations
lyakh Jan 27, 2023
15ea481
src: adsp_config: Use reserved bits for module init config
ranj063 Feb 8, 2023
b5d7622
config: tgl-cavs: set init_config for smart test
ranj063 Feb 8, 2023
d48ae7a
config: mtl: Set init_config for smart amp
ranj063 Feb 8, 2023
def9d51
Fix regression - make default return code an error
lyakh Feb 9, 2023
9b507ec
config: set cached and uncached aliases for affected platforms
lyakh Feb 9, 2023
1e0a85b
config:tgl/tglh: Do not set cached/uncached address aliases
ranj063 Feb 10, 2023
3863e94
Don't convert ROM addresses to cached aliases
lyakh Feb 13, 2023
bf23b5e
config: mtl: set KDTEST module_type to 8
libinyang Feb 2, 2023
cb9c880
config: tgl-cavs: add kpb, selector and kd support
libinyang Jan 29, 2023
ffd0542
adsp_config: make the default value zero for init_config
Feb 14, 2023
d48ad6b
adsp_config: add dump for init_config
Feb 14, 2023
3aa199f
config: mtl: set init_config for micsel
Feb 16, 2023
0931d9c
main: heap_adsp release fix
softwarecki Feb 16, 2023
fed69d4
toml_utils: adsp_config: Moved generic parser functions to toml_utils
softwarecki Feb 23, 2023
055ea7e
file_utils: manifest: ext_manifest: Add new create_file_name function
softwarecki Feb 22, 2023
6a64cb9
file_utils: Add a new get_file_size function
softwarecki Feb 22, 2023
98c7f7b
manifest: Use the get_file_size function
softwarecki Feb 20, 2023
36c0c90
elf: Use the get_file_size function
softwarecki Feb 22, 2023
5ebbd65
rimage: use hex number
RanderWang Feb 24, 2023
a4ca53c
toml_utils: Adding support for decimal numbers in hex parser
softwarecki Feb 27, 2023
9ce1cc8
ext_manifest: Fix fw_ext_man_cavs_header version
softwarecki Mar 1, 2023
93c5e8b
misc_utils: Move byte_swap function to new misc_utils.c file
softwarecki Feb 27, 2023
2bd8be3
hash: New hash functions
softwarecki Feb 27, 2023
d258ea2
manifest: pkcs1_5: Use new hash functions
softwarecki Feb 27, 2023
6c7a151
hash: Remove old hash functions
softwarecki Feb 27, 2023
6fad356
rimage: Removed hash context from image structure
softwarecki Feb 27, 2023
35bc644
mtl: add eq-iir and fir support
RanderWang Mar 6, 2023
5bc2010
rimage: fix build error
Mar 6, 2023
d32db50
mtl: add Aria module to extended manifest
pblaszko Mar 6, 2023
dd15443
file_utils: Removed duplicated function descriptions
softwarecki Mar 7, 2023
32a5388
file_utils: Add file_error function
softwarecki Mar 7, 2023
4aacac3
Use file_error function to print file related errors
softwarecki Mar 7, 2023
125745b
file_utils: Fix error detection in get_file_size function
softwarecki Mar 7, 2023
343b6d8
Revert "config:tgl/tglh: Do not set cached/uncached address aliases"
lyakh Mar 10, 2023
63eb6ff
cAVS: add alias definitions to cAVS 1.5-2.0
lyakh Mar 21, 2023
1bf447c
config: tgl-h-cavs: align modules to tgl-cavs config
kv2019i Mar 30, 2023
01fd742
lnl: Add LNL configuration file
jxstelter Sep 23, 2022
9643a98
kpb: update UUID
fkwasowi Apr 3, 2023
b2177e5
elf: Add header guard to elf.h
softwarecki Mar 7, 2023
9633c3b
manifest: Check return value of man_create_modules
softwarecki Mar 10, 2023
c210183
Remove unused dram_offset field / config option
softwarecki Mar 21, 2023
d209160
misc_utils: Added functions to print enum and flags value
softwarecki Mar 7, 2023
b9ecb00
rimage: adsp_config: Create new memory_config structure.
softwarecki Mar 29, 2023
9ecae53
rimage: Moved memory alias configuration to a new struct
softwarecki Mar 29, 2023
99195d2
rimage: manifest: Rename struct module to manifest_module
softwarecki Mar 29, 2023
7367fdf
manifest_module: rename fw_size to output_size
softwarecki Mar 29, 2023
1bda0c5
manifest_module: Add is_bootloader field
softwarecki Mar 29, 2023
6e3abe6
rimage: Add suport for loadable modules
softwarecki Mar 10, 2023
debf4cf
manifest: Move MAN_MAX_SIZE_V1_8 define to the public manifest header
softwarecki Mar 31, 2023
25804e7
manifest: Use module manifest from toml as a template for elf modules
softwarecki Mar 31, 2023
ab0429f
Fix: Use module manifest from toml as a template for elf modules
softwarecki Apr 6, 2023
77d4a2a
cmake: remove "install" target
marc-hb Apr 18, 2023
acd8a2b
Config: Change SRCINTC for tgl-cavs.toml and tgl-h-cavs.toml to LL
singalsu Apr 18, 2023
8f250a9
Config: Change indent for SRCINTC
singalsu Apr 18, 2023
1ea1327
README.md: remove "install" target
marc-hb May 24, 2023
649b0a6
file_simple: Allocate correct buffer size for writing sections out
May 30, 2023
4ce79b1
kpb: update kpb uuid for lnl
jxstelter May 19, 2023
089157d
Config: Add Aria module to tgl-cavs.toml and tgl-h-cavs.toml
singalsu Jun 15, 2023
4877720
config: add vangogh toml file to support vangogh build
saisurya-ch Jun 6, 2023
aa0ac9e
rimage.c: fix bug where -p requires a new and ignored parameter
marc-hb Jul 11, 2023
b8ee1aa
Config: Add DRC component to TGL, TGL-H, MTL, LNL
singalsu May 16, 2023
af9a2fe
Config: Fix comment typo for EQ FIR module
singalsu May 16, 2023
d20f1d8
actions: remove travis
cujomalainey May 4, 2021
8c84400
style: trailing whitespace is the root of all evil
cujomalainey Jul 27, 2023
c809af8
Config: Add crossover component for TGL and TGL-H cAVS platforms
singalsu Jun 29, 2023
4fb9fe0
config: lnl+mtl: fix length of ADSP.man CSE manifest
kv2019i Aug 24, 2023
43eb2a4
Config: Add crossover component for MTL and LNL platforms
singalsu Aug 21, 2023
c183ce2
mtl: add measured cps and cpc values
kfrydryx Feb 24, 2023
352f01f
mtl: fill in subsequent measured cps and mcps data
kfrydryx Feb 27, 2023
476d636
mtl: fill in cps and cpc data for ASRC module
kfrydryx Feb 28, 2023
fea2a30
mtl: fill in cps and cpc data for smart_amp_test module
abonislawski Mar 10, 2023
4a36634
mtl: fill in cps and cpc data for EQIIR module
abonislawski May 18, 2023
8bcf1fc
mtl: fill in cps and cpc data for COPIER & GAIN modules
abonislawski Jul 19, 2023
e8b380d
Config: Add Multiband-DRC component to TGL, TGL-H, MTL, LNL
singalsu Jun 13, 2023
7bc2958
Config: Add DCblock to TGL, TGL-H, MTL, and LNL
singalsu Sep 1, 2023
5f47509
elf_file: Set of new functions for reading elf files
softwarecki Mar 31, 2023
539c2b3
module: Set of a new functions to parse modules
softwarecki Mar 31, 2023
7155327
Switch to new elf reader and module parse functions.
softwarecki Mar 31, 2023
4fc431b
elf: Remove unused elf.c
softwarecki Mar 30, 2023
d89b7d2
ipc4: add google rtc AEC support for mtl
RanderWang Jan 11, 2023
ac487e0
Congfig: Add TDFB to TGL, TGL-H, MTL, and LNL
singalsu Oct 2, 2023
b5f3ed9
rimage: move everything down to subdir tools/rimage/, prepare move to…
marc-hb Oct 5, 2023
4fe87be
Merge full rimage.git history back into tools/rimage/ subdir of sof.git
marc-hb Oct 9, 2023
99206de
Clean just inherited tools/rimage/.gitmodules file (for tomlc99)
marc-hb Oct 5, 2023
9b31875
Add new sof/tools/rimage/tomlc99 submodule to west.yml too
marc-hb Oct 5, 2023
f55338a
Switch Zephyr build to new sof/tools/rimage location
marc-hb Oct 3, 2023
157457c
Switch smex and sof-logger to new sof/tools/rimage location
marc-hb Oct 4, 2023
98ee39f
cmake: switch XTOS build to sof/tools/rimage
marc-hb Oct 3, 2023
e330fb4
Delete old rimage submodule and old rimage west module
marc-hb Oct 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
[submodule "rimage"]
path = rimage
# This is a _relative_ submodule URL. In some use cases it's better than
# an _absolute_ submodule URL, in other cases it's not. One size does
# unfortunately not fit all.
#
# Among other pages, http://blog.tremily.us/posts/Relative_submodules/
# has a good comparison
#
# If you use Zephyr you must also look at the comments in sof/west.yml.
#
# If you want to fork or mirror sof.git _without_ doing the same for
# rimage.git then your automation may want you to change and git commit
# an absolute URL in your branch. No need to git commit for interactive
# use; a local and temporary edit of this file is enough for interactive
# use because .gitmodules is used only once to --init[ialize]
# .git/config the first time. Then .gitmodules is never used again after
# cloning.
url = ../rimage
# This is required for non-Zephyr ("XTOS") configurations. Zephyr
# configs also get it from sof/west.yml which adds the burden of keeping
# both tomlc99 SHA1s synchronized but in practice this barely ever moves.
[submodule "tomlc99"]
path = tools/rimage/tomlc99
# This is a _absolute_ submodule URL. In some use cases it's
# better than an _relative_ submodule URL, in other cases it's
# not. One size does unfortunately not fit all. Among other
# pages, http://blog.tremily.us/posts/Relative_submodules/ has a
# good comparison.
#
# A local and temporary edit of this url can be enough because
# .gitmodules is used _only once_ to submodule --init[ialize]
# .git/config the first time. Then .gitmodules is never used
# again after cloning tomlc99 the first time.
url = https://github.com/thesofproject/tomlc99.git
branch = master
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ project(SOF C ASM)
set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}")
set(SOF_ROOT_BINARY_DIRECTORY "${PROJECT_BINARY_DIR}")

set(RIMAGE_TOP "${PROJECT_SOURCE_DIR}/rimage")
set(RIMAGE_TOP "${PROJECT_SOURCE_DIR}/tools/rimage")

# check git hooks
include(scripts/cmake/git-hooks.cmake)
Expand Down
1 change: 0 additions & 1 deletion rimage
Submodule rimage deleted from ac487e
18 changes: 12 additions & 6 deletions scripts/cmake/git-submodules.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# SPDX-License-Identifier: BSD-3-Clause

find_package(Git)
set(RIMAGE_CMAKE "${SOF_ROOT_SOURCE_DIRECTORY}/rimage/CMakeLists.txt")
set(RIMAGE_SUBMODULE "${SOF_ROOT_SOURCE_DIRECTORY}/rimage")
if(EXISTS "${RIMAGE_SUBMODULE}/CMakeLists.txt")
message(WARNING
"${RIMAGE_SUBMODULE} is deprecated and ignored"
)
endif()

find_package(Git)
set(TOMLC99_MAKE "${SOF_ROOT_SOURCE_DIRECTORY}/tools/rimage/tomlc99/Makefile")
if(GIT_FOUND AND EXISTS "${SOF_ROOT_SOURCE_DIRECTORY}/.git")

if(EXISTS "${RIMAGE_CMAKE}")
if(EXISTS "${TOMLC99_MAKE}")

# As incredible as it sounds, some people run neither
# "git status" nor "git diff" every few minutes and not
Expand Down Expand Up @@ -36,10 +42,10 @@ if(GIT_FOUND AND EXISTS "${SOF_ROOT_SOURCE_DIRECTORY}/.git")
NOT CONFIG_LIBRARY)

message(FATAL_ERROR
"${RIMAGE_CMAKE} not found. You should have used 'git clone --recursive'. \
"${TOMLC99_MAKE} not found. You should have used 'git clone --recursive'. \
To fix this existing git clone run:
git submodule update --init --merge --recursive
git submodule update --init --merge tools/rimage/tomlc99
")
endif() # rimage/CMakeLists.txt
endif() # tomlc99/Makefile

endif() # .git/
15 changes: 6 additions & 9 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def clean_staging(platform):
# for now we must stick to `sof/rimage/[tomlc99]` for
# backwards-compatibility with XTOS platforms and git submodules, see more
# detailed comments in west.yml
RIMAGE_SOURCE_DIR = west_top / "sof" / "rimage"
RIMAGE_SOURCE_DIR = west_top / "sof" / "tools" / "rimage"


def rimage_west_configuration(platform_dict, dest_dir):
Expand Down Expand Up @@ -563,14 +563,11 @@ def rimage_west_configuration(platform_dict, dest_dir):

def build_rimage():

# Detect non-west rimage duplicates, example: git submdule
# SOF_TOP/rimage = sof2/rimage
nested_rimage = pathlib.Path(SOF_TOP, "rimage")
if nested_rimage.is_dir() and not nested_rimage.samefile(RIMAGE_SOURCE_DIR):
raise RuntimeError(
f"""Two rimage source directories found.
Move non-west {nested_rimage} out of west workspace {west_top}.
See output of 'west list'."""
old_rimage_loc = SOF_TOP / "rimage"
# Don't warn on empty directories
if ( old_rimage_loc / "CMakeLists.txt" ).exists():
warnings.warn(f"""{old_rimage_loc} is now ignored,
new location is {RIMAGE_SOURCE_DIR}"""
)
rimage_dir_name = RIMAGE_BUILD_DIR.name
# CMake build rimage module
Expand Down
2 changes: 1 addition & 1 deletion smex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ target_link_options(smex PRIVATE

target_include_directories(smex PRIVATE
"${SOF_ROOT_SOURCE_DIRECTORY}/src/include"
"${SOF_ROOT_SOURCE_DIRECTORY}/rimage/src/include"
"${SOF_ROOT_SOURCE_DIRECTORY}/tools/rimage/src/include"
)

# TODO: smex should not need RTOS headers: FIX.
Expand Down
2 changes: 1 addition & 1 deletion tools/logger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ target_compile_options(sof-logger PRIVATE

target_include_directories(sof-logger PRIVATE
"${SOF_ROOT_SOURCE_DIRECTORY}/src/include"
"${SOF_ROOT_SOURCE_DIRECTORY}/rimage/src/include"
"${SOF_ROOT_SOURCE_DIRECTORY}/tools/rimage/src/include"
"${SOF_ROOT_SOURCE_DIRECTORY}"
)

Expand Down
6 changes: 6 additions & 0 deletions tools/rimage/.checkpatch.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--codespell
--codespellfile scripts/spelling.txt
--ignore C99_COMMENT_TOLERANCE
--no-tree
--strict
-g
25 changes: 25 additions & 0 deletions tools/rimage/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# Basic build test

name: build

# yamllint disable-line rule:truthy
on: [pull_request, push, workflow_dispatch]

env:
CMAKE_C_FLAGS: "-Werror -Wall -Wmissing-prototypes\
-Wimplicit-fallthrough=3 -Wpointer-arith"

jobs:
build-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with: {fetch-depth: 50, submodules: recursive}

- name: install tools
run: sudo apt update && sudo apt install -y ninja-build

- name: build
run: cmake -B build/ -G Ninja
- run: cmake --build build/
30 changes: 30 additions & 0 deletions tools/rimage/.github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# SPDX-License-Identifier: BSD-3-Clause
# Tools that can save round-trips to github and a lot of time:
#
# yamllint -f parsable this.yml
# pip3 install ruamel.yaml.cmd
# yaml merge-expand this.yml exp.yml && diff -w -u this.yml exp.yml
#
# github.com also has a powerful web editor that can be used without
# committing.

name: cppcheck

# yamllint disable-line rule:truthy
on: [pull_request, push]

jobs:
cppcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with: {fetch-depth: 50, submodules: recursive}

- name: apt install cppcheck
run: sudo apt update && sudo apt-get -y install cppcheck

# TODO enable more types of checks as they are fixed
- name: run cppcheck
run: cppcheck --platform=unix32 --force --max-configs=1024
--inconclusive --quiet --inline-suppr .
42 changes: 42 additions & 0 deletions tools/rimage/.github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# SPDX-License-Identifier: BSD-3-Clause
# Tools that can save round-trips to github and a lot of time:
#
# yamllint -f parsable this.yml
# pip3 install ruamel.yaml.cmd
# yaml merge-expand this.yml exp.yml && diff -w -u this.yml exp.yml
#
# github.com also has a powerful web editor that can be used without
# committing.

name: codestyle

# yamllint disable-line rule:truthy
on: [pull_request]

jobs:
yamllint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
submodules: recursive

- name: run yamllint
run: yamllint .github/workflows/*.yml
checkpatch:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}

- name: install codespell
run: sudo apt update && sudo apt install -y codespell

- name: checkpatch.pl PR review
uses: webispy/checkpatch-action@v9
env:
CHECKPATCH_COMMAND: ./scripts/checkpatch.pl
2 changes: 2 additions & 0 deletions tools/rimage/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
.checkpatch-camelcase.git.*
67 changes: 67 additions & 0 deletions tools/rimage/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required(VERSION 3.10)

project(SOF_RIMAGE C)

if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No CMAKE_BUILD_TYPE, defaulting to Debug")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
endif()

add_executable(rimage
src/file_simple.c
src/cse.c
src/css.c
src/plat_auth.c
src/hash.c
src/pkcs1_5.c
src/manifest.c
src/ext_manifest.c
src/rimage.c
src/toml_utils.c
src/adsp_config.c
src/misc_utils.c
src/file_utils.c
src/elf_file.c
src/module.c
tomlc99/toml.c
)

set_property(TARGET rimage PROPERTY C_STANDARD 99)

target_compile_options(rimage PRIVATE
-Wall -Werror -Wmissing-prototypes -Wimplicit-fallthrough
)

if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 9.1)
target_compile_options(rimage PRIVATE -Wno-char-subscripts)
endif()

# Windows builds use MSYS2 https://www.msys2.org/ to get linux tools and headers.
# MSYS_INSTALL_DIR variable points to MSYS2 installation directory.
# You may pass it as environmental or cmake configure variable.
if(${CMAKE_HOST_WIN32})
cmake_minimum_required(VERSION 3.20)
if(DEFINED ENV{MSYS_INSTALL_DIR} AND NOT MSYS_INSTALL_DIR)
set(MSYS_INSTALL_DIR $ENV{MSYS_INSTALL_DIR})
endif()

if(MSYS_INSTALL_DIR)
cmake_path(IS_ABSOLUTE MSYS_INSTALL_DIR IS_MSYS_INSTALL_DIR_ABSOLUTE)
if(NOT IS_MSYS_INSTALL_DIR_ABSOLUTE)
message(FATAL_ERROR "Please provide absolute path to MSYS2 installation
setting MSYS_INSTALL_DIR env variable")
endif()
# Include standard posix headers. Requires pacman openssl-devel package.
cmake_path(APPEND MSYS_INSTALL_DIR "usr" "include" OUTPUT_VARIABLE MSYS_SYSTEM_INCLUDE_PATH)
target_include_directories(rimage PRIVATE "${MSYS_SYSTEM_INCLUDE_PATH}")
endif()
endif()

target_link_libraries(rimage PRIVATE crypto)

target_include_directories(rimage PRIVATE
src/include/
tomlc99/
)
Loading
Loading