Compile wifi driver on LegatoYocto15.01

Hello all,

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

export CROSS_COMPILE=/opt/swi/y16-ext/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-

Please set your kernel source code place

export KLIB_BUILD=/home/jim/legato/LegatoYocto1501/kernel

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 .

BR.

Hi,

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: /home/jim/legato/LegatoYocto1501/build_bin/tmp/work/swi_mdm9x15-poky-linux-gnueabi/linux-yocto/<git-auto-generated-hash>/linux-swi_mdm9x15-standard-build/.

You will also need to build the kernel, and for that you can either do a full build with make image_bin or just build the kernel:

make dev
bitbake linux-yocto

After that export KLIB_BUILD to point to the right directory:

export KLIB_BUILD=/home/jim/legato/LegatoYocto1501/build_bin/tmp/work/swi_mdm9x15-poky-linux-gnueabi/linux-yocto/3.4.91+gitAUTOINC+b4cd11ac89_4baa26b8d2-r4.5.1/linux-swi_mdm9x15-standard-build

Hi,

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 cd poky source ./oe-init-build-env cd ../../build_bin 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.

Best regards,
Dragan

…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.

–Dragan