* Compiling different version of IGB as a kernel module
@ 2016-01-30 0:46 Jonathan Haws
2016-01-30 12:13 ` Chris Trobridge
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Haws @ 2016-01-30 0:46 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]
Hello all!
I am trying to get the Intel IGB driver compiling as a kernel module
using source downloaded from SF. I'm doing this because I was given a
patch to enable an external PPS to provide a time source to the PTP
mechanisms in the device.
I've got the recipe setup and it makes it to the do_compile step,
however it fails here with some interesting output. First, I get a
message from the shell stating that -- is an invalid option. Second,
cc1 fails with a bad option. I'm not even sure where to start debugging
this!
I did have to patch the Makefile to get it to find the kernel sources
and build files correctly. I've attached my recipe and that patch file.
I've also attached the output of do_compile - hopefully someone can look
at this and see what I am doing wrong!
One thing I have tried is I went down into the tmp/work directory where
the IGB driver was being built and tried running the same make command
(without the CC=, AR=, LD= settings, since those are not on my path...)
and it seemed to build just fine, so it seems like it is something to do
with the toolchain, but that's all I can tell.
Thoughts?
Thanks!
Jon
--
Jonathan R. Haws
Embedded Engineer
Space Dynamics Laboratory
(435) 713-3489
jhaws@sdl.usu.edu
[-- Attachment #2: compile_error.txt --]
[-- Type: text/plain, Size: 8321 bytes --]
DEBUG: Executing shell function do_compile
+ cd /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5
+ do_compile
+ cd /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src
+ module_do_compile
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
+ oe_runmake_call KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
+ bbnote make -j 32 -e MAKEFLAGS= KERNEL_SRC=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
+ [ -p /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/temp/fifo.8096 ]
+ cd /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5
+ do_compile
+ cd /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src
+ module_do_compile
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
+ oe_runmake_call KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
+ bbnote make -j 32 -e MAKEFLAGS= KERNEL_SRC=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
+ [ -p /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/temp/fifo.8096 ]
+ printf %b\0 bbnote make -j 32 -e MAKEFLAGS= KERNEL_SRC=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
+ make -j 32 -e MAKEFLAGS= KERNEL_SRC=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
+ printf %b\0 bbnote make -j 32 -e MAKEFLAGS= KERNEL_SRC=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
+ make -j 32 -e MAKEFLAGS= KERNEL_SRC=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
NOTE: make -j 32 -e MAKEFLAGS= KERNEL_SRC=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_PATH=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source KERNEL_VERSION=4.1.8-rt8-yocto-preempt-rt CC=x86_64-sigma-linux-gcc -fuse-ld=bfd LD=x86_64-sigma-linux-ld.bfd AR=x86_64-sigma-linux-ar O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts
/bin/sh: 0: Illegal option --
/bin/sh: 0: Illegal option --
make -C /opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts SUBDIRS=/opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src modules
make -C /opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source O=/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts SUBDIRS=/opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src modules
make[1]: Entering directory `/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source'
make[1]: Entering directory `/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source'
make[2]: Entering directory `/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts'
make[2]: Entering directory `/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts'
CC [M] /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src/igb_main.o
CC [M] /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src/igb_main.o
cc1: error: -Werror=date-time: no option -Wdate-time
cc1: error: -Werror=date-time: no option -Wdate-time
make[3]: *** [/opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src/igb_main.o] Error 1
make[3]: *** [/opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src/igb_main.o] Error 1
make[2]: *** [_module_/opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src] Error 2
make[2]: Leaving directory `/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts'
make[2]: *** [_module_/opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/igb-5.3.3.5/src] Error 2
make[2]: Leaving directory `/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-build-artifacts'
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source'
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/opt/yocto/sigma/build-teisit/tmp/work-shared/xpedite7570/kernel-source'
make: *** [default] Error 2
make: *** [default] Error 2
+ die oe_runmake failed
+ bbfatal_log oe_runmake failed
+ [ -p /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/temp/fifo.8096 ]
+ printf %b\0 bbfatal_log oe_runmake failed
+ exit 1
+ bb_exit_handler
+ ret=1
+ echo WARNING: exit code 1 from a shell command.
WARNING: exit code 1 from a shell command.
+ exit 1
+ die oe_runmake failed
+ bbfatal_log oe_runmake failed
+ [ -p /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/temp/fifo.8096 ]
+ printf %b\0 bbfatal_log oe_runmake failed
+ exit 1
+ bb_exit_handler
+ ret=1
+ echo WARNING: exit code 1 from a shell command.
WARNING: exit code 1 from a shell command.
+ exit 1
ERROR: oe_runmake failed
ERROR: Function failed: do_compile (log file is located at /opt/yocto/sigma/build-teisit/tmp/work/xpedite7570-sigma-linux/igb/5.3.3.5-r0/temp/log.do_compile.8096)
[-- Attachment #3: igb_5.3.3.5.bb --]
[-- Type: text/plain, Size: 768 bytes --]
SUMMARY = "igb Linux* Base Driver for Intel(R) Ethernet Network Connection"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=ef1e0d1bc1b04ad5062d834c1de70394"
inherit module
SRC_URI = "http://downloads.sourceforge.net/project/e1000/igb%20stable/5.3.3.5/igb-5.3.3.5.tar.gz \
file://0000-SDL-Makefile-Set-KSRC-to-KERNEL_SRC.patch \
file://0001-X-ES-Initial-commit-of-work-to-add-extts-support-to-.patch"
SRC_URI[md5sum] = "46f5ae508bd85131e586ee07ff88fb3f"
SRC_URI[sha256sum] = "17dd04d09987e5c94ba0944768df8fb5535fbc2a94580bb44dc1052297632b31"
# The inherit of module.bbclass will automatically name module packages with
# "kernel-module-" prefix as required by the oe-core build environment.
do_compile_prepend() {
cd ${S}/src
}
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0000-SDL-Makefile-Set-KSRC-to-KERNEL_SRC.patch --]
[-- Type: text/x-patch; name="0000-SDL-Makefile-Set-KSRC-to-KERNEL_SRC.patch", Size: 519 bytes --]
--- a/src/Makefile.orig
+++ b/src/Makefile
@@ -21,6 +21,7 @@
# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
#
################################################################################
+KSRC := $(KERNEL_SRC)
###########################################################################
# Driver files
@@ -73,7 +74,7 @@
ifeq (/lib/modules/$(BUILD_KERNEL)/source, $(KSRC))
KOBJ := /lib/modules/$(BUILD_KERNEL)/build
else
- KOBJ := $(KSRC)
+ KOBJ := $(O)
endif
endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiling different version of IGB as a kernel module
2016-01-30 0:46 Compiling different version of IGB as a kernel module Jonathan Haws
@ 2016-01-30 12:13 ` Chris Trobridge
2016-01-30 15:24 ` Jonathan Haws
2016-02-01 21:49 ` Jonathan Haws
0 siblings, 2 replies; 4+ messages in thread
From: Chris Trobridge @ 2016-01-30 12:13 UTC (permalink / raw)
To: Jonathan Haws, yocto
[-- Attachment #1: Type: text/plain, Size: 1761 bytes --]
Hi Jon,
As an alternative, have you considered patching the igb source that already exists within yocto?
Regards,Chris
From: Jonathan.Haws@sdl.usu.edu
To: yocto@yoctoproject.org
Date: Sat, 30 Jan 2016 00:46:20 +0000
Subject: [yocto] Compiling different version of IGB as a kernel module
Hello all!
I am trying to get the Intel IGB driver compiling as a kernel module
using source downloaded from SF. I'm doing this because I was given a
patch to enable an external PPS to provide a time source to the PTP
mechanisms in the device.
I've got the recipe setup and it makes it to the do_compile step,
however it fails here with some interesting output. First, I get a
message from the shell stating that -- is an invalid option. Second,
cc1 fails with a bad option. I'm not even sure where to start debugging
this!
I did have to patch the Makefile to get it to find the kernel sources
and build files correctly. I've attached my recipe and that patch file.
I've also attached the output of do_compile - hopefully someone can look
at this and see what I am doing wrong!
One thing I have tried is I went down into the tmp/work directory where
the IGB driver was being built and tried running the same make command
(without the CC=, AR=, LD= settings, since those are not on my path...)
and it seemed to build just fine, so it seems like it is something to do
with the toolchain, but that's all I can tell.
Thoughts?
Thanks!
Jon
--
Jonathan R. Haws
Embedded Engineer
Space Dynamics Laboratory
(435) 713-3489
jhaws@sdl.usu.edu
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto
[-- Attachment #2: Type: text/html, Size: 2149 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiling different version of IGB as a kernel module
2016-01-30 12:13 ` Chris Trobridge
@ 2016-01-30 15:24 ` Jonathan Haws
2016-02-01 21:49 ` Jonathan Haws
1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Haws @ 2016-01-30 15:24 UTC (permalink / raw)
To: Chris Trobridge, yocto
Chris,
I have, but the problem there is that the driver patch I have apples to version 5.3.2 or newer. I'll look into it more, but I'd like to understand what is going on in the build and why it is falling.
Thanks!
Jon
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message --------
From: Chris Trobridge <christrobridge@hotmail.com>
Date: 2016/01/30 5:13 AM (GMT-07:00)
To: Jonathan Haws <Jonathan.Haws@sdl.usu.edu>, yocto@yoctoproject.org
Subject: RE: [yocto] Compiling different version of IGB as a kernel module
Hi Jon,
As an alternative, have you considered patching the igb source that already exists within yocto?
Regards,
Chris
From: Jonathan.Haws@sdl.usu.edu
To: yocto@yoctoproject.org
Date: Sat, 30 Jan 2016 00:46:20 +0000
Subject: [yocto] Compiling different version of IGB as a kernel module
Hello all!
I am trying to get the Intel IGB driver compiling as a kernel module
using source downloaded from SF. I'm doing this because I was given a
patch to enable an external PPS to provide a time source to the PTP
mechanisms in the device.
I've got the recipe setup and it makes it to the do_compile step,
however it fails here with some interesting output. First, I get a
message from the shell stating that -- is an invalid option. Second,
cc1 fails with a bad option. I'm not even sure where to start debugging
this!
I did have to patch the Makefile to get it to find the kernel sources
and build files correctly. I've attached my recipe and that patch file.
I've also attached the output of do_compile - hopefully someone can look
at this and see what I am doing wrong!
One thing I have tried is I went down into the tmp/work directory where
the IGB driver was being built and tried running the same make command
(without the CC=, AR=, LD= settings, since those are not on my path...)
and it seemed to build just fine, so it seems like it is something to do
with the toolchain, but that's all I can tell.
Thoughts?
Thanks!
Jon
--
Jonathan R. Haws
Embedded Engineer
Space Dynamics Laboratory
(435) 713-3489
jhaws@sdl.usu.edu
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiling different version of IGB as a kernel module
2016-01-30 12:13 ` Chris Trobridge
2016-01-30 15:24 ` Jonathan Haws
@ 2016-02-01 21:49 ` Jonathan Haws
1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Haws @ 2016-02-01 21:49 UTC (permalink / raw)
To: Chris Trobridge, yocto
[-- Attachment #1: Type: text/plain, Size: 2196 bytes --]
Got it figured out. Turns out I needed some more changes to the
Makefile. New patch attached in case anyone is interested.
Bottom line is that the CC command was getting forcibly set at some
point to check compilers, thus overriding the shell setting. Plus it
needed a modules_install as well.
Thanks!
On 01/30/2016 05:13 AM, Chris Trobridge wrote:
> Hi Jon,
>
> As an alternative, have you considered patching the igb source that
> already exists within yocto?
>
> Regards,
> Chris
>
> From: Jonathan.Haws@sdl.usu.edu
> To: yocto@yoctoproject.org
> Date: Sat, 30 Jan 2016 00:46:20 +0000
> Subject: [yocto] Compiling different version of IGB as a kernel module
>
> Hello all!
>
> I am trying to get the Intel IGB driver compiling as a kernel module
> using source downloaded from SF. I'm doing this because I was given a
> patch to enable an external PPS to provide a time source to the PTP
> mechanisms in the device.
>
> I've got the recipe setup and it makes it to the do_compile step,
> however it fails here with some interesting output. First, I get a
> message from the shell stating that -- is an invalid option. Second,
> cc1 fails with a bad option. I'm not even sure where to start debugging
> this!
>
> I did have to patch the Makefile to get it to find the kernel sources
> and build files correctly. I've attached my recipe and that patch file.
>
> I've also attached the output of do_compile - hopefully someone can look
> at this and see what I am doing wrong!
>
> One thing I have tried is I went down into the tmp/work directory where
> the IGB driver was being built and tried running the same make command
> (without the CC=, AR=, LD= settings, since those are not on my path...)
> and it seemed to build just fine, so it seems like it is something to do
> with the toolchain, but that's all I can tell.
>
> Thoughts?
>
> Thanks!
> Jon
>
>
> --
> Jonathan R. Haws
> Embedded Engineer
> Space Dynamics Laboratory
> (435) 713-3489
> jhaws@sdl.usu.edu
>
>
> -- _______________________________________________ yocto mailing list
> yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0000-SDL-Makefile-Set-KSRC-to-KERNEL_SRC.patch --]
[-- Type: text/x-patch; name="0000-SDL-Makefile-Set-KSRC-to-KERNEL_SRC.patch", Size: 519 bytes --]
--- a/src/Makefile.orig
+++ b/src/Makefile
@@ -21,6 +21,7 @@
# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
#
################################################################################
+KSRC := $(KERNEL_SRC)
###########################################################################
# Driver files
@@ -73,7 +74,7 @@
ifeq (/lib/modules/$(BUILD_KERNEL)/source, $(KSRC))
KOBJ := /lib/modules/$(BUILD_KERNEL)/build
else
- KOBJ := $(KSRC)
+ KOBJ := $(O)
endif
endif
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-01 21:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-30 0:46 Compiling different version of IGB as a kernel module Jonathan Haws
2016-01-30 12:13 ` Chris Trobridge
2016-01-30 15:24 ` Jonathan Haws
2016-02-01 21:49 ` Jonathan Haws
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.