Split heavy commands out of corebox into standalone binaries#14
Open
mikeysklar wants to merge 1 commit into
Open
Split heavy commands out of corebox into standalone binaries#14mikeysklar wants to merge 1 commit into
mikeysklar wants to merge 1 commit into
Conversation
corebox is a ~212 KB busybox multicall binary, so running any of its applets (df/grep/sed/head/...) needs a single 256 KB contiguous block (order-6) on this no-MMU target. Fragmentation eventually denies that even when total free memory is fine, giving binfmt_flat order:6 allocation failures (errno -12) after some uptime. Build the most-used heavy text tools as their own ~80-120 KB binaries (the same way cat/ls/ps already are), so each only needs a 128 KB contiguous block (order-5) -- half the requirement, far likelier to survive fragmentation. corebox keeps the colder applets and shrinks to ~157 KB. Promoted to standalone: grep (with egrep/fgrep), sed, df, head, tail, wc, cut, tr, uname. Verified on Fruit Jam hardware: grep/df run as order-5 standalones in memory states where the order-6 monolith failed to load. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
coreboxis a ~212 KB busybox multicall binary, so running any of its applets (df/grep/sed/head/...) needs a single 256 KB contiguous block (order-6) on this no-MMU target. Fragmentation eventually denies that even when total free memory looks fine, givingbinfmt_flatorder:6 allocation failures (errno -12) after some uptime.This builds the most-used heavy text tools as their own ~80–120 KB binaries (the same way cat/ls/ps already are), so each only needs a 128 KB contiguous block (order-5) — half the requirement, and far likelier to survive fragmentation.
coreboxkeeps the colder applets and shrinks to ~157 KB.Promoted to standalone: grep (with egrep/fgrep), sed, df, head, tail, wc, cut, tr, uname.
Note: a coarse 2-way split does not help — two ~150 KB halves are both still order-6. The ~92 KB busybox/uClibc floor per binary means it has to be individual binaries to drop an order.
Verified on Fruit Jam hardware: grep/df run as order-5 standalones in memory states where the order-6 monolith failed to load.
🤖 Generated with Claude Code