Secure boot (Hive-M)
Full chain: eFUSE PPK hash → RSA-signed BOOT.bin (FSBL, PMUFW, ATF, u-boot, dtb via bootgen) → signed FIT (kernel + dtb) verified by u-boot → RAUC-signed rootfs → buildsign-signed update archives.
Detailed device-side documentation: sw/SECURE_BOOT.md in a hive-m project (template: src/templates/hive-m/sw/SECURE_BOOT.md).
Setup
buildhive secure-boot keygen # generate keys/ (once)
# set "secure_boot": true in project.json (sw section)
buildhive build sw
buildhive secure-boot ppk-hash # -> images/ppk0_hash.txt for eFUSE provisioning
Keys (keys/, gitignored)
| File | Type | Use |
|---|---|---|
psk.pem | RSA-4096 | Primary secret key; PPK hash burned into eFUSEs. |
ssk.pem | RSA-4096 | Secondary secret key; signs BOOT.bin partitions. |
fit.key / fit.crt | RSA-2048, 30-year self-signed cert | FIT image signing; pubkey injected into u-boot control dtb. |
keygen --force overwrites - devices fused to the old PSK become unbootable.
Effect of sw.secure_boot: true
- Build fails if
keys/psk.pemis missing. require .../meta-ntl-hive/conf/secure-boot.confadded tolocal.conf. That conf setsSECURE_BOOT=1, the bootgen BIF (bh_auth_enableso signed images still boot unfused silicon; per-partition RSA authentication; bitstream deliberately unauthenticated),kernel-fitimage,UBOOT_SIGN_ENABLE=1,FIT_SIGN_ALG=rsa2048.device-tree.bbappendinjects the FIT public key into u-boot's control dtb withrequired="conf"- u-boot rejects unsigned FITs.- Update archive component set switches to
raucb fitimage bootscr bootbin(signed FIT replaces raw Image/dtb).
sw.secure_boot: false strips the require line from local.conf on the next run.
eFUSE provisioning
secure-boot ppk-hash runs bootgen (-efuseppkbits) against the deployed FSBL and the PSK → images/ppk0_hash.txt. Burn PPK0 hash + RSA_EN per the device documentation. After RSA_EN is fused, the device only boots BOOT.bin images signed with the matching PSK/SSK.