Skip to content

Commit 4417390

Browse files
committed
build-tools: deploy: Add deployment option for topology2
Add a simple deployment option fro topology2 to copy topologies to the staging build directory. Simple today as only Intel use tplg2. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 00b0e60 commit 4417390

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

scripts/build-tools.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ usage: $0 [-c|-f|-h|-l|-p|-t|-T|-X|-Y]
2626
-X Rebuild topology1 only
2727
-Y Rebuild topology2 only
2828
-t Rebuild test/topology/ (or tools/test/topology/tplg-build.sh directly)
29+
-d Deployment build
2930
3031
-C No build, only CMake re-configuration. Shows CMake targets.
3132
EOFUSAGE
@@ -99,6 +100,7 @@ main()
99100
SOF_REPO=$(dirname "$SCRIPT_DIR")
100101
: "${BUILD_TOOLS_DIR:=$SOF_REPO/../build-tools-tplg}"
101102
: "${NO_PROCESSORS:=$(nproc)}"
103+
DEPLOY_DIR="$SOF_REPO/../build-sof-staging"
102104
BUILD_ALL=false
103105

104106
if [ $# -eq 0 ]; then
@@ -111,14 +113,15 @@ main()
111113
DO_BUILD_tests=false
112114
DO_BUILD_topologies1=false
113115
DO_BUILD_topologies2=false
116+
DO_DEPLOYMENT=false
114117
CMAKE_ONLY=false
115118

116119
# better safe than sorry
117120
local warn_incremental_build=true
118121

119122
# eval is a sometimes necessary evil
120123
# shellcheck disable=SC2034
121-
while getopts "cfhlptTCXY" OPTION; do
124+
while getopts "cfhlptTCXYd" OPTION; do
122125
case "$OPTION" in
123126
c) DO_BUILD_ctl=true ;;
124127
l) DO_BUILD_logger=true ;;
@@ -128,6 +131,7 @@ main()
128131
X) DO_BUILD_topologies1=true ;;
129132
Y) DO_BUILD_topologies2=true ;;
130133
C) CMAKE_ONLY=true ;;
134+
d) DO_DEPLOYMENT=true ;;
131135
h) print_usage; exit 1;;
132136
*) print_usage; exit 1;;
133137
esac
@@ -167,6 +171,14 @@ main()
167171
fi
168172
done
169173

174+
if "$DO_DEPLOYMENT"; then
175+
# copy Intel topology2 files to output directory
176+
# This will need updated when other uses topology2
177+
cp -ap "$BUILD_TOOLS_DIR"/topology/topology2/production/*.tplg \
178+
$DEPLOY_DIR/lib/firmware/intel/sof-ipc4-tplg/
179+
echo "Deployment build done"
180+
fi
181+
170182
warn_if_incremental_build
171183
}
172184

0 commit comments

Comments
 (0)