xtensa-build-zephyr: fix submodules download hack when starting from west

By adding the missing remote to thesofproject

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2021-09-27 20:24:12 +00:00 committed by Liam Girdwood
parent a0793de4be
commit d80d70bf47
1 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,8 @@ print_usage()
Re-configures and re-builds SOF with Zephyr using a pre-installed Zephyr toolchain and Re-configures and re-builds SOF with Zephyr using a pre-installed Zephyr toolchain and
the _defconfig file for that platform. the _defconfig file for that platform.
Outputs in \$(west topdir)/build-*/ directories
usage: $0 [options] [ platform(s) ] [ -- cmake arguments ] usage: $0 [options] [ platform(s) ] [ -- cmake arguments ]
-a Build all platforms. -a Build all platforms.
@ -238,6 +240,7 @@ build_all()
install_opts -m 0755 "$bdir"/zephyr/sof-logger_ep/build/logger/sof-logger \ install_opts -m 0755 "$bdir"/zephyr/sof-logger_ep/build/logger/sof-logger \
"$STAGING"/tools/sof-logger "$STAGING"/tools/sof-logger
(cd "$STAGING"; pwd)
tree "$STAGING" || ( cd "$STAGING" && ls -R1 ) tree "$STAGING" || ( cd "$STAGING" && ls -R1 )
} }
@ -372,8 +375,19 @@ see https://docs.zephyrproject.org/latest/getting_started/index.html"
# FIXME: remove this hack. Downloading and building # FIXME: remove this hack. Downloading and building
# should be kept separate but support for submodules in # should be kept separate but support for submodules in
# west is too recent, cannot rely on it yet. # west is too recent, cannot rely on it yet.
# https://docs.zephyrproject.org/latest/guides/west/release-notes.html#v0-9-0
test -e "${WEST_TOP}"/modules/audio/sof/rimage/CMakeLists.txt || ( test -e "${WEST_TOP}"/modules/audio/sof/rimage/CMakeLists.txt || (
cd "${WEST_TOP}"/modules/audio/sof cd "${WEST_TOP}"/modules/audio/sof
# Support starting with sof/ coming from "west
# update sof".
# "origin" is the default value expected by git
# submodule. Don't overwrite any existing "origin";
# it could be some user-defined mirror.
git remote | grep -q '^origin$' ||
git remote add origin https://github.com/thesofproject/sof
git submodule update --init --recursive git submodule update --init --recursive
) )
fi fi