interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / crates / aienos-artifact-tool / fixtures / p2_6 / pack.sh

21 lines · 905 bytes Raw Blame History
1#!/usr/bin/env bash
2# Pack and sign the first SEED-0B capability artifact with the TEST ONLY
3# SEED-0B identity into OUT_DIR/P26SEED.AIEN and append "NAME ARTIFACT_ID"
4# to OUT_DIR/ids.txt.
5#
6# TOOL must be a debug aienos-artifact-tool built with
7# --features seed0b-test-signing (release builds refuse that feature).
8set -euo pipefail
9
10here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11tool="${1:?usage: pack.sh TOOL OUT_DIR}"
12out="${2:?usage: pack.sh TOOL OUT_DIR}"
13mkdir -p "${out}"
14touch "${out}/ids.txt"
15
16"${tool}" pack "${here}/p26seed/manifest.json" "${here}/p26seed/code.bin" \
17 "${here}/p26seed/data.bin" "${out}/p26seed.unsigned.aien" >/dev/null
18"${tool}" sign "${out}/p26seed.unsigned.aien" "${out}/P26SEED.AIEN" >/dev/null
19rm -f "${out}/p26seed.unsigned.aien"
20"${tool}" verify "${out}/P26SEED.AIEN" >/dev/null
21echo "P26SEED.AIEN $("${tool}" id "${out}/P26SEED.AIEN")" >>"${out}/ids.txt"