Skip to content

Commit

Permalink
Scripts: Ensure user's sof-ctl is up-to-date before blobs rebuild
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
singalsu committed Jan 9, 2025
1 parent 9189bef commit 3e2617e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion scripts/sof-rebuild-processing-comp-blobs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,24 @@ if [ -z "${SOF_WORKSPACE}" ]; then
fi

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

"$SOF_WORKSPACE"/sof/scripts/build-tools.sh -c

if ! command -v sof-ctl &> /dev/null; then
echo "Error: The sof-ctl utility is not found from path for executables. It is needed"
echo " to retrieve SOF ABI header It can be added with e.g. symlink to user's binaries:"
echo " ln -s $SOF_WORKSPACE/sof/tools/build_tools/ctl/sof-ctl $HOME/bin/sof-ctl"
exit 1
fi

cmp --quiet "$(which sof-ctl)" "$SOF_WORKSPACE"/sof/tools/build_tools/ctl/sof-ctl || {
echo "Error: The sof-ctl in user's path is not the same as sof-ctl build from tools."
exit 1
}

OCTAVE="octave --quiet --no-window-system"
cd "$SOF_WORKSPACE"/sof/src/audio/aria/tune; $OCTAVE sof_aria_blobs.m
cd "$SOF_WORKSPACE"/sof/src/audio/crossover/tune; $OCTAVE sof_example_crossover.m
Expand Down

0 comments on commit 3e2617e

Please sign in to comment.