boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

boot-run-scheme1.sh (833B)


      1 #!/bin/sh
      2 ## boot-run-scheme1.sh — in-container wrapper that runs the boot2
      3 ## scheme1 binary on USER_SRC with scheme1/prelude.scm catm'd in front.
      4 ## Caller (Make / the test runner) ensures build/$ARCH/podman/boot2/
      5 ## scheme1, build/$ARCH/podman/boot2/catm and scheme1/prelude.scm exist
      6 ## before invoking.
      7 ##
      8 ## Pipeline:
      9 ##   catm    /tmp/combined.scm scheme1/prelude.scm <user_src>
     10 ##   scheme1 /tmp/combined.scm
     11 ##
     12 ## Env: ARCH=aarch64|amd64|riscv64
     13 ## Usage: boot-run-scheme1.sh <user_src>
     14 
     15 set -eu
     16 
     17 : "${ARCH:?ARCH must be set}"
     18 [ "$#" -eq 1 ] || { echo "usage: ARCH=<arch> $0 <user_src>" >&2; exit 2; }
     19 
     20 USER_SRC=$1
     21 BOOT2=build/$ARCH/podman/boot2
     22 SCHEME1=$BOOT2/scheme1
     23 CATM=$BOOT2/catm
     24 PRELUDE=scheme1/prelude.scm
     25 COMBINED=/tmp/scheme1-combined.scm
     26 
     27 "$CATM" "$COMBINED" "$PRELUDE" "$USER_SRC"
     28 exec "$SCHEME1" "$COMBINED"