Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jmcla3
New Contributor I
1,672 Views

How to compile out-of-tree driver?

We have a board that is based on the Galileo design and we have a device that needs a driver supplied by the vendor. The driver isn't part of the standard linux kernel.

The driver source code we get from the vendor is based on Makefiles. I'm having a lot of trouble getting it to compile for our 3.8.7-yocto-standard kernel. We have no experience in writing custom recipes for bitbake.

What I'm hoping exists is instructions for 3.8.7 and linux-headers that are similar to these 3.10.17 instructions.

/thread/62873 https://communities.intel.com/thread/62873 - GUIDE: compiling drivers for Poky 3.10.17-poky-edison+ directly on EDISON (in 10 steps :))

The only other instructions I found are these:

/thread/77384 https://communities.intel.com/thread/77384 - Reconfiguring Linux kernel and adding drivers into Galileo's Linux image

but they assume the drivers are already in the kernel source tree and you just have to run menuconfig

Failing that, is there somewhere that fully documents how to take a 3rd party driver and get it to build under bitbake? Perhaps even a "bitbake drivers for dummies" document?

9 Replies
Pablo_M_Intel
Employee
119 Views

Hi dfwJones,

Could you tell me which device you are using? It's possible that a recipe already exists and you'll just need to add to your existing recipes.

Also, have you checked this guide? http://www.yoctoproject.org/docs/1.8/kernel-dev/kernel-dev.html http://www.yoctoproject.org/docs/1.8/kernel-dev/kernel-dev.html. In section 2.4 they explained how to work with your own sources, and in section 2.5 you can find an explanation about how to work with out-of-tree modules.

Regards,

PabloM_Intel

jmcla3
New Contributor I
119 Views

The device is a wifi module. There are some drivers from the same vendor in the 3.19 yocto release, but they are not for the same device and are structured completely differently. I can't see that any of the parts can be used.

We have looked at the document you mentioned. They are very brief and way over our heads.

I was really hoping to find a bitbake for dummies, or a 3.8.7 version of the 3.10 instructions I linked to above.

Pablo_M_Intel
Employee
119 Views

Hi dfwJones,

I've been searching for similar tutorials as the one you posted above but with no luck. Could you please share the driver that you mentioned before so we can try to help you with the compilation?

Regards,

PabloM_Intel

jmcla3
New Contributor I
119 Views

I can't share the driver because we received it under NDA from the vendor. I'm not sure I can even say what the device is.

We have made some progress. We tried moving to 3.19 using these instructions:

https://github.com/todorez/galileo-linux-stable/ https://github.com/todorez/galileo-linux-stable/

I was able to build our drivers and run insmod on them. We don't have them running correctly yet.

The difficulty we have with the 3.19 project is that not all the parts we need are enabled or easily enabled, so we are wasting a lot of time trying to get them working. I'm also not sure that project is being maintained any more since it hasn't had an update in 6 months.

Pablo_M_Intel
Employee
119 Views

Hi dfwJones,

I was checking one of the first links that you shared, the one about "Reconfiguring Linux Kernel and adding drivers into Galileo's Linux image", and if I'm not mistaken there's little section about how to install a driver. Did you check it? Also, there's this thread that you might find helpful /message/226328 https://communities.intel.com/message/226328.

Were you able to make some progress using kernel 3.19?

Regards,

PabloM_Intel

Carlos_M_Intel
Employee
119 Views

Hi dfwJones,

Have you been able to include your driver in the image?

Have you tried with the suggestions from ?

Regards,

Charlie

jmcla3
New Contributor I
119 Views

If you are asking if we looked at the Intel Quark BSP Build Guide, then yes it is one of countless places we looked for help.

Right now were are really stuck. We've found no way to build the drivers we need under 3.8.7. While we've been able to build the drivers under 3.19, we have other problems with the kernel.

One of the biggest problems is with Ethernet. We are having problems very similar to others in that the Ethernet device doesn't seem to be loading.

https://github.com/todorez/galileo-linux-stable/issues/5 https://github.com/todorez/galileo-linux-stable/issues/5

Our choices right now are to either us 3.8.7 and not be able to use our device, or use 3.19 and have a whole bunch of other problems. Neither is going to make our customer very happy.

Pablo_M_Intel
Employee
119 Views

Hi dfwJones,

I found this tutorial about Developing a Kernel Module on Yocto. The example is based in something really similar to what you want to do, integrating an external driver into Yocto.

https://software.intel.com/sites/default/files/m/4/d/8/5/8/42868-11__Developing_Kernel_Module_on_Yoc... https://software.intel.com/sites/default/files/m/4/d/8/5/8/42868-11__Developing_Kernel_Module_on_Yoc....

This is for you to try using the Galileo standard kernel (3.8.7). Most of it is really clear, but if you have a question you can always post it in here.

Regards,

PabloM_Intel

jmcla3
New Contributor I
119 Views

Just an update for everyone. The short version is that we still don't have functioning drivers on our board. We tried all the suggestions from the forum, but there were issues with each one. We gave up trying to get the drivers built and working. We've handed off the task to the chipset vendor and they have been at it over a month.

We also spent quite a lot of time trying to get things working with the new 1.2.0 BSP package which includes kernel version 3.14.28. The new kernel fixed a couple of our problems, but introduced all new ones. We've had to go back to 3.8.7.

Reply