adds requirements.txt for setup (#591)

This commit is contained in:
kaczmarczyck
2023-02-08 11:36:01 +01:00
committed by GitHub
parent 8733d6585f
commit a222986995
4 changed files with 21 additions and 7 deletions

View File

@@ -745,7 +745,8 @@ class OpenSKInstaller:
nrfutil_version = __import__("nordicsemi.version").version.NRFUTIL_VERSION nrfutil_version = __import__("nordicsemi.version").version.NRFUTIL_VERSION
if not nrfutil_version.startswith("6."): if not nrfutil_version.startswith("6."):
fatal(("You need to install nrfutil python3 package v6.0 or above. " fatal(("You need to install nrfutil python3 package v6.0 or above. "
f"Found: v{nrfutil_version}")) f"Found: v{nrfutil_version}. If you use Python >= 3.11, please "
"try version 3.10."))
if not SUPPORTED_BOARDS[self.args.board].nordic_dfu: if not SUPPORTED_BOARDS[self.args.board].nordic_dfu:
fatal("This board doesn't support flashing over DFU.") fatal("This board doesn't support flashing over DFU.")

View File

@@ -25,8 +25,6 @@ following:
* python3 and pip (can be installed with the `python3-pip` package on Debian) * python3 and pip (can be installed with the `python3-pip` package on Debian)
* the OpenSSL command line tool (can be installed and configured with the * the OpenSSL command line tool (can be installed and configured with the
`libssl-dev` and `pkg-config` packages on Debian) `libssl-dev` and `pkg-config` packages on Debian)
* `nrfutil` (can be installed using `pip3 install nrfutil`) if you want to flash
a device with DFU
* `uuid-runtime` if you are missing the `uuidgen` command. * `uuid-runtime` if you are missing the `uuidgen` command.
* `llvm` if you want to use the upgradability feature. * `llvm` if you want to use the upgradability feature.
@@ -37,6 +35,11 @@ instructions to appropriate binaries for your system.
The scripts provided in this project have been tested under Linux and OS X. We The scripts provided in this project have been tested under Linux and OS X. We
haven't tested them on Windows and other platforms. haven't tested them on Windows and other platforms.
If you use Python newer than 3.10, then nrfutil for flashing over DFU is
currently not supported. Please use Python 3.10, or play around with [Nordic's
new tool](https://www.nordicsemi.com/Products/Development-tools/nrf-util)
instead.
### Compiling the firmware ### Compiling the firmware
If this is your first time installing OpenSK, please skip directly to If this is your first time installing OpenSK, please skip directly to

13
requirements.txt Normal file
View File

@@ -0,0 +1,13 @@
# General setup
tockloader == 1.5
six
intelhex
# Configure OpenSK (crypto, JTAG lockdown)
colorama
tqdm
cryptography
fido2 >= 1.0.0
# DFU install
nrfutil

View File

@@ -38,12 +38,9 @@ source tools/gen_key_materials.sh
generate_crypto_materials N generate_crypto_materials N
rustup show rustup show
pip3 install --user --upgrade 'tockloader==1.5' six intelhex pip3 install --upgrade -r requirements.txt
# Install dependency to create applications. # Install dependency to create applications.
mkdir -p elf2tab mkdir -p elf2tab
rustup install stable rustup install stable
cargo +stable install elf2tab --version 0.7.0 --root elf2tab/ cargo +stable install elf2tab --version 0.7.0 --root elf2tab/
# Install python dependencies to factory configure OpenSK (crypto, JTAG lockdown)
pip3 install --user --upgrade colorama tqdm cryptography "fido2>=1.0.0"