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 jh...@sdl.usu.edu
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)
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 }
--- 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
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto