aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
GitHub aien-dev/aienux#99 (code only)
Apply it
git checkout -b patch-2ff4b1c5da1699fd 12d1300dd8971e7d70711e0ac071b78c510cf1c7 curl -fsSL https://interplane.io/drakestapleton/aienux/patches/2ff4b1c5da1699fd.patch | git am
Provenance
github-import 1
aien-dev/aienux
99
09f4182e6aadcd5fe209beae61f8eb6ec4858687
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":99,"url":"https://github.com/aien-dev/aienux/pull/99","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:47Z","metadata":"unavailable","state_derived":true}
Changes
diff --git a/scripts/verify_recovery_tools.sh b/scripts/verify_recovery_tools.sh index 56d08651..def6e4d4 100755 --- a/scripts/verify_recovery_tools.sh +++ b/scripts/verify_recovery_tools.sh @@ -11,18 +11,30 @@ set -euo pipefail REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "${REPO_ROOT}" -INITRD_IMG="${1:-/tmp/aienos-recovery-standalone-initrd.img}" +WORK_DIR=$(mktemp -d) +trap 'rm -rf "${WORK_DIR}"' EXIT -if [[ ! -f "${INITRD_IMG}" ]]; then +# With an argument: inspect exactly that image, and fail if it is missing +# (never substitute a freshly built one). Without: build a private copy in +# WORK_DIR, so parallel runs never share a fixed /tmp path and no stale +# user-owned file is left where a root build would later collide with it. +if [[ $# -ge 1 ]]; then + INITRD_IMG="$1" + if [[ ! -f "${INITRD_IMG}" ]]; then + echo "FAIL initrd image not found: ${INITRD_IMG}" >&2 + exit 1 + fi +else + INITRD_IMG="${WORK_DIR}/aienos-recovery-standalone-initrd.img" echo "Building standalone recovery initrd..." bash "${REPO_ROOT}/scripts/build_standalone_recovery_initrd.sh" "${INITRD_IMG}" fi -WORK_DIR=$(mktemp -d) -trap 'rm -rf "${WORK_DIR}"' EXIT +ROOT_DIR="${WORK_DIR}/root" +mkdir -p "${ROOT_DIR}" echo "Extracting ${INITRD_IMG}..." -gzip -dc "${INITRD_IMG}" | (cd "${WORK_DIR}" && cpio -idm --quiet) +gzip -dc "${INITRD_IMG}" | (cd "${ROOT_DIR}" && cpio -idm --quiet) FAILED=0 check() { @@ -34,9 +46,9 @@ check() { fi } -have_file() { [[ -f "${WORK_DIR}/$1" || -x "${WORK_DIR}/$1" || -L "${WORK_DIR}/$1" ]] && echo 1 || echo 0; } -init_has() { grep -q -- "$1" "${WORK_DIR}/init" 2>/dev/null && echo 1 || echo 0; } -module_packaged() { grep -qxF "$1.ko" "${WORK_DIR}/etc/aienos-modules.order" 2>/dev/null && echo 1 || echo 0; } +have_file() { [[ -f "${ROOT_DIR}/$1" || -x "${ROOT_DIR}/$1" || -L "${ROOT_DIR}/$1" ]] && echo 1 || echo 0; } +init_has() { grep -q -- "$1" "${ROOT_DIR}/init" 2>/dev/null && echo 1 || echo 0; } +module_packaged() { grep -qxF "$1.ko" "${ROOT_DIR}/etc/aienos-modules.order" 2>/dev/null && echo 1 || echo 0; } echo "" echo "-- required tools for NVMe root mount --" @@ -62,7 +74,7 @@ check "chroot present" "$(have_file bin/chroot)" echo "" echo "-- init hooks --" -check "init is executable" "$([[ -x "${WORK_DIR}/init" ]] && echo 1 || echo 0)" +check "init is executable" "$([[ -x "${ROOT_DIR}/init" ]] && echo 1 || echo 0)" check "init keeps zero-disk test mode (aienos.test=1)" "$(init_has 'aienos.test=1')" check "init reports EFI boot entries (efibootmgr)" "$(init_has 'efibootmgr')" check "init drops into an interactive maintenance shell" "$(init_has 'exec /bin/sh')"