From 101330fa818fb90662e21cfbdac87af36f2be2c1 Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 00:02:01 +0100 Subject: [PATCH 01/11] cmake: CMakeLists for tools Signed-off-by: Janusz Jankowski --- tools/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tools/CMakeLists.txt diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 000000000000..ece4c4922ae8 --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,13 @@ +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}/..") From eb4e61ec75bcc1f8331066bfd04c297ff2231ce6 Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 00:03:40 +0100 Subject: [PATCH 02/11] cmake: tools: logger Signed-off-by: Janusz Jankowski --- tools/CMakeLists.txt | 2 ++ tools/logger/CMakeLists.txt | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tools/logger/CMakeLists.txt diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index ece4c4922ae8..c3adce9def20 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -11,3 +11,5 @@ endif() project(SOF_TOOLS C) set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..") + +add_subdirectory(logger) diff --git a/tools/logger/CMakeLists.txt b/tools/logger/CMakeLists.txt new file mode 100644 index 000000000000..7f4125c8a8e4 --- /dev/null +++ b/tools/logger/CMakeLists.txt @@ -0,0 +1,13 @@ +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}" +) From b5e7bda0987498c56d84d85b45fd42b596d227f9 Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 00:04:28 +0100 Subject: [PATCH 03/11] cmake: tools: eqctl Signed-off-by: Janusz Jankowski --- tools/CMakeLists.txt | 1 + tools/eqctl/CMakeLists.txt | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 tools/eqctl/CMakeLists.txt diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index c3adce9def20..9c444ba85dae 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -13,3 +13,4 @@ project(SOF_TOOLS C) set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..") add_subdirectory(logger) +add_subdirectory(eqctl) diff --git a/tools/eqctl/CMakeLists.txt b/tools/eqctl/CMakeLists.txt new file mode 100644 index 000000000000..4f33056c68fc --- /dev/null +++ b/tools/eqctl/CMakeLists.txt @@ -0,0 +1,7 @@ +add_executable(sof-eqctl + eqctl.c +) + +target_link_libraries(sof-eqctl PRIVATE + "-lasound" +) From 4cb192b2f9c3e32ba74de61ad0cd57372dfbea10 Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 01:09:01 +0100 Subject: [PATCH 04/11] cmake: tools: topology Signed-off-by: Janusz Jankowski --- tools/CMakeLists.txt | 1 + tools/topology/CMakeLists.txt | 70 +++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 tools/topology/CMakeLists.txt diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 9c444ba85dae..0f4d566d761e 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -14,3 +14,4 @@ set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..") add_subdirectory(logger) add_subdirectory(eqctl) +add_subdirectory(topology) diff --git a/tools/topology/CMakeLists.txt b/tools/topology/CMakeLists.txt new file mode 100644 index 000000000000..cde5ec5b8b4d --- /dev/null +++ b/tools/topology/CMakeLists.txt @@ -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() From 143b70be9f9dc7e3219fd874eed4369a8090dc99 Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 03:07:47 +0100 Subject: [PATCH 05/11] tools: tplg-build custom output dir Signed-off-by: Janusz Jankowski --- tools/test/topology/tplg-build.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tools/test/topology/tplg-build.sh b/tools/test/topology/tplg-build.sh index 9df05ac71154..5d7af3b1f628 100755 --- a/tools/test/topology/tplg-build.sh +++ b/tools/test/topology/tplg-build.sh @@ -10,6 +10,13 @@ set -e # M4 preprocessor flags export M4PATH="../../topology/:../../topology/m4:../../topology/common:../../topology/platform/intel:../../topology/platform/common" +if [ -z "$SOF_TPLG_BUILD_OUTPUT" ] +then + BUILD_OUTPUT="." +else + BUILD_OUTPUT="$SOF_TPLG_BUILD_OUTPUT" +fi + # Simple component test cases # can be used on components with 1 sink and 1 source. SIMPLE_TESTS=(test-all test-capture test-playback) @@ -63,9 +70,9 @@ function simple_test { -DTEST_DMIC_DUTY_MAX=${12} \ -DTEST_DMIC_SAMPLE_RATE=${13} \ -DTEST_DMIC_PDM_CONFIG=${14} \ - $i.m4 > ${TFILE}.conf - echo "Compiling test $i -> ${TFILE}.tplg" - alsatplg -v 1 -c ${TFILE}.conf -o ${TFILE}.tplg + $i.m4 > "$BUILD_OUTPUT/${TFILE}.conf" + echo "Compiling test $i -> $BUILD_OUTPUT/${TFILE}.tplg" + alsatplg -v 1 -c "$BUILD_OUTPUT/${TFILE}.conf" -o "$BUILD_OUTPUT/${TFILE}.tplg" else if [ "$USE_XARGS" == "yes" ] then @@ -85,9 +92,9 @@ function simple_test { -DTEST_SSP_MCLK=${11},-DTEST_SSP_PHY_BITS=$8\ -DTEST_SSP_DATA_BITS=$9,-DTEST_SSP_MODE=${12}\ -DTEST_SSP_MCLK_ID=${13},-DTEST_DAI_TYPE=$5\ - $i.m4,${TFILE}," + $i.m4,$BUILD_OUTPUT/${TFILE}," #create input string for batch processing of conf files - TEST_STRINGS+=${TFILE}"," + TEST_STRINGS+="$BUILD_OUTPUT/${TFILE}," fi else #if DAI type is SSP, define the SSP specific params @@ -113,9 +120,9 @@ function simple_test { -DTEST_SSP_MODE=${12} \ -DTEST_SSP_MCLK_ID=${13} \ -DTEST_DAI_TYPE=$5 \ - $i.m4 > ${TFILE}.conf - echo "Compiling test $i -> ${TFILE}.tplg" - alsatplg -v 1 -c ${TFILE}.conf -o ${TFILE}.tplg + $i.m4 > "$BUILD_OUTPUT/${TFILE}.conf" + echo "Compiling test $i -> $BUILD_OUTPUT/${TFILE}.tplg" + alsatplg -v 1 -c "$BUILD_OUTPUT/${TFILE}.conf" -o "$BUILD_OUTPUT/${TFILE}.tplg" fi fi fi From 3e410523b7cd5d972492fd1bf25881e6ed587031 Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 03:08:24 +0100 Subject: [PATCH 06/11] cmake: tools: test Signed-off-by: Janusz Jankowski --- tools/CMakeLists.txt | 1 + tools/test/CMakeLists.txt | 1 + tools/test/topology/CMakeLists.txt | 32 ++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 tools/test/CMakeLists.txt create mode 100644 tools/test/topology/CMakeLists.txt diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 0f4d566d761e..dfdbc222da0c 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -15,3 +15,4 @@ set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..") add_subdirectory(logger) add_subdirectory(eqctl) add_subdirectory(topology) +add_subdirectory(test) diff --git a/tools/test/CMakeLists.txt b/tools/test/CMakeLists.txt new file mode 100644 index 000000000000..7463f9cf1473 --- /dev/null +++ b/tools/test/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(topology) diff --git a/tools/test/topology/CMakeLists.txt b/tools/test/topology/CMakeLists.txt new file mode 100644 index 000000000000..894eb730df26 --- /dev/null +++ b/tools/test/topology/CMakeLists.txt @@ -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 +) From 696c392e74b0da20aecf2ce8235540bc7c3f82fd Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 03:12:30 +0100 Subject: [PATCH 07/11] cmake: tools: remove autotools Signed-off-by: Janusz Jankowski --- tools/Makefile.am | 5 -- tools/autogen.sh | 6 -- tools/configure.ac | 38 --------- tools/eqctl/Makefile.am | 6 -- tools/logger/Makefile.am | 11 --- tools/test/topology/Makefile.am | 32 ------- tools/topology/Makefile.am | 98 ---------------------- tools/topology/common/Makefile.am | 4 - tools/topology/m4/Makefile.am | 11 --- tools/topology/platform/Makefile.am | 1 - tools/topology/platform/common/Makefile.am | 2 - tools/topology/platform/intel/Makefile.am | 9 -- tools/topology/sof/Makefile.am | 14 ---- 13 files changed, 237 deletions(-) delete mode 100644 tools/Makefile.am delete mode 100755 tools/autogen.sh delete mode 100644 tools/configure.ac delete mode 100644 tools/eqctl/Makefile.am delete mode 100644 tools/logger/Makefile.am delete mode 100644 tools/test/topology/Makefile.am delete mode 100644 tools/topology/Makefile.am delete mode 100644 tools/topology/common/Makefile.am delete mode 100644 tools/topology/m4/Makefile.am delete mode 100644 tools/topology/platform/Makefile.am delete mode 100644 tools/topology/platform/common/Makefile.am delete mode 100644 tools/topology/platform/intel/Makefile.am delete mode 100644 tools/topology/sof/Makefile.am diff --git a/tools/Makefile.am b/tools/Makefile.am deleted file mode 100644 index da48543f1672..000000000000 --- a/tools/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -SUBDIRS = logger topology eqctl -TESTDIR = test/topology - -tests: - $(MAKE) -C $(TESTDIR) diff --git a/tools/autogen.sh b/tools/autogen.sh deleted file mode 100755 index 3b379b6014f2..000000000000 --- a/tools/autogen.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -libtoolize -c --force -aclocal -I m4 --install -autoconf -Wall -autoheader -automake -a --copy --foreign --add-missing diff --git a/tools/configure.ac b/tools/configure.ac deleted file mode 100644 index 829937a699b0..000000000000 --- a/tools/configure.ac +++ /dev/null @@ -1,38 +0,0 @@ - -AC_PREREQ([2.69]) -AC_INIT([sof-tools], [1.0.1]) -AM_INIT_AUTOMAKE([foreign]) -AC_CONFIG_SRCDIR([logger/logger.c]) -AC_CONFIG_SRCDIR([eqctl/eqctl.c]) -AC_CONFIG_HEADERS([config.h]) -AC_CHECK_HEADER([sof/uapi/abi.h]) -AC_CHECK_PROG([XARGS], xargs, "yes", "no", [$PATH]) -AM_CONDITIONAL(XARGS, test "$XARGS" = "yes") - -AC_CANONICAL_HOST - -dnl Initialize maintainer mode -AM_MAINTAINER_MODE([enable]) - -AC_PROG_CC - -AC_OUTPUT([ - Makefile - logger/Makefile - eqctl/Makefile - topology/Makefile - topology/common/Makefile - topology/platform/Makefile - topology/platform/intel/Makefile - topology/platform/common/Makefile - topology/m4/Makefile - topology/sof/Makefile - test/topology/Makefile -]) - -echo " - -prefix: ${prefix} -Compiler: ${CC} -CFLAGS: ${CFLAGS} -" diff --git a/tools/eqctl/Makefile.am b/tools/eqctl/Makefile.am deleted file mode 100644 index c1759c05b65a..000000000000 --- a/tools/eqctl/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -LDADD = -lasound - -bin_PROGRAMS = sof-eqctl - -sof_eqctl_SOURCES = \ - eqctl.c diff --git a/tools/logger/Makefile.am b/tools/logger/Makefile.am deleted file mode 100644 index 2a154135c7aa..000000000000 --- a/tools/logger/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -bin_PROGRAMS = sof-logger - -sof_logger_SOURCES = \ - logger.c \ - convert.c - -sof_logger_CFLAGS = \ - -I ../../src/include \ - -I ../../ \ - -Wall \ - -Werror diff --git a/tools/test/topology/Makefile.am b/tools/test/topology/Makefile.am deleted file mode 100644 index be2830bd2b92..000000000000 --- a/tools/test/topology/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ - -# -# Dependencies -# - -if XARGS -export USE_XARGS=yes -endif - -DEPS = \ - ../../topology/platform/intel/*.m4 \ - ../../topology/common/*.m4 \ - ../../topology/m4/*.m4 \ - ../../topology/sof/*.m4 - -# Uncomment the following line if you want to debug conf files -.PRECIOUS: %.conf - -all : *.m4 ${DEPS} - ./tplg-build.sh - -clean-local: - rm -f *.conf - rm -f *.tplg - - -EXTRA_DIST = \ - test-capture.m4 \ - test-playback.m4 \ - test-tone-playback.m4 \ - test-all.m4 \ - tplg-build.sh diff --git a/tools/topology/Makefile.am b/tools/topology/Makefile.am deleted file mode 100644 index 3e293b18871c..000000000000 --- a/tools/topology/Makefile.am +++ /dev/null @@ -1,98 +0,0 @@ - -# -# Dependencies -# - -SUBDIRS = m4 sof common platform - -DEPS = \ - platform/intel/*.m4 \ - platform/common/*.m4 \ - common/*.m4 \ - m4/*.m4 \ - sof/*.m4 - -# -# Machines -# - -MACHINES = \ - sof-cht-nocodec.tplg \ - sof-cht-max98090.tplg \ - sof-hda-intel-common.tplg \ - sof-apl-nocodec.tplg \ - sof-byt-nocodec.tplg \ - sof-bdw-rt286.tplg \ - sof-bdw-rt5640.tplg \ - sof-byt-rt5640.tplg \ - sof-byt-rt5645.tplg \ - sof-byt-rt5651.tplg \ - sof-byt-da7213.tplg \ - sof-cnl-rt274.tplg \ - sof-hsw-rt5640.tplg \ - sof-apl-tdf8532.tplg \ - sof-apl-pcm512x.tplg \ - sof-apl-pcm512x-nohdmi.tplg \ - sof-apl-rt298.tplg \ - sof-apl-wm8804.tplg \ - sof-apl-da7219.tplg \ - sof-glk-da7219.tplg \ - sof-glk-rt5682.tplg \ - sof-icl-nocodec.tplg \ - sof-apl-eq-pcm512x.tplg \ - sof-apl-eq-dmic.tplg \ - sof-apl-dmic-2ch.tplg \ - sof-apl-dmic-4ch.tplg \ - sof-icl-dmic-4ch.tplg \ - sof-apl-src-pcm512x.tplg \ - sof-cml-rt5682.tplg \ - sof-cml-src-rt5682.tplg \ - sof-cnl-nocodec.tplg - -# Uncomment the following line if you want to debug conf files -.PRECIOUS: %.conf - -%.conf : %.m4 ${DEPS} - m4 -I m4 -I common -I platform/common $< > $@ - -%.tplg : %.conf - alsatplg -v 1 -c $< -o $@ - -all: ${MACHINES} - -clean-local: - rm -f *.conf - rm -f *.tplg - -EXTRA_DIST = \ - sof-cht-nocodec.m4 \ - sof-cht-max98090.m4 \ - sof-apl-hdmi.m4 \ - sof-hda-intel-common.m4 \ - sof-apl-nocodec.m4 \ - sof-byt-nocodec.m4 \ - sof-bdw-rt286.m4 \ - sof-bdw-rt5640.m4 \ - sof-byt-rt5640.m4 \ - sof-byt-rt5645.m4 \ - sof-byt-rt5651.m4 \ - sof-byt-da7213.m4 \ - sof-cnl-rt274.m4 \ - sof-hsw-rt5640.m4 \ - sof-apl-tdf8532.m4 \ - sof-apl-pcm512x.m4 \ - sof-apl-pcm512x-nohdmi.m4 \ - sof-apl-rt298.m4 \ - sof-apl-wm8804.m4 \ - sof-apl-da7219.m4 \ - sof-glk-da7219.m4 \ - sof-glk-rt5682.m4 \ - sof-icl-nocodec.m4 \ - sof-apl-eq-pcm512x.m4 \ - sof-apl-eq-dmic.m4 \ - sof-apl-dmic-4ch.m4 \ - sof-apl-dmic-2ch.m4 \ - sof-apl-src-pcm512x.m4 \ - sof-cml-rt5682.m4 \ - sof-cml-src-rt5682.m4 \ - sof-cnl-nocodec.m4 diff --git a/tools/topology/common/Makefile.am b/tools/topology/common/Makefile.am deleted file mode 100644 index 7e207a79703f..000000000000 --- a/tools/topology/common/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -EXTRA_DIST = \ - tlv.m4 \ - memory.m4 - diff --git a/tools/topology/m4/Makefile.am b/tools/topology/m4/Makefile.am deleted file mode 100644 index d7b867f316cd..000000000000 --- a/tools/topology/m4/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -EXTRA_DIST = \ - buffer.m4 \ - dai.m4 \ - mixer.m4 \ - mixercontrol.m4 \ - pcm.m4 \ - pga.m4 \ - pipeline.m4 \ - src.m4 \ - tone.m4 \ - utils.m4 diff --git a/tools/topology/platform/Makefile.am b/tools/topology/platform/Makefile.am deleted file mode 100644 index 011ff9e938aa..000000000000 --- a/tools/topology/platform/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = intel common diff --git a/tools/topology/platform/common/Makefile.am b/tools/topology/platform/common/Makefile.am deleted file mode 100644 index a8576d588efc..000000000000 --- a/tools/topology/platform/common/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -EXTRA_DIST = \ - ssp.m4 diff --git a/tools/topology/platform/intel/Makefile.am b/tools/topology/platform/intel/Makefile.am deleted file mode 100644 index bc56971989ed..000000000000 --- a/tools/topology/platform/intel/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -EXTRA_DIST = \ - bdw.m4 \ - bxt.m4 \ - byt.m4 \ - cht.m4 \ - hsw.m4 \ - cnl.m4 \ - dmic.m4 - diff --git a/tools/topology/sof/Makefile.am b/tools/topology/sof/Makefile.am deleted file mode 100644 index fc92591f738b..000000000000 --- a/tools/topology/sof/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -EXTRA_DIST = \ - pipe-dai-capture.m4 \ - pipe-dai-playback.m4 \ - pipe-low-latency-capture.m4 \ - pipe-low-latency-playback.m4 \ - pipe-passthrough-capture.m4 \ - pipe-passthrough-playback.m4 \ - pipe-pcm-media.m4 \ - pipe-src-capture.m4 \ - pipe-src-playback.m4 \ - pipe-tone.m4 \ - pipe-volume-capture.m4 \ - pipe-volume-playback.m4 \ - tokens.m4 From 6f6f92a9fbce7cc7a88ab9e49589b161396ddec5 Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 03:19:25 +0100 Subject: [PATCH 08/11] cmake: tools: install targets Signed-off-by: Janusz Jankowski --- tools/eqctl/CMakeLists.txt | 2 ++ tools/logger/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/eqctl/CMakeLists.txt b/tools/eqctl/CMakeLists.txt index 4f33056c68fc..81707cdf1352 100644 --- a/tools/eqctl/CMakeLists.txt +++ b/tools/eqctl/CMakeLists.txt @@ -5,3 +5,5 @@ add_executable(sof-eqctl target_link_libraries(sof-eqctl PRIVATE "-lasound" ) + +install(TARGETS sof-eqctl DESTINATION bin) diff --git a/tools/logger/CMakeLists.txt b/tools/logger/CMakeLists.txt index 7f4125c8a8e4..317d950a4085 100644 --- a/tools/logger/CMakeLists.txt +++ b/tools/logger/CMakeLists.txt @@ -11,3 +11,5 @@ target_include_directories(sof-logger PRIVATE "${SOF_ROOT_SOURCE_DIRECTORY}/src/include" "${SOF_ROOT_SOURCE_DIRECTORY}" ) + +install(TARGETS sof-logger DESTINATION bin) From 01243eea40a467096b9886d7704e3d833a7a9d4f Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 03:20:54 +0100 Subject: [PATCH 09/11] cmake: tools: README Signed-off-by: Janusz Jankowski --- tools/README | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/tools/README b/tools/README index 07e9777d67a8..401ac199f133 100644 --- a/tools/README +++ b/tools/README @@ -7,34 +7,11 @@ DSP firmwares for ALSA. Building and Installing ======================= -./autogen.sh (only needed first time) -./configure +cmake -Bbuild . +cd build make make install - -rimage -====== - -rimage is used to convert ELF executable firmware files to the firmware file -formats used by the kernel drivers. - -e.g. - -rimage -i elf_file -o kernel_file -m machine - -rimage can also convert kernel firmware formats to flat binaries formats to -assist in debugging :- - -e.g. convert to flat binary, then ELF then dissasemble - -rimage -i /lib/firmware/intel/reef-byt.ri -o image.bin -b -m byt - -xtensa-byt-elf-objcopy -I binary -O elf32-xtensa-le -B xtensa image.bin image.bin.elf - -xtensa-byt-elf-objdump -D image.bin.elf > image.dis.txt - - sof-logger ====== @@ -130,4 +107,4 @@ tests To generate all test configuration files: -make tests \ No newline at end of file +make tests From e35dea18cbb1640f2b57516a726338b1f6ba5692 Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Sun, 3 Feb 2019 03:37:38 +0100 Subject: [PATCH 10/11] scripts: update build-tools.sh for cmake Signed-off-by: Janusz Jankowski --- scripts/build-tools.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/build-tools.sh b/scripts/build-tools.sh index f18ddd9e0a87..7a8a8fad870f 100755 --- a/scripts/build-tools.sh +++ b/scripts/build-tools.sh @@ -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 ../../ From 6432170b4c465d232b359ef60136c73802cc256d Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Mon, 11 Feb 2019 13:07:37 +0100 Subject: [PATCH 11/11] scripts: sof-target-install update for cmake tools Signed-off-by: Janusz Jankowski --- scripts/sof-target-install.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/sof-target-install.sh b/scripts/sof-target-install.sh index f1aa903a12e8..6928eb12d2fd 100755 --- a/scripts/sof-target-install.sh +++ b/scripts/sof-target-install.sh @@ -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