Android boot embedding should not compile large boot files as C byte arrays #74

Open
opened 2026-09-12 01:47:54 -04:00 by ober · 0 comments
Owner

The Android/Termux all-features build originally generated huge C byte-array headers for boot data, producing a very large C translation unit. On-device clang compilation was memory-heavy enough to destabilize the Termux SSH session during the build.

Local workaround: keep the small generated program header as C, but embed petite/scheme/jsh boot files via an assembler .incbin object and reference start/end symbols from static_boot.c. This reduced the generated C header to about 320 KB and allowed repeated builds to finish.

Expected: Android build should use .incbin, objcopy, or another binary-object embedding strategy for large boot images.
Actual: C byte-array boot embedding is fragile on Termux/aarch64.

The Android/Termux all-features build originally generated huge C byte-array headers for boot data, producing a very large C translation unit. On-device clang compilation was memory-heavy enough to destabilize the Termux SSH session during the build. Local workaround: keep the small generated program header as C, but embed petite/scheme/jsh boot files via an assembler `.incbin` object and reference start/end symbols from `static_boot.c`. This reduced the generated C header to about 320 KB and allowed repeated builds to finish. Expected: Android build should use `.incbin`, objcopy, or another binary-object embedding strategy for large boot images. Actual: C byte-array boot embedding is fragile on Termux/aarch64.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ober/jerboa-shell#74
No description provided.