-
Notifications
You must be signed in to change notification settings - Fork 349
xtensa-build-zephyr: add imx #4525
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,8 +7,8 @@ set -e | |
|
|
||
| SOF_TOP=$(cd "$(dirname "$0")" && cd .. && pwd) | ||
|
|
||
| SUPPORTED_PLATFORMS=(apl cnl icl tgl-h) | ||
| # Default value, can be overridden on the command line | ||
| SUPPORTED_PLATFORMS=(apl cnl icl tgl-h imx) | ||
| # Default value, can (and sometimes must) be overridden with -p | ||
| WEST_TOP="${SOF_TOP}"/zephyrproject | ||
| BUILD_JOBS=$(nproc --all) | ||
| RIMAGE_KEY=modules/audio/sof/keys/otc_private_key.pem | ||
|
|
@@ -38,9 +38,13 @@ usage: $0 [options] platform(s) | |
| -k Path to a non-default rimage signing key. | ||
| -c recursively clones Zephyr inside sof before building. | ||
| Incompatible with -p. | ||
| -p Existing Zephyr project directory. Incompatible with -c. | ||
| If modules/audio/sof is missing there then a symbolic | ||
| link pointing to ${SOF_TOP} will be added. | ||
| -p Existing Zephyr project directory. Incompatible with -c. If | ||
| zephyr-project/modules/audio/sof is missing then a | ||
| symbolic link pointing to ${SOF_TOP} will automatically be | ||
| created and west will recognize it as a new sof module. | ||
| This -p option is always _required_ if the real (not symbolic) | ||
| sof/ and zephyr-project/ directories are not nested in one | ||
| another. | ||
|
|
||
| Supported platforms ${SUPPORTED_PLATFORMS[*]} | ||
|
|
||
|
|
@@ -77,6 +81,12 @@ install_opts() | |
| build() | ||
| { | ||
| cd "$WEST_TOP" | ||
| west topdir || { | ||
| printf 'SOF_TOP=%s\nWEST_TOP=%s\n' "$SOF_TOP" "$WEST_TOP" | ||
| die 'try the -p option?' | ||
| # Also note west can get confused by symbolic links, see | ||
| # https://github.com/zephyrproject-rtos/west/issues/419 | ||
| } | ||
|
|
||
| # Build rimage | ||
| RIMAGE_DIR=build-rimage | ||
|
|
@@ -89,11 +99,16 @@ build() | |
| local STAGING=build-sof-staging | ||
| mkdir -p ${STAGING}/sof/ # smex does not use 'install -D' | ||
|
|
||
| # Default RIMAGE_KEY defined at the top of this file | ||
| for platform in "${PLATFORMS[@]}"; do | ||
| case "$platform" in | ||
| apl) | ||
| PLAT_CONFIG='intel_adsp_cavs15' | ||
| ;; | ||
| imx) | ||
| PLAT_CONFIG='intel_adsp_cavs15' | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hasty copy/paste... @iuliana-prodan which
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe it's nxp_adsp_imx8.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, is |
||
| RIMAGE_KEY='None' | ||
| ;; | ||
| cnl) | ||
| PLAT_CONFIG='intel_adsp_cavs18' | ||
| ;; | ||
|
|
@@ -130,10 +145,12 @@ build() | |
| -l "$STAGING"/sof/sof-"$platform".ldc \ | ||
| "$bdir"/zephyr/zephyr.elf | ||
|
|
||
| test "$RIMAGE_KEY" = 'None' || | ||
| west sign --build-dir "$bdir" \ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation looks odd here. Same with line below.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tabs vs spaces, the new line seems to be indented with spaces. |
||
| --tool rimage --tool-path "$RIMAGE_DIR"/rimage \ | ||
| --tool-data modules/audio/sof/rimage/config -- -k "$RIMAGE_KEY" | ||
| ) | ||
| test "$RIMAGE_KEY" = 'None' || | ||
| install_opts -m 0644 "$bdir"/zephyr/zephyr.ri \ | ||
| "$STAGING"/sof/community/sof-"$platform".ri | ||
| done | ||
|
|
@@ -206,7 +223,7 @@ main() | |
| if [ "x$DO_CLONE" == "xyes" ]; then | ||
| clone | ||
| else | ||
| # Link to ourselves if no sof module yet | ||
| # Symlink zephyr-project to our SOF selves if no sof west module yet | ||
| test -e "${WEST_TOP}"/modules/audio/sof || { | ||
| mkdir -p "${WEST_TOP}"/modules/audio | ||
| ln -s "$SOF_TOP" "${WEST_TOP}"/modules/audio/sof | ||
|
|
||
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.
Shouldn't we add imx8 instead of imx here?
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.
yes, should be imx8: