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

Update build system for native loadable modules #8399

Merged
merged 8 commits into from
Nov 9, 2023

Commits on Oct 26, 2023

  1. lmdk: Switch to a clang compiler

    Changed the compiler used to build loadable modules to clang. It has been
    used for a long time to build sof. The latest xtensa toolchain no longer
    has xcc compiler.
    
    Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
    softwarecki committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    dc1bc00 View commit details
    Browse the repository at this point in the history
  2. lmdk: Update rimage include path

    As rimage was moved to sof repository it is necessary to update path to
    rimage include directory in lmdk build system.
    
    Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
    softwarecki committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    1293e26 View commit details
    Browse the repository at this point in the history
  3. lmdk: Add support for dynamic memory allocation by a loadable modules

    This commit adds a necessary symbols in the linker script which allows use
    a memory allocation functions from libc (malloc, calloc, etc.) in loadable
    modules.
    
    Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
    softwarecki committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    439d3aa View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2023

  1. lmdk: Enable linking with standard libraries

    Changed linker options to enable linking with libgcc and libc. This change
    is required to allow use compiler builtins functions (like __divdi3) and
    dynamic memory allocation functions.
    
    Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
    softwarecki committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    454e982 View commit details
    Browse the repository at this point in the history
  2. rimage: manifest: Ignore lack of .bss section for a loadable modules

    Loadable libraries do not need to have a .bss section. After this change,
    its absence will be ignored when generating a image of the loadable module.
    
    Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
    softwarecki committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    c667977 View commit details
    Browse the repository at this point in the history
  3. lmdk: Remove align of .rodata section

    The .data and .rodata sections are placed by rimage into one segment of
    a resulting firmware image. So aligning the .rodata section to the page
    boundary is just a waste of memory.
    
    Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
    softwarecki committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    53c092d View commit details
    Browse the repository at this point in the history
  4. lmdk: Remove content of the .module section from final module image

    The .module section contains the module manifest read by rimage. It should
    not be included in the final loadable module image. Flags of this section
    are now modified using objcopy to ignore it by rimage.
    
    Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
    softwarecki committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    2943138 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2023

  1. lmdk: Instruct linker to keep .buildinfo section

    At the beginning of the .text section there must be a structure containing
    information about the version of the api used by the library. It's absence
    will cause sof to interpret a random literal as a version and incorrectly
    load a library.
    
    Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
    softwarecki committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    d817f97 View commit details
    Browse the repository at this point in the history