-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into performance_data_zephyr_pr
Signed-off-by: Tobiasz Dryjański <31992221+tobonex@users.noreply.github.com>
- Loading branch information
Showing
75 changed files
with
1,665 additions
and
658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
|
||
name: Zephyr LLEXT | ||
|
||
# 'workflow_dispatch' allows running this workflow manually from the | ||
# 'Actions' tab | ||
# yamllint disable-line rule:truthy | ||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [mtl, lnl] | ||
|
||
steps: | ||
- name: git clone sof | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ./workspace/sof | ||
fetch-depth: 0 # fix git describe | ||
filter: 'tree:0' | ||
|
||
- name: west clones | ||
run: pip3 install west && cd workspace/sof/ && west init -l && | ||
west update --narrow --fetch-opt=--depth=5 | ||
|
||
- name: Download docker image && ls /opt/toolchains/ | ||
run: cd workspace && ./sof/zephyr/docker-run.sh ls -l /opt/toolchains/ | ||
|
||
- name: llext build | ||
run: | | ||
cd workspace && ./sof/zephyr/docker-run.sh /bin/sh -c \ | ||
'ln -s /opt/toolchains/zephyr-sdk-* ~/; | ||
west build --board intel_adsp_ace15_mtpm sof/app \ | ||
-- -DEXTRA_CFLAGS=-Werror -DEXTRA_CXXFLAGS=-Werror \ | ||
-DEXTRA_AFLAGS=-Werror \ | ||
-DOVERLAY_CONFIG=overlays/mtl/module_overlay.conf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# Copyright 2023 NXP | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Enable dynamic interrupts | ||
CONFIG_DYNAMIC_INTERRUPTS=y | ||
|
||
CONFIG_ARM64_VA_BITS_40=y | ||
CONFIG_ARM64_PA_BITS_40=y | ||
|
||
CONFIG_DCACHE_LINE_SIZE_DETECT=n | ||
CONFIG_DCACHE_LINE_SIZE=64 | ||
|
||
CONFIG_IMX93_A55=y | ||
CONFIG_TRACE=n | ||
|
||
# DAI-related configurations | ||
CONFIG_SAI_HAS_MCLK_CONFIG_OPTION=y | ||
CONFIG_SAI_IMX93_ERRATA_051421=y | ||
|
||
# DMA-related configurations | ||
CONFIG_DMA=y | ||
CONFIG_DMA_NXP_EDMA_ENABLE_HALFMAJOR_IRQ=y | ||
|
||
# needed because EDMA uses same interrupt for multiple | ||
# channels. | ||
CONFIG_SHARED_INTERRUPTS=y | ||
|
||
CONFIG_ZEPHYR_NATIVE_DRIVERS=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_SAMPLE_SMART_AMP=m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/usr/bin/env python3 | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
# We need to calculate ELF section addresses of an LLEXT module and use them to | ||
# run the linker. We could just use Python to calculate addresses and pass them | ||
# back to cmake to have it call the linker. However, there doesn't seem to be a | ||
# portable way to do that. Therefore we pass the linker path and all the command | ||
# line parameters to this script and call the linker directly. | ||
|
||
import argparse | ||
import subprocess | ||
from elftools.elf.elffile import ELFFile | ||
|
||
args = None | ||
def parse_args(): | ||
global args | ||
|
||
parser = argparse.ArgumentParser(description='Helper utility to run a linker command ' | ||
'with calculated ELF section addresses') | ||
|
||
parser.add_argument('command', type=str, help='Linker command to execute') | ||
parser.add_argument('params', nargs='+', help='Additional linker parameters') | ||
parser.add_argument("-f", "--file", required=True, type=str, | ||
help='Object file name') | ||
parser.add_argument("-t", "--text-addr", required=True, type=str, | ||
help='.text section address') | ||
|
||
args = parser.parse_args() | ||
|
||
def main(): | ||
parse_args() | ||
|
||
elf = ELFFile(open(args.file, 'rb')) | ||
|
||
text_addr = int(args.text_addr, 0) | ||
|
||
text_offset = elf.get_section_by_name('.text').header.sh_offset | ||
rodata_offset = elf.get_section_by_name('.rodata').header.sh_offset | ||
data_offset = elf.get_section_by_name('.data').header.sh_offset | ||
|
||
upper = rodata_offset - text_offset + text_addr + 0xfff | ||
rodata_addr = upper - (upper % 0x1000) | ||
|
||
upper = data_offset - rodata_offset + rodata_addr + 0xf | ||
data_addr = upper - (upper % 0x10) | ||
|
||
command = [args.command, | ||
f'-Wl,-Ttext=0x{text_addr:x}', | ||
f'-Wl,--section-start=.rodata=0x{rodata_addr:x}', | ||
f'-Wl,-Tdata=0x{data_addr:x}'] | ||
command.extend(args.params) | ||
|
||
subprocess.run(command) | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.