0

I am new to yocto and developing drivers. I got source code (alter_driver.c and Makefile) for the drivers but I don't have any idea how to compile and get altera_driver.ko file, so that I can load that drivers and use them.

The version of yocto kernel is 3.0.32-yocto-standard which I got from terminal command uname -r.

Please help me in compiling the drivers. Thank you.

Qiu
  • 5,651
  • 10
  • 49
  • 56
TejaReddy
  • 337
  • 3
  • 13

1 Answers1

0

I suggest you read the Yocto Kernel Development Manual (the link is to current version: you should use the one for your Yocto release). If the only thing you have is a out-of-tree module, see part 2.5.2 which explains how to create a recipe for your driver.

The short version is: make a copy of the example recipe, add your sources in the files/-directory, modify the Makefile to build your sources... but read the manual, it's pretty good.

Also, the Kernel Lab may be useful: it mostly talks about working with a full kernel but also covers an out-of-tree module example (lab 4).

Jussi Kukkonen
  • 13,857
  • 1
  • 37
  • 54