diff options
author | xengineering <me@xengineering.eu> | 2025-04-06 13:38:24 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2025-04-06 13:39:29 +0200 |
commit | 9f75ad79c0df9035bcdfd11011ba475cc80ad50a (patch) | |
tree | 47ec9c6a0367b4790f8cb4da08979159492f138e /fw/btl/configure.py | |
parent | 28576b0bdb6b6e08b186c2919bbed4393b38bb7f (diff) | |
download | iot-contact-9f75ad79c0df9035bcdfd11011ba475cc80ad50a.tar iot-contact-9f75ad79c0df9035bcdfd11011ba475cc80ad50a.tar.zst iot-contact-9f75ad79c0df9035bcdfd11011ba475cc80ad50a.zip |
fw: btl: Configure with Python script
To use a more readable scripting language and keep portability the POSIX
shell script for Zephyr configuration is replaced by Python.
Diffstat (limited to 'fw/btl/configure.py')
-rwxr-xr-x | fw/btl/configure.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/fw/btl/configure.py b/fw/btl/configure.py new file mode 100755 index 0000000..a1f6e38 --- /dev/null +++ b/fw/btl/configure.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 + + +import subprocess +import sys + + +source_tree = sys.argv[1] +build_tree = sys.argv[2] +board = sys.argv[3] +zephyr_base = sys.argv[4] +zephyr_modules = sys.argv[5] +extra_conf_file = sys.argv[6] +signing_key_file = sys.argv[7] + + +subprocess.run( + [ + "cmake", + f"-S{source_tree}", + f"-B{build_tree}", + f"-DBOARD={board}", + f"-DZEPHYR_BASE={zephyr_base}", + f"-DZEPHYR_MODULES={zephyr_modules}", + f"-DEXTRA_CONF_FILE={extra_conf_file}", + f"-DCONFIG_BOOT_SIGNATURE_KEY_FILE=\"{signing_key_file}\"" + ], + shell=False, + check=True, +) |