On 2022.04.06 14:51, Jude DaShiell wrote:
I'm curious, with a system about to build a kernel does a command or
command switch exist to tell the kernel build process to build the
kernel
in such a way that all hardware now enabled gets enabled in the build
of
the kernel?
Which pieces get built into the kernel (or as loadable modules) is
controlled by .config. To get the new kernel to include all the
drivers/modules enabled in the current kernel, you can "zcat
/proc/config.gz > .config" in the new /usr/src/linux. (That does
assume the running kernel is built with the parameters to create
/proc/config.gz.) Then run "make oldconfig" (or one of it's variants)
to include new lines to .config. To see (a subset) of those modules
are actually used by existing hardware, do "lspci -k". I don't know of
any script to automatically parse that output, although I wouldn't be
surprised if there was one (or more.) Note hat probably won't include
modules used for usb devices, just the usb hubs. Currently loaded
modules can be listed with lsmod, but that doesn't include anything
built in.
Is a11y a typo, or just something I don't understand? If you mean to
say (all Y) Y to all kernel config questions, I believe there is a make
option for the kernel which will do that - but I'd have to read the
docs for the details. Also, while that's of use for a distro kernel
(where you have no idea what will be in PCs where it gets used) it will
add lots of stuff to the kernel that you are unlikely to ever use.
What is your actual goal?
Jack