-
Notifications
You must be signed in to change notification settings - Fork 73
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
lmdk: How to convert and build loadable modules #488
base: master
Are you sure you want to change the base?
lmdk: How to convert and build loadable modules #488
Conversation
@@ -7,10 +7,65 @@ What is LMDK | |||
************ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
f2ac296
to
2f6eb05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid this term.
mockup or example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stub, placeholder, example
{ | ||
system_service = *(const struct native_system_agent**)mod_ptr; | ||
|
||
return &up_down_mixer_interface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha that's interesting, I was told this component is deprecated...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plbossart I don't understand, can you elaborate?
__attribute__((section(".module"))) | ||
const struct sof_man_module_manifest dummy_module_manifest = { | ||
.module = { | ||
.name = "DUMMY", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example_module or something
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is that manifest?
$ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what a 'headers pack' means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.