Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to define PX4 signing key via env. variable #551

Merged
merged 1 commit into from
Nov 7, 2023
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
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
1 change: 1 addition & 0 deletions clone_public.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -euo pipefail
while read -r repo
do
[[ "${repo}" == *saluki-?? ]] || \
[[ "${repo}" == *saluki-sec-scripts ]] || \
[[ "${repo}" == *pfsoc_crypto ]] || \
[[ "${repo}" == *pfsoc_keystore ]] || \
[[ "${repo}" == *pf_crypto ]] || \
Expand Down
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