Can anyone help me create a Kernel Module for Xeon D Drivers for CentOS?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

msvirtualguy

Active Member
Jan 23, 2013
494
244
43
msvirtualguy.com
Title says it all folks. I have this issue where Xeon D 10Gb drivers are not working on a specific build of CentOS and I need to get it working with a Kernel Module. I'm banging my head against the desk here.

I need to compile and run the makefile on the same machine. Problem is everything I do to get the Development Tools installed will not find the kernel-devel on the repositories..not sure why.

I'm quite the newbie at Linux but willing to learn. If someone would be willing to help, that would be awesome.

Thanks!
 

Continuum

Member
Jun 5, 2015
80
24
8
47
Virginia
What do you mean that "Development Tools installed will not find the kernel-devel on the repositories?"

I assume that you have installed the kernel-headers package for your current kernel, which is typically all you need to compile an out of tree driver.

Sent from my Nexus 7 using Tapatalk
 

xnoodle

Active Member
Jan 4, 2011
258
48
28
You usually have a target when you run make. What driver package are you trying to compile exactly, name and version #?

Normal convention would be something like `make directory=/usr/src/kernels install`
 

msvirtualguy

Active Member
Jan 23, 2013
494
244
43
msvirtualguy.com
ixgbe-4.1.1

I'm also getting this again even though the headers and development tools installed successfully.

upload_2016-7-13_22-36-7.png

I've attached the Makefile out of the driver /src directory.

I'm not gonna lie..I'm pretty lost at this point.
 

Attachments

xnoodle

Active Member
Jan 4, 2011
258
48
28
Okay, had some time so I installed a fresh CentOS 6.5 image, downloaded ixgbe-4.1.1 and compiled the drivers.

Main thing was that the Intel Makefile does not look in the right place for the source.

Installed perl, gcc and kernel-devel

yum gave me kernel-devel-2.6.32-642.3.1.el6.x86_64
Realized I was running a different version.
Installed kernel-devel-2.6.32-431.el6.centos.plus.x86_64 from the vault

Edit /root/ixgbe-4.1.1/src/Makefile

I replaced the search path with this, replace with the path that your source is located in:
KSP := /usr/src/kernels/2.6.32-431.el6.centos.plus.x86_64

Able to insert it afterwards.

[root@localhost src]# dmesg | tail -2
Intel(R) 10 Gigabit PCI Express Network Driver - version 4.1.1
Copyright (c) 1999-2015 Intel Corporation.

[root@localhost src]# modinfo ./ixgbe.ko | head -2
filename: ./ixgbe.ko
version: 4.1.1

Edit: Oops, I built this off centos.plus versus vanilla centos. Same thing though.
Just make sure you grab the right kernel-devel package. I should've grabbed it from Index of /6.5/os/x86_64/Packages versus Index of /6.5/centosplus/x86_64/Packages
 
Last edited:

msvirtualguy

Active Member
Jan 23, 2013
494
244
43
msvirtualguy.com
Ok..thanks man..appreciate the help.

I edited the Makefile to my source directory: /usr/src/kernels/3.10.0-327.22.2.el7.x86_64

Still got a ton of errors:

[root@NTNX-c807c502-A 3.10.0-327.22.2.el7.x86_64]# make
/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/scripts/gcc-version.sh: line 25: gcc: command not found
/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/scripts/gcc-version.sh: line 26: gcc: command not found
/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/scripts/gcc-version.sh: line 25: gcc: command not found
/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/scripts/gcc-version.sh: line 26: gcc: command not found
/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/arch/x86/Makefile:96: stack-protector enabled but compiler support broken
Makefile:626: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
make: gcc: Command not found
/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/scripts/gcc-version.sh: line 25: gcc: command not found
/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/scripts/gcc-version.sh: line 26: gcc: command not found
/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/scripts/gcc-version.sh: line 25: gcc: command not found
/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/scripts/gcc-version.sh: line 26: gcc: command not found
HOSTCC scripts/basic/fixdep
/bin/sh: gcc: command not found
make[2]: *** [scripts/basic/fixdep] Error 127
make[1]: *** [scripts_basic] Error 2
make[1]: *** No rule to make target `/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h'. Stop.
make: *** [archheaders] Error 2
 

EffrafaxOfWug

Radioactive Member
Feb 12, 2015
1,394
511
113
I've never done it myself on CentOS but perhaps a;
Code:
yum group install 'Development Tools'
...might help you on your way?

This should install gcc (the compiler) and other stuff you'll need.
 

cptbjorn

Member
Aug 16, 2013
100
19
18
"gcc: command not found" is your current stopper. Fix with 'yum install gcc' or check out the development tools group that includes it and a few dozen other packages by default:

yum grouplist
yum groupinfo Development\ Tools
yum groupinstall Development\ Tools
 

msvirtualguy

Active Member
Jan 23, 2013
494
244
43
msvirtualguy.com
Appreciate the help fellas.

I installed gcc and it appears i'm a lot further along. Where/How do I specify the target?

[root@NTNX-c807c502-A 3.10.0-327.22.2.el7.x86_64]# make
make[1]: *** No rule to make target `/usr/src/kernels/3.10.0-327.22.2.el7.x86_64/arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h'. Stop.
make: *** [archheaders] Error 2
 

msvirtualguy

Active Member
Jan 23, 2013
494
244
43
msvirtualguy.com
I see what's going on now. So I install everything, got the RPM's from our Dev team and installed them. When I did that it created a Makefile within the Kernel directory along with the dev tools.

so i was running the wrong makefile. When I try to run the correct one out of the ixgbe-4.1.1/src directory then I get the dev tools aren't installed even after I edit the correct makefile to the dev directory.

I'm back to square one at this point.

Is there a command that tells me where the Dev tools are located so I can make sure the Makefile is searching in the correct directory?