Skip to content

Commit f79e362

Browse files
Filip Jagodzinskiurutva
authored andcommitted
build: Resolve certificate and key paths
Since both the certificate path and the private key path are forwarded to CMake, the user is asked to specify them as absolute. Build process fails when either of these is a local path instead. Unfortunately, although our build script checks for existence of both files, the check is not done from CMake's point of view. As a result, the build error seen by the user is hard to understand (no known rule to make a missing ninja target). Resolve both AWS certificate path and AWS private key path to prevent the unhelpful error message from showing up, and make the build script more flexible by giving users option to use local paths as well as absolute paths for PEM files. Signed-off-by: Filip Jagodzinski <[email protected]>
1 parent d333f95 commit f79e362

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

release_changes/202401221030.change

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build: Resolve certificate and key paths.

tools/scripts/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ Options:
7474
-s,--audio Audio source (ROM | VSI)
7575
--toolchain Compiler (GNU or ARMCLANG)
7676
--configure-only Create build tree but do not build
77-
--certificate_path The full path for the AWS device certificate
78-
--private_key_path The full path for the AWS device private key
77+
--certificate_path Path to the AWS device certificate
78+
--private_key_path Path to the AWS device private key
7979
Examples:
8080
blinky, aws-iot-example, freertos-iot-libraries-tests, keyword-detection, speech-recognition
8181
EOF
@@ -124,11 +124,11 @@ do
124124
shift 2
125125
;;
126126
--certificate_path )
127-
CERTIFICATE_PATH=$2
127+
CERTIFICATE_PATH=$(realpath "$2")
128128
shift 2
129129
;;
130130
--private_key_path )
131-
PRIVATE_KEY_PATH=$2
131+
PRIVATE_KEY_PATH=$(realpath "$2")
132132
shift 2
133133
;;
134134
--configure-only )

0 commit comments

Comments
 (0)