Kern is an experimental project that explores the capabilities of the ESP32-P4 as a platform to perform air-gapped Bitcoin signatures and cryptography.
Early development uses the Waveshare ESP32-P4-WiFi6-Touch-LCD-4B.
ESP32-P4 does not contain radio (WiFi, BLE), but this board has a radio in a secondary chip (ESP32-C6 mini). Later the project will migrate to use radio-less, simpler and cheaper boards with ESP32-P4 only.
An OV5647 camera module is also required.
Checkout to an early 6.1 version which has bugfixes we need for Kern
cd <your ESP-IDF installation dir>
git checkout 44c77cbf46844cd056c923277ece745173cb270d
git submodule update --recursive
./install.sh esp32p4This project uses git submodules. You have two options:
When cloning the project for the first time, make sure to clone it recursively to include all submodules:
git clone --recursive https://github.com/odudex/Kern.gitIf you've already cloned the repository without the --recursive flag, you can initialize and update the submodules with:
git submodule update --init --recursiveBuild the project from the root directory with:
idf.py buildor flash the project to the device with:
idf.py flashand if you are debugging you may want to run monitor too:
idf.py monitorIf you have just installed, you can use the provided .justfile:
just build # Build the project
just flash # Flash to device
just clean # Clean build artifactsAfter updating ESP-IDF or switching branches with significant build changes, do a full clean to avoid stale artifacts:
idf.py fullclean
rm sdkconfig
idf.py set-target esp32p4
idf.py buildTo enable camera auto-focus, enable camera focus motor on menuconfig:
CONFIG_CAM_MOTOR_DW9714=y
CONFIG_CAMERA_OV5647_ENABLE_MOTOR_BY_GPIO0=y
Pre-release firmware is provided for testing purposes only. Do not use pre-release builds as a signer for real savings.
- Python 3
- USB cable connected to the Waveshare board
-
Download the firmware binary from the Releases page.
-
Create a Python virtual environment and install esptool:
python3 -m venv venv
source venv/bin/activate
pip install esptool- Flash the firmware:
esptool --chip esp32p4 --baud 460800 write-flash 0x0 kern-<version>.binNote: Flashing the merged binary from offset
0x0erases the entire flash range it covers, including the NVS partition where PIN and settings are stored. To preserve NVS data when updating, flash the individual binaries instead:esptool --chip esp32p4 --baud 460800 write-flash \ 0x2000 bootloader.bin \ 0x8000 partition-table.bin \ 0x20000 firmware.bin
Kern is strongly inspired by Krux, sharing similar but simplified UI elements and flow.
Blockstream Jade was a strong inspiration for the decision to use C language for efficient use of the hardware. Additionally, Kern uses the same core library Jade does, libwally, is shared with Jade.
The simplicity and UI polish of SeedSigner and the security focus of the pioneering Specter-DIY were also strong inspirations.