interplane.Get Omega
Read in your language

omega-gpu-driver

aien-dev/omega-gpu-driver

Brought by drakestapleton

branch main Branches Tags History

omega-gpu-driver / tools / getirqomc.sh

17 lines · 860 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3# Same seed birth/hash convention as getomc.sh, isolated from its existing compiler and gates.
4set -eu
5R=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
6. "$R/tools/irq-omc.pin"
7mkdir -p "$R/build"
8ok() { [ -x "$1" ] && [ "$(sha256sum "$1" | cut -d' ' -f1)" = "$OMC_SHA256" ]; }
9if ok "$R/build/irq-omc"; then exit 0; fi
10if [ -n "${AIEN_IRQ_OMC:-}" ] && ok "$AIEN_IRQ_OMC"; then cp "$AIEN_IRQ_OMC" "$R/build/irq-omc"; exit 0; fi
11S="$R/build/irq-omega-src"
12if [ ! -d "$S/.git" ]; then git clone -q "$OMEGA_REPO" "$S"; fi
13git -C "$S" fetch -q origin "$OMEGA_COMMIT"
14git -C "$S" checkout -q --detach "$OMEGA_COMMIT"
15(cd "$S" && sh seed/omega-from-seed.sh >/dev/null)
16ok "$S/seed/out/omc" || { echo 'getirqomc: compiler does not match IRQ pin' >&2; exit 1; }
17cp "$S/seed/out/omc" "$R/build/irq-omc"