[Toybox] [PATCH] Add makefile rule to build kconfig; fixes clean-tree parallel builds
Rob Landley
rob at landley.net
Sun Feb 22 15:49:00 PST 2026
On 2/13/26 13:36, enh wrote:
>> Anyway, in theory, android could now just do something like:
>>
>> KCONFIG_ALLCONFIG=scripts/android_miniconfig scripts/genconfig.sh -n &&
>> scripts/make.sh
>>
>> And... it might work? (Don't have the test environment.)
>
> ...you had me worried here that i was going to have to change
> something, but it seems like the update "just worked"? is that
> expected, or have i missed something and just haven't noticed the
> other shoe fall yet?
Commit 32decfacef12 is probably the other shoe, you'll have to at least
resnapshot the headers because the probed symbol names changed.
That said, I dunno the current reason for the snapshot? On the
technology side, you should just be able to use the build scripts as is
now. The gplv2 build infrastructure is out of the flow for your use
cases and it's not doing HOSTCC on _more_ binaries than it was before.
(This pass eliminates all the probecc ones, instead of building
something it checks compiler #defines via ":|cc -E -dM -" now.)
The full hermetic experience would be:
CPUS=$(nproc) scripts/prereq/use.sh scripts/android_miniconfig
Alas, the CPUS=$(nproc) is because the prereq mini-airlock doesn't
include "nproc" so the build falls back to CPUS=1. And yes, that full
hermetic build first does a single threaded toybox-prereq build that's
not ideal for you. (On my 12 year old laptop prereq/build.sh takes 9.2
seconds.) I'm open to suggestions...
Rob
P.S. I just did commit 44610ac30e7b so it still builds after rm -rf
kconfig. :)
P.P.S. I suppose you could ship a toybox-prereq binary, and I could even
hack in an "nproc" for macos pretty easily, and then ninja could do what
use.sh does by itself, or with a different script? make.sh needing a
bash-alike on mac isn't new but mksh is good enough on android. Working
on getting toysh workable in prereq/use.sh, hit an unrelated bug and
went down a rathole...
More information about the Toybox
mailing list