I have a problem in order to build the wifi driver(from module manufacturer),
first ,i set some variables according to the instruction.
Please set your kernel tool chain path
Please set your kernel source code place
then ,executed the makefile of the module driver,the error occurred.
// Your kernel headers are incomplete/not installed.please install kernel headers,including a
// .config file or use the KLIB/KLIB_BUILD make variables to set the kernel to build against.
the problem is that I couldn’t find the .config file within the kernel root directory . so could you please give me some advice .
it seems your driver wants the folder where the kernel is built and not only where the sources are.
On Yocto this would be something like:
You will also need to build the kernel, and for that you can either do a full build with
or just build the kernel:
After that export KLIB_BUILD to point to the right directory:
Do you want to build WiFi driver as a module or monolithic? If you would like to build it monolithic, and need to add configuration to kernel config file:
Add driver to kernel sources
bitbake -c cleansstate linux-yocto
bitbake linux-yocto -c menuconfig # this shows menuconfig, select your driver there
bitbake -k linux-yocto # if all goes well, your kernel will be located in tmp/deploy/images/swi-mdm9x15/kernel
You can go to tmp/work/swi_mdm9x15-poky-linux-gnueabi/linux-yocto/<linux-version+some-hash>/linux-swi_mdm9x15-standard-build and find complete kernel “.config” file there.
Now, you can add your wifi driver config to kernel-meta/meta/cfg/kernel-cache/bsp/swi-mdm9x15/swi-mdm9x15.cfg . This is partial kernel configuration file, and you won’t be able to see all kernel config options there. However, this file should be self explanatory.
Hope this helps.
…or you can always go to tmp/work/swi_mdm9x15-poky-linux-gnueabi/linux-yocto/<linux-version+some-hash>/linux-swi_mdm9x15-standard-build and build kernel “kernel” way.