boot3-run.scm (1588B)
1 ;; boot3 run.scm — drive cc.scm → tcc0 inside the seed kernel. 2 ;; Mirrors the podman path's run.sh exactly. Reads use in/<name>; 3 ;; writes use out/<name>. Both drivers see the same flat namespace. 4 5 (define (must r tag) 6 (if (and (car r) (= 0 (cdr r))) 7 r 8 (begin 9 (write-string stderr "boot3: step failed: ") 10 (write-string stderr tag) 11 (write-string stderr "\n") 12 (exit 1)))) 13 14 (write-string stdout "boot3: catm cc-bundle\n") 15 (must (run "in/catm" "out/cc-bundled.scm" "in/prelude.scm" "in/cc.scm" "in/main.scm") 16 "catm cc-bundle") 17 (write-string stdout "boot3: scheme1 libc\n") 18 (must (run "in/scheme1" "out/cc-bundled.scm" "--lib=libc__" "in/libc.flat.c" "out/libc.P1pp") 19 "scheme1 libc") 20 (write-string stdout "boot3: scheme1 tcc\n") 21 (must (run "in/scheme1" "out/cc-bundled.scm" "--lib=tcc__" "in/tcc.flat.c" "out/tcc.flat.P1pp") 22 "scheme1 tcc") 23 (write-string stdout "boot3: catm combined.M1pp\n") 24 (must (run "in/catm" "out/combined.M1pp" 25 "in/backend.M1pp" "in/frontend.M1pp" "in/libp1pp.P1pp" 26 "in/entry-libc.P1pp" "out/libc.P1pp" "out/tcc.flat.P1pp" "in/elf-end.P1pp") 27 "catm combined.M1pp") 28 (write-string stdout "boot3: M1pp\n") 29 (must (run "in/M1pp" "out/combined.M1pp" "out/expanded.hex2pp") 30 "M1pp") 31 (write-string stdout "boot3: catm linked.hex2pp\n") 32 (must (run "in/catm" "out/linked.hex2pp" "in/ELF.hex2" "out/expanded.hex2pp") 33 "catm linked.hex2pp") 34 (write-string stdout "boot3: hex2pp\n") 35 (must (run "in/hex2pp" "-B" "0x600000" "out/linked.hex2pp" "out/tcc0") 36 "hex2pp") 37 38 (exit 0)