From 80770caf48ef0e96be116d6a27c7a2f0d130ee81 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 22 Apr 2022 00:43:27 +0000 Subject: [PATCH 1/2] installer: explain why we install only sof-*.tplg files See #4611 for more background. Signed-off-by: Marc Herbert --- installer/GNUmakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer/GNUmakefile b/installer/GNUmakefile index 098f82a4cd47..730fc12654e2 100644 --- a/installer/GNUmakefile +++ b/installer/GNUmakefile @@ -260,6 +260,8 @@ ifneq (true,${BUILD_ONLY_ONCE}) .PHONY: ${BUILD_TOOLS} endif +# Deploy and release only "official", top-level topology files starting +# with the 'sof-' prefix to avoid any experimental stuff. topologies: ${BUILD_TOOLS} install ${INSTALL_OPTS} -t ${STAGING_SOF_TPLG}${VERSION_SUFFIX}/ \ ${BUILD_TOOLS}/topology/sof-*.tplg From 2bbc8ef4aee25c1bf50f595be0c4c693ffb8c853 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 21 Apr 2022 23:52:35 +0000 Subject: [PATCH 2/2] tools: stop copying v2 topologies to the v1 directory STOP copying all files from dir: sof/tools/build_tools/topology/topology2/cavs/ to dir: sof/tools/build_tools/topology/ The original plan discussed in the reviews of commit c0bee428aea3da ("topology: prepare for Topology2.0") and commit 308a24a92b44 ("topology2: Add build support") and more recently mentioned in #4611 was to overwrite in place some v1 topologies with newer v2 topologies in order to "force" users to upgrade without them realizing it. This original plan is now being abandoned. v2 topologies will never overwrite v1 topologies and if ever then certainly not "en masse". Moreover, v2 topologies will be placed in a new /lib/firmware/ subdirectory. So, partial revert the aforementioned commits. More specifically. stop installing v2 topologies into the same directory as v1 topologies. Note there had never been any actual overwrite of any v1 topology yet because there had never been any v2 topology of the same name. At this point in time this gets rid of the following copies: tools/build_tools/topology: abi.conf tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-cnl.conf tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-cnl.tplg tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-tgl.conf tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-tgl.tplg tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-cnl.conf tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-cnl.tplg tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-tgl.conf tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-tgl.tplg tools/build_tools/topology: cavs-mixin-mixout-hda.conf tools/build_tools/topology: cavs-mixin-mixout-hda.tplg tools/build_tools/topology: cavs-passthrough-hdmi.conf tools/build_tools/topology: cavs-passthrough-hdmi.tplg tools/build_tools/topology: cavs-sdw.conf tools/build_tools/topology: cavs-sdw.tplg tools/build_tools/topology: cavs-tgl-nocodec.conf tools/build_tools/topology: cavs-tgl-nocodec.tplg tools/build_tools/topology: nhlt-ace-mtl-nocodec.bin tools/build_tools/topology: nhlt.bin tools/build_tools/topology: nhlt-cavs-tgl-nocodec.bin tools/build_tools/topology: sof-mtl-nocodec.conf tools/build_tools/topology: sof-mtl-nocodec.tplg From an "installer/" and sof-bin release perspective, this removes the following topology that was just added by commit ba26eeff9df6 ("topology2: cavs-nocodec: Add support for MTL nocodec topology"). Installing v2 topologies into a new /lib/firmware/ subdirectory has not been implemented yet. No other change besides dropping these copies, everything else is the same. Signed-off-by: Marc Herbert --- tools/topology/topology1/CMakeLists.txt | 4 +--- tools/topology/topology2/CMakeLists.txt | 9 +-------- tools/topology/topology2/cavs/CMakeLists.txt | 1 - 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/tools/topology/topology1/CMakeLists.txt b/tools/topology/topology1/CMakeLists.txt index 7507465740ea..5c9c2eefaae8 100644 --- a/tools/topology/topology1/CMakeLists.txt +++ b/tools/topology/topology1/CMakeLists.txt @@ -239,9 +239,7 @@ set(TPLGS # down. add_subdirectory(production) -# "Install" all v1 production topologies two directory levels up. In the -# future, v2 topologies will be "installed" instead in the same place so -# users get upgraded without doing anything. +# "Install" all v1 production topologies two directory levels up. add_custom_target(topologies1 ALL COMMAND ${CMAKE_COMMAND} -E copy_directory production ${SOF_TOPOLOGY_BINARY_DIRECTORY} ) diff --git a/tools/topology/topology2/CMakeLists.txt b/tools/topology/topology2/CMakeLists.txt index 7c1991066faa..3d02496b37e6 100644 --- a/tools/topology/topology2/CMakeLists.txt +++ b/tools/topology/topology2/CMakeLists.txt @@ -1,10 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause -add_custom_target(topologies2 - COMMAND ${CMAKE_COMMAND} -E copy_directory cavs ${SOF_TOPOLOGY_BINARY_DIRECTORY} -) +add_custom_target(topologies2) # check alsatplg version and built topology2 if alsatplg version is 1.2.6 or greater -# This will override any common topologies built with topology1 execute_process(COMMAND alsatplg --version RESULT_VARIABLE STATUS OUTPUT_VARIABLE ALSA_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) if(STATUS AND NOT STATUS EQUAL 0) message(WARNING "alsatplg error: ${STATUS}, topology2 will be skipped") @@ -16,10 +13,6 @@ else() message(WARNING "topology2 will be skipped. Minimum required version for alsatplg: 1.2.6") else() add_dependencies(topologies topologies2) - - # make sure topology1 always builds first so that the installed binaries from v2 override the ones from v1 - add_dependencies(topologies2 topologies1) - endif() endif() diff --git a/tools/topology/topology2/cavs/CMakeLists.txt b/tools/topology/topology2/cavs/CMakeLists.txt index e2ee62e2cada..9caab688063b 100644 --- a/tools/topology/topology2/cavs/CMakeLists.txt +++ b/tools/topology/topology2/cavs/CMakeLists.txt @@ -39,7 +39,6 @@ execute_process( OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/abi.conf ) -# This will override the topology1 binaries with topology2 binaries add_custom_target(topology2_cavs) add_dependencies(topologies2 topology2_cavs)