mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-17 02:54:22 +00:00
84 lines
3.2 KiB
Plaintext
84 lines
3.2 KiB
Plaintext
# ZephCore RNG selftest — minimal config.
|
|
#
|
|
# Exercises the REAL ZephyrRNG::mixIdentitySeed path, so it needs exactly what
|
|
# that function needs and nothing else: a CSPRNG, hwinfo, and PSA crypto for
|
|
# the AES-256-CTR conditioning step.
|
|
|
|
# Entropy / CSPRNG — sys_csrand_get().
|
|
#
|
|
# CONFIG_CSPRNG_ENABLED is NOT set here: it is a promptless result symbol
|
|
# ("default y depends on ENTROPY_HAS_DRIVER", subsys/random/Kconfig) that
|
|
# reports whether a real hardware entropy driver made it into the build.
|
|
# Assigning it directly is a Kconfig error. Ask for the driver instead and let
|
|
# it resolve — ZephyrRNG.cpp BUILD_ASSERTs on the result, so a platform without
|
|
# one fails loudly at compile time rather than silently testing a stub.
|
|
CONFIG_ENTROPY_GENERATOR=y
|
|
CONFIG_CSPRNG_NEEDED=y
|
|
|
|
# hwinfo — stage 2 device ID
|
|
CONFIG_HWINFO=y
|
|
|
|
# Portable CPU cycle counter — fast clock of the universal two-clock beat.
|
|
# Must match the node (zephcore_common.conf) so the tool tests the real path.
|
|
CONFIG_TIMING_FUNCTIONS=y
|
|
|
|
# PSA crypto — mirrors boards/common/zephcore_common.conf. mixIdentitySeed
|
|
# conditions the pool with SHA-256 + AES-256-ECB via PSA; without these the
|
|
# extraction step fails and the function panics.
|
|
CONFIG_MBEDTLS=y
|
|
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
|
|
CONFIG_PSA_WANT_ALG_SHA_256=y
|
|
CONFIG_PSA_WANT_ALG_ECB_NO_PADDING=y
|
|
CONFIG_PSA_WANT_KEY_TYPE_AES=y
|
|
|
|
# sys_reboot() — Utils::cryptoPanicReboot() calls it when AES-CTR extraction
|
|
# fails or the seed comes out degenerate. Kept live rather than stubbed: that
|
|
# panic is part of the behaviour under test, and a tool that silently continued
|
|
# past it would report a pass on a seed the node would have refused.
|
|
CONFIG_REBOOT=y
|
|
|
|
# C++ — ZephyrRNG and Utils are C++
|
|
CONFIG_CPP=y
|
|
CONFIG_STD_CPP17=y
|
|
CONFIG_REQUIRES_FULL_LIBC=y
|
|
|
|
# Console only. No log subsystem: mixIdentitySeed reports via printk, which
|
|
# keeps the tool's output identical to what the node prints.
|
|
CONFIG_SERIAL=y
|
|
CONFIG_CONSOLE=y
|
|
CONFIG_UART_CONSOLE=y
|
|
CONFIG_PRINTK=y
|
|
CONFIG_LOG=n
|
|
|
|
# CONFIG_ASSERT stays off: on ESP32 the Espressif blob trips false kswap.h
|
|
# assertions, and this tool has no reason to differ from the node.
|
|
CONFIG_ASSERT=n
|
|
|
|
# Main thread needs room for the 512-byte pool, the 256-byte distinct_bytes
|
|
# table and the jitter histogram, plus the fingerprint scratch in main().
|
|
CONFIG_MAIN_STACK_SIZE=4096
|
|
|
|
# NOTE: no CONFIG_BUILD_OUTPUT_UF2 here. UF2 is an nRF52-with-bootloader thing
|
|
# and needs a code partition to derive its base address; ESP32 has no UF2
|
|
# family at all and fails uf2conv outright. It lives in the per-board conf
|
|
# (boards/rak4631/board.conf) instead. ESP32 flashes with `west flash`.
|
|
|
|
# USB CDC ACM console — nRF52840 boards (RAK4631) route console over USB
|
|
# because the UART pins are not reachable on a plain base board. Harmless on
|
|
# ESP32, which uses its own console and ignores these.
|
|
CONFIG_USB_DEVICE_STACK_NEXT=y
|
|
CONFIG_UART_LINE_CTRL=y
|
|
CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=y
|
|
CONFIG_CDC_ACM_SERIAL_ENABLE_AT_BOOT=y
|
|
|
|
# Explicitly off — this tool must not touch the radio, storage or BLE. In
|
|
# particular it must never mount /lfs: it does not read or write any stored
|
|
# identity, so a device under test keeps whatever it already had.
|
|
CONFIG_BT=n
|
|
CONFIG_FLASH=n
|
|
CONFIG_FILE_SYSTEM=n
|
|
CONFIG_SPI=n
|
|
CONFIG_I2C=n
|
|
CONFIG_SENSOR=n
|
|
CONFIG_GNSS=n
|