lmdk: How to convert and build loadable modules#488
lmdk: How to convert and build loadable modules#488pjdobrowolski wants to merge 1 commit intothesofproject:masterfrom
Conversation
| @@ -7,10 +7,65 @@ What is LMDK | |||
| ************ | |||
There was a problem hiding this comment.
Please add a little bit of context in the commit message. 'Howto tutorial' is not really adding much value.
There was a problem hiding this comment.
Would be easier if build and deploying step worked in CI. However I added richer description I hope that I would be more helpfull.
3efc120 to
c182528
Compare
c182528 to
f2ac296
Compare
How to tutorial descibing process of building and creating headers pack for needs of lmdk. Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
f2ac296 to
2f6eb05
Compare
plbossart
left a comment
There was a problem hiding this comment.
This is too much of a developer cheat-sheet and not really a documentation. I wasn't able to understand any of the sections.
| How to prepare MODULE to be loadable | ||
| ************************************ | ||
|
|
||
| Loadable modules are using functions provided by native_system_services which are narrowed to only neccesary and safe functions. For example all dynamic allocations are done on strict size local heap_mem |
There was a problem hiding this comment.
what is the definition of 'safe' in this context?
|
|
||
| .. code-block:: c | ||
|
|
||
| DECLARE_LOADABLE_MODULE_API_VERSION(dummy); |
There was a problem hiding this comment.
avoid this term.
mockup or example?
There was a problem hiding this comment.
Stub, placeholder, example
| { | ||
| system_service = *(const struct native_system_agent**)mod_ptr; | ||
|
|
||
| return &up_down_mixer_interface; |
There was a problem hiding this comment.
haha that's interesting, I was told this component is deprecated...
There was a problem hiding this comment.
@plbossart I don't understand, can you elaborate?
| __attribute__((section(".module"))) | ||
| const struct sof_man_module_manifest dummy_module_manifest = { | ||
| .module = { | ||
| .name = "DUMMY", |
|
|
||
| How to build | ||
| ************ | ||
| Designers of lmdk prepared two options of building loadable modules. Using them is depend from needs. |
There was a problem hiding this comment.
consider rewording, this does not read well.
|
|
||
| How to build | ||
| ************ | ||
| Designers of lmdk prepared two options of building loadable modules. Using them is depend from needs. |
There was a problem hiding this comment.
Also explain which one should be use when. You are just listing two solutions without any explanations on pros/cons.
| static struct native_system_service_api* system_service; | ||
| uint32_t heap_mem[2048] __attribute__((section(".heap_mem"))) __attribute__((aligned(4096))); | ||
|
|
||
| Each module also has to declare as a loadable and has prepared manifest which is specific for each. |
| $ python scripts/lmdk/libraries_build.py -l dummy -k "/path/to/signing/key.pem" | ||
|
|
||
| Latest headers pack is being deployed with FW and its versioning is keept in sof\src\include\module\module\api_ver.h . Every change in headers must be marked in that header(todo: automation). | ||
| Creating deployment header pack is done by calling: |
There was a problem hiding this comment.
I don't know what a 'headers pack' means.
lgirdwood
left a comment
There was a problem hiding this comment.
@pjdobrowolski ping, any updates on open from @plbossart ?
How to tutorial how to build modules and create headers pack needed for needs of lmdk. Process is described and based on dummy module already available in the sof project.