Skip to content

Commit

Permalink
Add support to define PX4 signing key via env. variable
Browse files Browse the repository at this point in the history
If SIGNING_ARGS environment variable is defined, build script uses its value
as a signing key location.

Also a new submodule saluki-sec-scripts is added. If SIGNING_ARGS is not
defined test keys are used under Tools/saluki-sec-scripts/test_keys/

saluki-sec-scripts contains also signing tools and second set of keys
(custom_keys), which are used in FPGA secure boot builds.

Signed-off-by: Tero Salminen <[email protected]>
  • Loading branch information
t-salminen authored and jlaitine committed Nov 7, 2023
1 parent ead54c4 commit 583cd6f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,6 @@
[submodule "platforms/nuttx/src/px4/common/process"]
path = platforms/nuttx/src/px4/common/process
url = [email protected]:tiiuae/px4-kernel.git
[submodule "Tools/saluki-sec-scripts"]
path = Tools/saluki-sec-scripts
url = [email protected]:tiiuae/saluki-sec-scripts.git
1 change: 1 addition & 0 deletions Tools/saluki-sec-scripts
Submodule saluki-sec-scripts added at 99b6a0
11 changes: 9 additions & 2 deletions packaging/build_px4fw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ else
# use the PX4 default signing script and keys
if [[ $NAME = saluki* ]]
then
export SIGNING_TOOL=boards/ssrc/saluki-v1/tools/ed25519_sign.py
export SIGNING_ARGS=boards/ssrc/$NAME/tools/ed25519_test_key.pem
export SIGNING_TOOL=Tools/saluki-sec-scripts/ed25519_sign.py

if [ -z "$SIGNING_ARGS" ]; then
export SIGNING_ARGS=Tools/saluki-sec-scripts/test_keys/$NAME/ed25519_test_key.pem
fi
else
export SIGNING_TOOL=Tools/cryptotools.py
unset SIGNING_ARGS
Expand All @@ -31,5 +34,9 @@ else
rm -Rf build/${arg}
# Build
make ${arg}

if [ -n "$SIGNING_ARGS" ]; then
echo "Signing key: $SIGNING_ARGS"
fi
done
fi

0 comments on commit 583cd6f

Please sign in to comment.