Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Shinnosuke_K_
Beginner
75 Views

v2016.2 Ubuntu 14.04 how to build sep kernel driver

Hi,

Quoting sepdk/src/README.txt before asking my question
------------------------------------------------------------------------------------------------
4.  Other Linux Distributions or Kernels

For kernels or Linux disributions not mentioned above, you need to set
up the kernel build environment manually. This involves configuring the
kernel sources (and hence kernel headers) to match the running kernel
on the target system.

For 2.6 and later kernels, the kernel sources can be configured as follows:

  # boot into the kernel you wish to build driver for
  # and make sure the kernel source tree is placed in
  # /usr/src/linux-`uname -r`
------------------------------------------------------------------------------------------------

Question: could you please provide explicit instructions on how to "place the kernel source tree in  /usr/src/linux-`uname -r`" ?

For example, given the following host:

$ uname -r
3.13.0-79-generic
$ uname -a
Linux  <keeping_hostname_private> 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:27:58 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"

me@<keeping_hostname_private> :/usr/src$ ls -1d *79*
linux-headers-3.13.0-79
linux-headers-3.13.0-79-generic

can I proceed as follows to "place the kernel source tree in  /usr/src/linux-`uname -r`" ?
$ cd /usr/src
/usr/src$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-trusty.git
/usr/src$ ln -s ubuntu-trusty linux-`uname -r`

Could you also please reconfirm that:
1. a copy of the full kernel source tree is required to build the driver
2. above listed linux-headers-{$(uname -r),$(uname -r)-generic} folders are not enough to build the driver

 

 

0 Kudos
1 Reply
Vitaly_S_Intel
Employee
75 Views

You don't need full kernel source tree, linux-headers is enough. To build the drivers, run sepdk/src/build-driver script and point it to your /usr/src/linux-headers-3.13.0-79-generic folder if it didn't locate it automatically.

Reply