From 9f75ad79c0df9035bcdfd11011ba475cc80ad50a Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 6 Apr 2025 13:38:24 +0200 Subject: 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. --- fw/btl/configure.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 fw/btl/configure.py (limited to 'fw/btl/configure.py') 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, +) -- cgit v1.2.3-70-g09d2