---
title: "SoM Releases & Provisioning"
description: "Every SoM ships from production test with a flashed bootloader stack, a system image, and a programmed EEPROM identity — all drawn from a versioned, signed SoM-release bundle. This page covers what a bundle is, how to verify its provenance, and how a module is provisioned from one."
source: https://docs.alplab.ai/sdk/som-release-verification
---

# SoM Releases — Verification & Provisioning

Every SoM ships from production test with a flashed bootloader stack, a system image, and a programmed EEPROM identity — all drawn from a versioned, signed **SoM-release bundle**. This page covers what a bundle is, how to verify its provenance, and how a module is provisioned from one.

This is *supply-chain provenance* — it is **not** the device secure-boot chain, which signs bootable firmware images with a different, device-scoped key (MCUboot; on E1M-X V2N / V2N-M1 anchored in the OPTIGA Trust M secure element — E1M-AEN R3 has no secure element).

## The release bundle

A bundle is a directory with a manifest (`bundle.json`, schema `som-release-bundle-v1`) plus the component binaries. The manifest records:

| Field | What it carries |
|-------|-----------------|
| `sku` / `family` / `hw_rev` | Which module this release targets (e.g. `E1M-V2N101`, `v2n`, `r1`). |
| `sku` constraints | `E1M-AEN…` / `E1M-V2N…` / `E1M-V2M…` only; `family` is `aen`, `v2n` or `v2n-m1` (the i.MX 93 values were removed in v0.17.0). |
| `release_version` | Semantic release id, `som-X.Y.Z` — or, as of v0.17.0, `som-X.Y.Z-rcN` for a release candidate staged for bench provisioning before promotion. |
| `status` | `complete`, or `bootloader-only:image-pending-hw` for early bundles. |
| `components[]` | One row per artefact — `role`, `file`, `sha256`, `size_bytes`, `flash_target`, and an optional `version`. Every bundle carries a `bl2` and a `fip`; roles must be unique (see below). |
| `memory_tier` | Optional (new in v0.17.0): the DRAM tier the BL2 images were built for — `dram_mbit`, plus a `label`, since two tiers can share one `dram_mbit`. One leg of the provisioning DDR-tier check. |
| `provenance` | Build reproducibility pins: toolchain, U-Boot / TF-A source revisions, defconfig, applied patches. |
| `signature` | ECDSA-P256 provenance signature (or `null` on early, pre-signing bundles). |

### Component roles

| `role` | `flash_target` | What it is |
|---|---|---|
| `bl2` | `xspi:mtd0` / `xspi:mtd1` | First-stage bootloader (xSPI boot) |
| `fip` | `xspi:mtd0` / `xspi:mtd1` | TF-A / U-Boot firmware image package |
| `system_image` | `emmc` | The system image (`.wic`) |
| `system_image_bmap` | `emmc` (never flashed on its own) | Optional `.wic.bmap` of the system image: when present, the V2N flow writes and verifies only the mapped ranges |
| `bl2_mmc` | `emmc:boot1` (and only this role) | The eMMC-boot BL2, written to eMMC boot partition 1 by the V2N flow |
| `cm33` | `xspi:mtd1` | Optional CM33 firmware as BL2 loads it — the stored, padded image (Zephyr's `zephyr.bin` behind a zero pad); nothing verifies it at boot |
| `dxm1_fw` (requires `version`), `dxm1_fw_uart_boot`, `dxm1_dxflash`, `dxm1_dtb`, `dxm1_dxcli` | `dxm1` | Optional, V2M (`v2n-m1`) only: the licence-gated DEEPX DX-M1 NPU programming set. The binaries live only in the private bundle; the schema is the public contract. |

Everything except `bl2`, `fip` and `system_image` was added in v0.17.0.

## Verifying provenance

Bundles are signed with Alp Lab's ECDSA P-256 **release-signing key**. The public half is published in the SDK repo at `keys/alp_release_signing_ecdsa_p256.pub.pem`; the `key_id` in the signature block (first 16 hex chars of `SHA-256(DER(public key))`, currently `8be383f850354f40`) lets verification match the right key across rotations.

The signature is computed over the manifest in canonical JSON form (with `signature: null`, sorted keys, compact separators), digested with SHA-256. Since the manifest already records the SHA-256 of every component, one signature transitively attests the whole release.

```bash
python scripts/check_som_bundle.py \
    --bundle releases/E1M-V2N101/som-0.2.0/bundle.json \
    --require-signature
```

- Without `--require-signature`, an unsigned bundle still passes — early bundles such as `som-0.1.0` predate signing. With it, unsigned is a failure.
- `--pubkey <PEM>` verifies against a specific key instead of the published default (useful during key rotation).
- A tampered manifest, an invalid signature, or an unloadable key fails with a clear `FAIL …` line and a non-zero exit code.
- Checks a JSON Schema can't express also fail the bundle (v0.17.0): a duplicated component `role`; a `system_image_bmap` that isn't a valid bmap or whose image size doesn't match the decompressed (gunzipped) `system_image`; and a `cm33` image that fails the flash runner's sanity checks. The file checks run only when the component files sit beside `bundle.json` — a manifest on its own has nothing to open.

Programmatic verification (verify-only module, no private key involved):

```python
import som_signing  # scripts/som_signing.py
pub = som_signing.load_public_key_file("keys/alp_release_signing_ecdsa_p256.pub.pem")
assert som_signing.verify_signature(bundle_dict, pub)
```

Key rotation is non-disruptive: `verify_with_keys(doc, [pub1, pub2, …])` accepts any trusted key, so already-shipped bundles stay verifiable against the retained old key during the overlap window.

### GD32 bridge firmware releases

The public [`alplabai/gd32-bridge-firmware`](https://github.com/alplabai/gd32-bridge-firmware) releases sign their recovery images with the **same** release-signing key: `SHA256SUMS` and each `.bin` carry a detached ECDSA-P256 / SHA-256 `.sig`. Verify the checksum file against the published key, then the images against it:

```bash
openssl dgst -sha256 -verify keys/alp_release_signing_ecdsa_p256.pub.pem \
    -signature SHA256SUMS.sig SHA256SUMS
sha256sum -c SHA256SUMS
```

A release built without the signing key is labelled `UNSIGNED` and carries checksums only.

## Provisioning a module

`scripts/provision_som.py` has two forms.

**V2N / V2M modules** (bundle `family` `v2n` or `v2n-m1`) use a step machine, new in v0.17.0: `provision_som.py plan | run | status`. `plan` is a dry run (read-only probes only); `run` is a dry run unless `--execute` is given; `status` reports a unit's recorded state and, with `--require-shippable`, exits non-zero when the ship check is blocked. The unit is brought up from blank silicon over the SoC's SCIF download mode, and every production write — xSPI, eMMC boot partition, eMMC user area, EEPROM, GD32 bridge firmware, the 64-byte Secure Data Page — is then done from Linux running on the module. The Secure Data Page is written and verified during `run --execute`; locking it is a separate, explicit `run --lock`. Bench-specific inputs (the bench description, DDR-tier markers, expected PMIC registers, the ledger) are passed in by path from private storage; nothing in the public SDK names a bench or a unit. `run --hw-rev <key>` records a unit whose hardware revision differs from the bundle default, and accepts only a key whose status is `production`.

**Other families** keep the flat form, a linear, stop-on-first-failure sequence:

1. **Validate** the bundle (`check_som_bundle.py`).
2. **Flash** — `bl2`/`fip` to xSPI via the `renesas_flashwriter_scif` backend, which **only plans** the write (a confirmed write is refused — the V2N step machine drives the Flash Writer), and the system image to eMMC via `yocto_wic`. The system image is skipped for `bootloader-only` bundles, and a `bl2_mmc` (`emmc:boot1`) component is reported as skipped, since only the V2N flow writes it.
3. **EEPROM** — allocate a serial number and build the 128-byte [hardware-info manifest](https://docs.alplab.ai/sdk/api/hw-info). The write and read-back verify are hardware-gated: this step **plans** them, even under `--execute`.
4. **Power-on test** — run the board's HIL smoke suite, gated on `alp_hw_info_read()` succeeding first. With no HiL spec configured, the step is reported as skipped.
5. **Record** the unit to the production ledger — `pass`, `fail`, or `pending-hw` (dry run, no test configured, or a test skipped under `--execute`). A dry run never records `fail`.

Provisioning rewrites the bootloader, wipes eMMC, and programs the EEPROM — so the tool **dry-runs by default**, printing exactly what each step would do. Pass `--execute` to perform the real operations:

```bash
python scripts/provision_som.py --execute \
    --bundle <bundle> --port COM24 \
    --flash-writer <Flash_Writer_SCIF_RZV2N_DEV_LPDDR4X.mot> \
    --emmc-device /dev/sdX --hil-spec tests/hil/v2n101-x-evk \
    --station bench1 --by <technician>
```

## Build provenance — a separate layer

Don't confuse the SoM-release bundle above with **build** provenance. The bundle attests *what Alp Lab flashed onto a module in production*. These attest *what a build was made from* — including your own builds:

| Artefact | Attests | Shape |
|---|---|---|
| **build-receipt-v1** | One release build: SDK source revision, `board.yaml` / `alp.lock` / build-plan digests, toolchain identity, per-image SHA-256s | JSON, `metadata/schemas/build-receipt-v1.schema.json` |
| **SBOM** | The dependency tree the build consumed — the SDK plus its west projects and curated libraries | CycloneDX 1.5, from `scripts/gen_sbom.py` |
| **`alp.lock`** | The pinned resolution the other two are derived from | JSON, via [`west alp-lock`](https://docs.alplab.ai/sdk/tools/cli#west-alp-lock) |

The design rule these share: **no wall-clock**. The receipt carries no timestamp field, and the SBOM's serial number is derived from the lock's own digest rather than the current time. So identical inputs yield a **byte-identical** receipt and SBOM — which is what makes them diffable and worth comparing across two builds that should have matched.

Releases build a byte-reproducible source tarball (`git archive … | gzip -n`, which suppresses the timestamp gzip would otherwise embed) and attach the SBOM plus SLSA provenance alongside it.

## See also

- [`<alp/hw_info.h>`](https://docs.alplab.ai/sdk/api/hw-info) — reading the EEPROM identity at boot
- [`v2n-board-id-readout`](https://docs.alplab.ai/sdk/examples/v2n/v2n-board-id-readout) — handling unprovisioned units
- [Production deployment example](https://docs.alplab.ai/sdk/examples/production-deployment) — secure boot + OTA + attestation on top of a provisioned module
- SDK repo: [`docs/som-release-signing.md`](https://github.com/alplabai/alp-sdk/blob/main/docs/som-release-signing.md), [`docs/provisioning.md`](https://github.com/alplabai/alp-sdk/blob/main/docs/provisioning.md)
