Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions scripts/xtensa-build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ then
echo " [-u] Force UP ARCH"
echo " [-d] Enable debug build"
echo " [-c] Configure defconfig"
echo " [-k] Use private key"
echo " [-j [n]] Set number of make build jobs." \
"Jobs=#cores when no flag. Inifinte when no arg."
echo " Supported platforms ${SUPPORTED_PLATFORMS[@]}"
Expand Down Expand Up @@ -47,6 +48,10 @@ else
then
MAKE_MENUCONFIG=yes

elif [[ "$args" == "-k" ]]
then
USE_PRIVATE_KEY=yes

# Build all platforms
elif [[ "$args" == "-a" ]]
then
Expand Down Expand Up @@ -79,6 +84,16 @@ then
exit 1
fi

if [ "x$USE_PRIVATE_KEY" == "xyes" ]
then
if [ -z ${RIMAGE_PRIVATE_KEY+x} ]
then
echo "Error: No variable specified for RIMAGE_PRIVATE_KEY"
exit 1
fi
PRIVATE_KEY_OPTION="-DRIMAGE_PRIVATE_KEY=${RIMAGE_PRIVATE_KEY}"
fi

# fail on any errors
set -e

Expand Down Expand Up @@ -252,6 +267,7 @@ do
cmake -DTOOLCHAIN=$TOOLCHAIN \
-DROOT_DIR=$ROOT \
-DCMAKE_VERBOSE_MAKEFILE=ON \
${PRIVATE_KEY_OPTION} \
..

make ${PLATFORM}_defconfig
Expand Down
9 changes: 6 additions & 3 deletions src/arch/xtensa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ add_custom_target(
USES_TERMINAL
)

if(NOT DEFINED RIMAGE_PRIVATE_KEY)
set(RIMAGE_PRIVATE_KEY ${PROJECT_SOURCE_DIR}/rimage/keys/otc_private_key.pem)
endif()

if(MEU_PATH)
execute_process(
COMMAND ${MEU_PATH}/meu -ver
Expand All @@ -301,16 +305,14 @@ if(MEU_PATH)
set(MEU_OFFSET 1088)
endif()

set(otc_private_key ${PROJECT_SOURCE_DIR}/rimage/keys/otc_private_key.pem)
Comment thread
plbossart marked this conversation as resolved.
Outdated

add_custom_target(
run_rimage
COMMAND ${PROJECT_BINARY_DIR}/rimage_ep/build/rimage
-o sof-${fw_name}.ri
-p sof-${fw_name}.ldc
-m ${fw_name}
-s ${MEU_OFFSET}
-k ${otc_private_key}
-k ${RIMAGE_PRIVATE_KEY}
${bootloader_binary_path}
sof-${fw_name}
DEPENDS sof_dump
Expand Down Expand Up @@ -340,6 +342,7 @@ else()
-o sof-${fw_name}.ri
-p sof-${fw_name}.ldc
-m ${fw_name}
-k ${RIMAGE_PRIVATE_KEY}
${bootloader_binary_path}
sof-${fw_name}
DEPENDS sof_dump
Expand Down