Repository navigation
tools: change buildsystem to cmake #951
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
101330f
cmake: CMakeLists for tools
jajanusz eb4e61e
cmake: tools: logger
jajanusz b5e7bda
cmake: tools: eqctl
jajanusz 4cb192b
cmake: tools: topology
jajanusz 143b70b
tools: tplg-build custom output dir
jajanusz 3e41052
cmake: tools: test
jajanusz 696c392
cmake: tools: remove autotools
jajanusz 6f6f92a
cmake: tools: install targets
jajanusz 01243ee
cmake: tools: README
jajanusz e35dea1
scripts: update build-tools.sh for cmake
jajanusz 6432170
scripts: sof-target-install update for cmake tools
jajanusz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| #!/bin/bash | ||
| cd tools | ||
| ./autogen.sh | ||
| ./configure | ||
|
|
||
| mkdir build_tools | ||
| cd build_tools | ||
| cmake .. | ||
| make -j$(nproc) | ||
| if [[ "$1" == "-t" ]]; then | ||
| make tests -j$(nproc) | ||
| fi | ||
| cd ../ | ||
| cd ../../ |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,15 +1,14 @@ | ||
| #!/bin/bash | ||
| # usage: ./scripts/sof-target-intsall.sh up2-hostname ip | ||
| # usage: ./scripts/sof-target-install.sh up2-hostname ip | ||
|
|
||
| for host in $@ | ||
| do | ||
| scp build_*_*/sof-*.ri root@${host}:/lib/firmware/intel/sof/ | ||
| # TODO: need modify when tools CMAKE build system updated | ||
| scp tools/topology/*.tplg root@${host}:/lib/firmware/intel/sof-tplg/ | ||
| scp tools/logger/sof-logger \ | ||
| scp tools/build_tools/topology/*.tplg root@${host}:/lib/firmware/intel/sof-tplg/ | ||
| scp tools/build_tools/logger/sof-logger \ | ||
| build_*_*/src/arch/xtensa/sof-*.ldc \ | ||
| tools/coredumper/* \ | ||
| tools/eqctl/sof-eqctl \ | ||
| tools/build_tools/eqctl/sof-eqctl \ | ||
| tools/kmod_scripts/* \ | ||
| root@${host}:~/ | ||
| done |
This file contains hidden or 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,18 @@ | ||
| cmake_minimum_required(VERSION 3.10) | ||
|
|
||
| if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") | ||
| message(FATAL_ERROR | ||
| " In-source builds are not supported.\n" | ||
| " Please remove CMakeCache.txt and the CMakeFiles directory.\n" | ||
| " Then specify a build directory. Example: cmake -Bbuild ..." | ||
| ) | ||
| endif() | ||
|
|
||
| project(SOF_TOOLS C) | ||
|
|
||
| set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..") | ||
|
|
||
| add_subdirectory(logger) | ||
| add_subdirectory(eqctl) | ||
| add_subdirectory(topology) | ||
| add_subdirectory(test) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,9 @@ | ||
| add_executable(sof-eqctl | ||
| eqctl.c | ||
| ) | ||
|
|
||
| target_link_libraries(sof-eqctl PRIVATE | ||
| "-lasound" | ||
| ) | ||
|
|
||
| install(TARGETS sof-eqctl DESTINATION bin) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,15 @@ | ||
| add_executable(sof-logger | ||
| logger.c | ||
| convert.c | ||
| ) | ||
|
|
||
| target_compile_options(sof-logger PRIVATE | ||
| -Wall -Werror | ||
| ) | ||
|
|
||
| target_include_directories(sof-logger PRIVATE | ||
| "${SOF_ROOT_SOURCE_DIRECTORY}/src/include" | ||
| "${SOF_ROOT_SOURCE_DIRECTORY}" | ||
| ) | ||
|
|
||
| install(TARGETS sof-logger DESTINATION bin) | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 @@ | ||
| add_subdirectory(topology) |
This file contains hidden or 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,32 @@ | ||
| file(GLOB TPLG_DEPS | ||
| ../../topology/platform/intel/*.m4 | ||
| ../../topology/common/*.m4 | ||
| ../../topology/m4/*.m4 | ||
| ../../topology/sof/*.m4 | ||
| ) | ||
|
|
||
| find_program(XARGS NAMES xargs PATHS ENV PATH NO_DEFAULT_PATH) | ||
|
|
||
| if(${XARGS} STREQUAL XARGS-NOTFOUND) | ||
| set(USE_XARGS "no") | ||
| else() | ||
| set(USE_XARGS "yes") | ||
| endif() | ||
|
|
||
| add_custom_target(tests | ||
| COMMAND ${CMAKE_COMMAND} -E env | ||
| SOF_TPLG_BUILD_OUTPUT=${CMAKE_CURRENT_BINARY_DIR} | ||
| USE_XARGS=${USE_XARGS} | ||
| ./tplg-build.sh | ||
| DEPENDS ${TPLG_DEPS} | ||
| WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
| VERBATIM | ||
| USES_TERMINAL | ||
| ) | ||
|
|
||
| add_custom_target(tests-clean | ||
| COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/*.conf | ||
| COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/*.tplg | ||
| VERBATIM | ||
| USES_TERMINAL | ||
| ) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,70 @@ | ||
| file(GLOB TPLG_DEPS | ||
| platform/intel/*.m4 | ||
| platform/common/*.m4 | ||
| common/*.m4 | ||
| m4/*.m4 | ||
| sof/*.m4 | ||
| ) | ||
|
|
||
| set(MACHINES | ||
| sof-cht-nocodec | ||
| sof-cht-max98090 | ||
| sof-hda-intel-common | ||
| sof-apl-nocodec | ||
| sof-byt-nocodec | ||
| sof-bdw-rt286 | ||
| sof-bdw-rt5640 | ||
| sof-byt-rt5640 | ||
| sof-byt-rt5645 | ||
| sof-byt-rt5651 | ||
| sof-byt-da7213 | ||
| sof-cnl-rt274 | ||
| sof-hsw-rt5640 | ||
| sof-apl-tdf8532 | ||
| sof-apl-pcm512x | ||
| sof-apl-pcm512x-nohdmi | ||
| sof-apl-rt298 | ||
| sof-apl-wm8804 | ||
| sof-apl-da7219 | ||
| sof-glk-da7219 | ||
| sof-glk-rt5682 | ||
| sof-icl-nocodec | ||
| sof-apl-eq-pcm512x | ||
| sof-apl-eq-dmic | ||
| sof-apl-dmic-2ch | ||
| sof-apl-dmic-4ch | ||
| sof-icl-dmic-4ch | ||
| sof-apl-src-pcm512x | ||
| sof-cml-rt5682 | ||
| sof-cml-src-rt5682 | ||
| sof-cnl-nocodec | ||
| ) | ||
|
|
||
| add_custom_target(topologies ALL) | ||
|
|
||
| foreach(machine ${MACHINES}) | ||
| add_custom_command( | ||
| OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${machine}.conf | ||
| COMMAND m4 | ||
| -I ${CMAKE_CURRENT_SOURCE_DIR}/m4 | ||
| -I ${CMAKE_CURRENT_SOURCE_DIR}/common | ||
| -I ${CMAKE_CURRENT_SOURCE_DIR}/platform/common | ||
| -I ${CMAKE_CURRENT_SOURCE_DIR} | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/${machine}.m4 | ||
| > ${machine}.conf | ||
| DEPENDS ${TPLG_DEPS} | ||
| VERBATIM | ||
| USES_TERMINAL | ||
| ) | ||
|
|
||
| add_custom_command( | ||
| OUTPUT ${machine}.tplg | ||
| COMMAND alsatplg -v 1 -c ${machine}.conf -o ${machine}.tplg | ||
| DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${machine}.conf | ||
| VERBATIM | ||
| USES_TERMINAL | ||
| ) | ||
|
|
||
| add_custom_target(topology_${machine} DEPENDS ${machine}.tplg) | ||
| add_dependencies(topologies topology_${machine}) | ||
| endforeach() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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's the prefix for destination ? I'm assuming it can be set somewhere.
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.
Similar to --prefix from autotools:
https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html