Skip to content

Commit 2aba76b

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 e83a183 commit 2aba76b

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
@@ -27,6 +27,7 @@ usage: $0 [-c|-f|-h|-l|-p|-t|-T|-X|-Y|-A]
2727
-Y Rebuild topology2 only
2828
-t Rebuild test/topology/ (or tools/test/topology/tplg-build.sh directly)
2929
-A Clone and rebuild local ALSA lib and utils.
30+
-d Deployment build
3031
3132
-C No build, only CMake re-configuration. Shows CMake targets.
3233
EOFUSAGE
@@ -100,6 +101,7 @@ main()
100101
SOF_REPO=$(dirname "$SCRIPT_DIR")
101102
: "${BUILD_TOOLS_DIR:=$SOF_REPO/../build-tools-tplg}"
102103
: "${NO_PROCESSORS:=$(nproc)}"
104+
DEPLOY_DIR="$SOF_REPO/../build-sof-staging"
103105
BUILD_ALL=false
104106

105107
if [ $# -eq 0 ]; then
@@ -113,14 +115,15 @@ main()
113115
DO_BUILD_tests=false
114116
DO_BUILD_topologies1=false
115117
DO_BUILD_topologies2=false
118+
DO_DEPLOYMENT=false
116119
CMAKE_ONLY=false
117120

118121
# better safe than sorry
119122
local warn_incremental_build=true
120123

121124
# eval is a sometimes necessary evil
122125
# shellcheck disable=SC2034
123-
while getopts "cfhlptTCXYA" OPTION; do
126+
while getopts "cfhlptTCXYAd" OPTION; do
124127
case "$OPTION" in
125128
c) DO_BUILD_ctl=true ;;
126129
l) DO_BUILD_logger=true ;;
@@ -131,6 +134,7 @@ main()
131134
Y) DO_BUILD_topologies2=true ;;
132135
C) CMAKE_ONLY=true ;;
133136
A) DO_BUILD_alsa=true ;;
137+
d) DO_DEPLOYMENT=true ;;
134138
h) print_usage; exit 1;;
135139
*) print_usage; exit 1;;
136140
esac
@@ -174,6 +178,14 @@ main()
174178
fi
175179
done
176180

181+
if "$DO_DEPLOYMENT"; then
182+
# copy Intel topology2 files to output directory
183+
# This will need updated when other uses topology2
184+
cp -ap "$BUILD_TOOLS_DIR"/topology/topology2/production/*.tplg \
185+
$DEPLOY_DIR/lib/firmware/intel/sof-ipc4-tplg/
186+
echo "Deployment build done"
187+
fi
188+
177189
warn_if_incremental_build
178190
}
179191

0 commit comments

Comments
 (0)