1 Commits

Author SHA1 Message Date
Alex Efimov
c21e0dafd7 Correctly initialize and update git submodules for IDF in autobuild.sh
Fixing autobuild script so ESP32 binaries now built correctly
2026-01-26 05:03:24 +01:00
7 changed files with 18 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ set(SOURCES ${SOURCES}
${CMAKE_CURRENT_LIST_DIR}/src/hsm/kek.c ${CMAKE_CURRENT_LIST_DIR}/src/hsm/kek.c
) )
SET_VERSION(ver_major ver_minor "${CMAKE_CURRENT_LIST_DIR}/src/hsm/version.h" 3) SET_VERSION(ver_major ver_minor "${CMAKE_CURRENT_LIST_DIR}/src/hsm/version.h" 2)
if(ESP_PLATFORM) if(ESP_PLATFORM)
project(pico_hsm) project(pico_hsm)

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
VERSION_MAJOR="6" VERSION_MAJOR="6"
VERSION_MINOR="4" VERSION_MINOR="2"
SUFFIX="${VERSION_MAJOR}.${VERSION_MINOR}" SUFFIX="${VERSION_MAJOR}.${VERSION_MINOR}"
#if ! [[ -z "${GITHUB_SHA}" ]]; then #if ! [[ -z "${GITHUB_SHA}" ]]; then
# SUFFIX="${SUFFIX}.${GITHUB_SHA}" # SUFFIX="${SUFFIX}.${GITHUB_SHA}"

View File

@@ -9,7 +9,6 @@ CONFIG_TINYUSB_TASK_STACK_SIZE=16384
CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="pico-keys-sdk/config/esp32/partitions.csv" CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="pico-keys-sdk/config/esp32/partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="pico-keys-sdk/config/esp32/partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="pico-keys-sdk/config/esp32/partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x10000
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y

View File

@@ -37,6 +37,19 @@ uint8_t mkek_mask[MKEK_KEY_SIZE];
bool has_mkek_mask = false; bool has_mkek_mask = false;
uint8_t pending_save_dkek = 0xff; uint8_t pending_save_dkek = 0xff;
#define POLY 0xedb88320
uint32_t crc32c(const uint8_t *buf, size_t len) {
uint32_t crc = 0xffffffff;
while (len--) {
crc ^= *buf++;
for (int k = 0; k < 8; k++) {
crc = (crc >> 1) ^ (POLY & (0 - (crc & 1)));
}
}
return ~crc;
}
void mkek_masked(uint8_t *mkek, const uint8_t *mask) { void mkek_masked(uint8_t *mkek, const uint8_t *mask) {
if (mask) { if (mask) {
for (int i = 0; i < MKEK_KEY_SIZE; i++) { for (int i = 0; i < MKEK_KEY_SIZE; i++) {

View File

@@ -18,7 +18,7 @@
#ifndef __VERSION_H_ #ifndef __VERSION_H_
#define __VERSION_H_ #define __VERSION_H_
#define HSM_VERSION 0x0604 #define HSM_VERSION 0x0602
#define HSM_VERSION_MAJOR ((HSM_VERSION >> 8) & 0xff) #define HSM_VERSION_MAJOR ((HSM_VERSION >> 8) & 0xff)
#define HSM_VERSION_MINOR (HSM_VERSION & 0xff) #define HSM_VERSION_MINOR (HSM_VERSION & 0xff)

View File

@@ -29,6 +29,7 @@ sudo apt install -y git wget flex bison gperf python3 python3-pip python3-venv c
git clone --recursive https://github.com/espressif/esp-idf.git git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf cd esp-idf
git checkout tags/v5.5 git checkout tags/v5.5
git submodule update --init --recursive
./install.sh esp32s3 ./install.sh esp32s3
. ./export.sh . ./export.sh
cd .. cd ..