Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

native: bash + SHELL + jq + file for onboard Claude CLI

On the G7 user reports Claude Code CLI complains "SHELL env var isn't
set" and some Bash-tool commands don't run. Init has HOME+PATH but no
SHELL; busybox's sh applet lacks bashisms (arrays, process subs,
\$'…' escapes) that CLI internals and user commands rely on.

init: export SHELL=/bin/sh, TERM=xterm-256color, COLORTERM=truecolor,
EDITOR=/bin/vi so tty-based tools like Claude's repl get reasonable
color + editor behavior.

docker-build.sh:
- Bundle real GNU bash (from the builder image) + its shared-lib
deps at /bin/bash. Claude's Bash tool `bash -c "…"` now hits
actual bash, not busybox-pretending-to-be-sh.
- Additional busybox applets: pwd tty logger clear reset man less
more tac nl fold cmp hexdump md5sum sha256sum sha512sum base64
nslookup ping traceroute pgrep pkill timeout stty sysctl free
uptime uname usleep unzip zcat — common CLI ergonomics.
- Bundle jq, file, strace if present — common debug tools. jq is
critical for any JSON poking from the shell.

Dockerfile.builder: explicit bash + file installs so the above
always have a source in the builder image (they would mostly be
there anyway but the list is now self-documenting).

Audio: still investigating. G7 now reports 3 sdmode toggles (was
10,686) confirming the 10ms/40ms SOF buffer fix works. hw:0,0
correctly opens "Speakers" per /proc/asound. Remaining gap is
apparently in the DSP → I2S → amp path at the signal level, not
the ALSA/kernel/GPIO layers — testable via the speaker.mjs piece
now that ac-native boots cleanly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+43 -2
+2 -1
fedac/native/Dockerfile.builder
··· 14 14 gcc ccache make cpio lz4 bc perl flex bison diffutils \ 15 15 elfutils-libelf-devel openssl-devel \ 16 16 gnu-efi-devel \ 17 - curl jq git tar xz findutils pkgconf-pkg-config zstd xorriso \ 17 + curl jq file git tar xz findutils pkgconf-pkg-config zstd xorriso \ 18 + bash \ 18 19 ca-certificates \ 19 20 alsa-lib-devel libdrm-devel flite-devel SDL3-devel \ 20 21 ffmpeg-free-devel \
+33 -1
fedac/native/docker-build.sh
··· 144 144 mktemp printf seq stat basename dirname env expr true false readlink \ 145 145 realpath rmdir uniq yes tar gzip gunzip hostname id ip modprobe \ 146 146 mkswap swapon vi df du diff xargs nohup pgrep killall cut whoami awk \ 147 - sync poweroff reboot halt mknod udhcpc; do 147 + sync poweroff reboot halt mknod udhcpc \ 148 + pwd tty logger clear reset man less more tac nl fold cmp hexdump md5sum \ 149 + sha256sum sha512sum base64 nslookup ping traceroute pgrep pkill timeout \ 150 + stty sysctl free uptime uname usleep unzip zcat; do 148 151 ln -s busybox "$IROOT/bin/$cmd" 152 + done 153 + # Real GNU bash — busybox's sh applet lacks bashisms (arrays, process 154 + # substitution, [[ ]], $'…' escapes, etc.) that Claude Code CLI's Bash tool 155 + # leans on, plus a lot of user-supplied commands. Ship the full binary from 156 + # the builder image + its shared lib dependencies so `bash -c "..."` works 157 + # without surprises. 158 + BASH_BIN=$(command -v bash) 159 + if [ -n "$BASH_BIN" ] && [ -f "$BASH_BIN" ]; then 160 + cp -L "$BASH_BIN" "$IROOT/bin/bash" 161 + chmod +x "$IROOT/bin/bash" 162 + for dep in $(ldd "$BASH_BIN" 2>/dev/null | grep -oP '/\S+'); do 163 + base=$(basename "$dep") 164 + [ ! -f "$IROOT/lib64/$base" ] && cp -L "$(readlink -f "$dep")" "$IROOT/lib64/$base" 2>/dev/null || true 165 + done 166 + log " Bundled GNU bash for Claude Code CLI" 167 + else 168 + log " bash not found on builder — Claude CLI Bash tool may fail" 169 + fi 170 + 171 + # Additional tools Claude's Bash tool commonly wants: jq for JSON, file 172 + # for type detection, strace for debugging. Best-effort — skip if absent. 173 + for bin in jq file strace; do 174 + SRC_BIN=$(command -v "$bin" 2>/dev/null || true) 175 + [ -z "$SRC_BIN" ] && continue 176 + cp -L "$SRC_BIN" "$IROOT/bin/$bin" 177 + for dep in $(ldd "$SRC_BIN" 2>/dev/null | grep -oP '/\S+'); do 178 + base=$(basename "$dep") 179 + [ ! -f "$IROOT/lib64/$base" ] && cp -L "$(readlink -f "$dep")" "$IROOT/lib64/$base" 2>/dev/null || true 180 + done 149 181 done 150 182 # udhcpc also expected at /sbin/ by wifi.c 151 183 ln -sf ../bin/busybox "$IROOT/sbin/udhcpc" 2>/dev/null || true
+8
fedac/native/initramfs/init
··· 62 62 export CURL_CA_BUNDLE="/etc/pki/tls/certs/ca-bundle.crt" 63 63 export SSL_CERT_DIR="/etc/ssl/certs" 64 64 export HOME="/tmp" 65 + # Claude Code CLI (/bin/claude) reads SHELL to know which interpreter to 66 + # spawn for its Bash tool. Without this it errors with "SHELL env var 67 + # isn't set". /bin/sh is busybox — good enough to run short commands. 68 + # TERM gives rich output; COLORTERM hints truecolor so the CLI uses colors. 69 + export SHELL="/bin/sh" 70 + export TERM="${TERM:-xterm-256color}" 71 + export COLORTERM="truecolor" 72 + export EDITOR="/bin/vi" 65 73 66 74 # ── Mount USB config/log partition (for config.json, wifi creds, logs) ── 67 75 # Prefer the writable config partition over the boot partitions.