|
| 1 | +# For VMs only # |
| 2 | + |
| 3 | +The Disk should be formatted with a case insensitive file system (default). |
| 4 | + |
| 5 | +Install VMWare tools daemon. |
| 6 | + |
| 7 | + - The UI is supposed to be able to do this automatically, but it's broken as of writing. |
| 8 | + - Instead, mount darwin.iso from ISO/VMWARE TOOLS and run the installer from there. |
| 9 | + - open security preferences and click "Allow" on blocked software install from VMware |
| 10 | + - reboot |
| 11 | + - make sure you can run and see: |
| 12 | + |
| 13 | + $ /Library/Application Support/VMware Tools/vmware-tools-daemon --cmd "info-get guestinfo.name" |
| 14 | + No value found |
| 15 | + |
| 16 | +# For all machine types |
| 17 | + |
| 18 | +- Turn on the computer. |
| 19 | +- Click through setup, connect to wifi, etc. |
| 20 | +- Full name: Gopher Gopherson |
| 21 | +- Account name: gopher |
| 22 | +- Password: with an exclamation mark |
| 23 | +- Decline as much as possible. |
| 24 | +- Set time zone to NY. |
| 25 | +- Open a terminal. |
| 26 | +- `sudo visudo` |
| 27 | + |
| 28 | + Change `%admin ALL=(ALL) ALL` to `%admin ALL=(ALL) NOPASSWD: ALL`. |
| 29 | + |
| 30 | +- `sudo nvram boot-args="-v"` |
| 31 | + |
| 32 | +- Install Go: download the latest tarball from go.dev/dl. |
| 33 | + |
| 34 | + `tar -xf Downloads/go*.darwin-*.tar` |
| 35 | + |
| 36 | + `mv go $HOME/goboot` |
| 37 | + |
| 38 | +Create `$HOME/stage0.sh`. |
| 39 | + |
| 40 | +**For VMs** |
| 41 | +``` |
| 42 | +#!/bin/bash |
| 43 | +while true; do (curl -v http://172.17.20.2:8713/stage0/$(sw_vers -productVersion) | sh); sleep 5; done |
| 44 | +``` |
| 45 | +**For physical machines** |
| 46 | +``` |
| 47 | +#!/bin/bash |
| 48 | +
|
| 49 | +set -x |
| 50 | +
|
| 51 | +mkdir -p ~/go/bin; |
| 52 | +while true; do |
| 53 | + url="https://storage.googleapis.com/go-builder-data/buildlet.darwin-arm64" |
| 54 | + while ! curl -f -o ~/go/bin/buildlet "$url"; do |
| 55 | + echo |
| 56 | + echo "curl failed to fetch $url" |
| 57 | + echo "Sleeping before retrying..." |
| 58 | + sleep 2 |
| 59 | + done |
| 60 | + chmod +x ~/go/bin/buildlet |
| 61 | +
|
| 62 | + mkdir -p /tmp/buildlet |
| 63 | + ~/go/bin/buildlet --coordinator=farmer.golang.org --reverse-type host-darwin-arm64-XX_0 --halt=false --workdir=/tmp/buildlet; |
| 64 | + sleep 2; |
| 65 | +done |
| 66 | +``` |
| 67 | + |
| 68 | +`chmod +x $HOME/stage0.sh` |
| 69 | + |
| 70 | +- Run Automator. |
| 71 | +- Create a new Application. |
| 72 | +- Add a "run shell script" item with the command: |
| 73 | + `open -a Terminal.app $HOME/stage0.sh` |
| 74 | +- Save it to the desktop as "run-builder". |
| 75 | + |
| 76 | +In System Preferences: |
| 77 | +- Software Update > Advanced > disable checking for updates |
| 78 | +- Desktop & Screensaver > uncheck show screensaver |
| 79 | +- Energy Saver > never turn off display, don't automatically sleep, start up after power failure |
| 80 | +- Sharing > enable ssh (leave the default administrators setting) |
| 81 | +- Users & Groups > Gopher Gopherson > Login Items > add run-builder |
| 82 | +- Users & Groups > Login Options > auto-login Gopher Gopherson |
| 83 | + |
| 84 | +Install XCode: |
| 85 | +- Download Xcode from the Apple Developer site: |
| 86 | +https://stackoverflow.com/questions/10335747/how-to-download-xcode-dmg-or-xip-file. |
| 87 | +https://developer.apple.com/support/xcode/ is a more authoritative list of versions. |
| 88 | +(You don't want to log in to your account on the machine, so don't use the App Store.) |
| 89 | +- Extract it and move the resulting Xcode folder to Applications |
| 90 | +- run xcode-select: `sudo xcode-select --switch /Applications/Xcode.app` |
| 91 | +- run `xcodebuild -version` and wait for Xcode to be verified, which will take a long time. |
| 92 | +- accept the license: `sudo xcodebuild -license accept` |
| 93 | + |
| 94 | +Put a builder key in the usual spot. |
0 commit comments