Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-gpu-driver/blob/main/build.sh # omega-gpu-driver aien-dev/omega-gpu-driver Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-gpu-driver / build.sh` 34 lines ยท 1307 bytes Raw Blame History 1 #!/bin/sh 2 # build.sh -- birth the pinned omc (tools/getomc.sh) and compile w0.om into build/w0 and the firmware 3 # input tool (gsp/sha2.om gsp/inflate.om gsp/fw.om gsp/bindata.om fwprep.om) into build/fwprep. 4 # With OGKM=, it then runs build/fwprep on the installed 5 # GSP firmware into build/fw (checked by window/d2-pre.sh against build/fw/fw.manifest). 6 # A failed step leaves no output behind. 7 set -eu 8 R=$(CDPATH= cd -- "$(dirname "$0")" && pwd) 9 cd "$R" 10 sh tools/getomc.sh 11 # compile OUT SRC... : concatenate the units and compile them into build/OUT 12 compile() { 13 out=build/$1; shift 14 rm -f "$out" "$out.tmp" 15 if ! cat "$@" | build/omc > "$out.tmp"; then rm -f "$out.tmp"; exit 1; fi 16 chmod +x "$out.tmp" 17 mv "$out.tmp" "$out" 18 echo "$out" 19 } 20 compile w0 w0.om 21 compile fwprep gsp/sha2.om gsp/inflate.om gsp/fw.om gsp/bindata.om fwprep.om 22 sh tools/buildogd.sh 23 FW=${FW:-/lib/firmware/nvidia/580.173.02/gsp_ga10x.bin} 24 if [ -n "${OGKM:-}" ]; then 25 rm -rf build/fw build/fw.tmp 26 mkdir build/fw.tmp 27 if ! build/fwprep "$FW" "$OGKM" build/fw.tmp > build/fwprep.log; then 28 rm -rf build/fw.tmp; cat build/fwprep.log >&2; exit 1 29 fi 30 mv build/fw.tmp build/fw 31 echo build/fw 32 else 33 echo "build/fw not built: set OGKM to an open-gpu-kernel-modules 580.173.02 checkout" >&2 34 fi