Skip to content

Commit 3e2617e

Browse files
committed
Scripts: Ensure user's sof-ctl is up-to-date before blobs rebuild
The sof-ctl is used to create the bytes control SOF ABI header for the binary blob files. These changes ensure that the sof-ctl is built from tools and that the correct version of sof-ctl exists in user's path. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 9189bef commit 3e2617e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

scripts/sof-rebuild-processing-comp-blobs.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,24 @@ if [ -z "${SOF_WORKSPACE}" ]; then
1010
fi
1111

1212
if ! command -v octave &> /dev/null; then
13-
echo "Error: this scrip needs GNU Octave, see https://octave.org/"
13+
echo "Error: this script needs GNU Octave, see https://octave.org/"
1414
exit 1
1515
fi
1616

17+
"$SOF_WORKSPACE"/sof/scripts/build-tools.sh -c
18+
19+
if ! command -v sof-ctl &> /dev/null; then
20+
echo "Error: The sof-ctl utility is not found from path for executables. It is needed"
21+
echo " to retrieve SOF ABI header It can be added with e.g. symlink to user's binaries:"
22+
echo " ln -s $SOF_WORKSPACE/sof/tools/build_tools/ctl/sof-ctl $HOME/bin/sof-ctl"
23+
exit 1
24+
fi
25+
26+
cmp --quiet "$(which sof-ctl)" "$SOF_WORKSPACE"/sof/tools/build_tools/ctl/sof-ctl || {
27+
echo "Error: The sof-ctl in user's path is not the same as sof-ctl build from tools."
28+
exit 1
29+
}
30+
1731
OCTAVE="octave --quiet --no-window-system"
1832
cd "$SOF_WORKSPACE"/sof/src/audio/aria/tune; $OCTAVE sof_aria_blobs.m
1933
cd "$SOF_WORKSPACE"/sof/src/audio/crossover/tune; $OCTAVE sof_example_crossover.m

0 commit comments

Comments
 (0)