On Mon, Sep 27, 2021 at 4:28 PM Jason A. Donenfeld <[email protected]> wrote: > > On Mon, Sep 27, 2021 at 11:44 AM Robin H. Johnson <[email protected]> wrote: > > I think we need to strip out a lot of the crap about trying to detect > > things in the stuff being built, and reduce the check to the simplest > > possible form: > > $ time zgrep -w CONFIG_PACKET /proc/config.gz > > CONFIG_PACKET=y > > The results from our current method could of course be cached, and > even cached between runs, by just relying on `/proc/version` changing > for different kernels. This seems easy enough to do. > > Alternatively, sure, we could require that everyone has /proc/config > in their kernel config. Many kernels don't have this (mine doesn't), > but we could add it to the base requirements.
I think it would be reasonable to check a couple fallback locations: /proc/config.gz /lib/modules/$(uname -r)/build/.config /boot/config-$(uname-r) The slowness really comes from guessing the kernel build location and invoking the kernel build system via make. Avoiding that is a big improvement.
