mirror of https://github.com/thesofproject/sof.git
xtensa-build-zephyr: fix RIMAGE_KEY when building multiple platforms
RIMAGE_KEY was global and leaking from one platform to the next Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
36cb5b32d8
commit
6bedd8e742
|
@ -18,7 +18,6 @@ SUPPORTED_PLATFORMS+=(imx8)
|
||||||
# Default value, can (and sometimes must) be overridden with -p
|
# Default value, can (and sometimes must) be overridden with -p
|
||||||
WEST_TOP="${SOF_TOP}"/zephyrproject
|
WEST_TOP="${SOF_TOP}"/zephyrproject
|
||||||
BUILD_JOBS=$(nproc --all)
|
BUILD_JOBS=$(nproc --all)
|
||||||
RIMAGE_KEY=modules/audio/sof/keys/otc_private_key.pem
|
|
||||||
PLATFORMS=()
|
PLATFORMS=()
|
||||||
|
|
||||||
die()
|
die()
|
||||||
|
@ -118,6 +117,10 @@ build()
|
||||||
mkdir -p ${STAGING}/sof/ # smex does not use 'install -D'
|
mkdir -p ${STAGING}/sof/ # smex does not use 'install -D'
|
||||||
|
|
||||||
for platform in "${PLATFORMS[@]}"; do
|
for platform in "${PLATFORMS[@]}"; do
|
||||||
|
|
||||||
|
# default value
|
||||||
|
local RIMAGE_KEY=modules/audio/sof/keys/otc_private_key.pem
|
||||||
|
|
||||||
case "$platform" in
|
case "$platform" in
|
||||||
apl)
|
apl)
|
||||||
PLAT_CONFIG='intel_adsp_cavs15'
|
PLAT_CONFIG='intel_adsp_cavs15'
|
||||||
|
@ -203,6 +206,8 @@ build()
|
||||||
cmake -B "$RIMAGE_DIR" -S modules/audio/sof/rimage
|
cmake -B "$RIMAGE_DIR" -S modules/audio/sof/rimage
|
||||||
make -C "$RIMAGE_DIR" -j"$BUILD_JOBS"
|
make -C "$RIMAGE_DIR" -j"$BUILD_JOBS"
|
||||||
|
|
||||||
|
test -z "${RIMAGE_KEY_OPT}" || RIMAGE_KEY="${RIMAGE_KEY_OPT}"
|
||||||
|
|
||||||
west sign --build-dir "$bdir" \
|
west sign --build-dir "$bdir" \
|
||||||
--tool rimage --tool-path "$RIMAGE_DIR"/rimage \
|
--tool rimage --tool-path "$RIMAGE_DIR"/rimage \
|
||||||
--tool-data modules/audio/sof/rimage/config -- -k "$RIMAGE_KEY"
|
--tool-data modules/audio/sof/rimage/config -- -k "$RIMAGE_KEY"
|
||||||
|
@ -227,7 +232,7 @@ main()
|
||||||
a) PLATFORMS=("${SUPPORTED_PLATFORMS[@]}") ;;
|
a) PLATFORMS=("${SUPPORTED_PLATFORMS[@]}") ;;
|
||||||
c) DO_CLONE=yes ;;
|
c) DO_CLONE=yes ;;
|
||||||
j) BUILD_JOBS="$OPTARG" ;;
|
j) BUILD_JOBS="$OPTARG" ;;
|
||||||
k) RIMAGE_KEY="$OPTARG" ;;
|
k) RIMAGE_KEY_OPT="$OPTARG" ;;
|
||||||
p) zeproj="$OPTARG" ;;
|
p) zeproj="$OPTARG" ;;
|
||||||
*) print_usage; exit 1 ;;
|
*) print_usage; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue