On 20 Jan 2024, at 20:38, Daniele Lugli via Lists.Yoctoproject.Org <daniele.lugli=gmail....@lists.yoctoproject.org> wrote: > > Thank you Marek and Ross. > @Ross: I had a look into log.do_configure and found > checking for Linux kernel sources... > /usr/src/linux-headers-6.5.0-14-generic (Kernel 6.5) > but these are from the host, my target kernel is a 6.1 with PREEMPT_RT !
That would be a big problem yes. > An internet search shows that the intel igb driver failing to build with > several recent kernels 6.x seems known, and not related to yocto. So I gave > up igb and settled for the generic driver with the following modification: > EXTRA_OECONF = "--enable-generic --disable-igb --disable-8139too > --with-linux-dir=${STAGING_KERNEL_BUILDDIR}" That seems right. > Start EtherCAT master 1.6.0-rc1 modprobe: FATAL: Module ec_master not found > in directory /lib/modules/6.1.59-rt16-intel-pk-preempt-rt failed > and in fact there is no ec_master.ko in /lib/modules (nor anywhere else). > If I understand correctly > https://docs.yoctoproject.org/ref-manual/classes.html#autotools, the > inherited autotools run configure behind the scenes. But the Etherlab > installation instructions are: > ./bootstrap > ./configure { with args as needed } > make all modules > make modules_install install > depmod > bootstrap just contains an "autoreconf -i" which, according to the doc, is > also automatically run behind the scenes. > Arguments for configure are supplied through EXTRA_OECONF and are OK > make modules and make modules_install are probably not run. > I see from the doc that there is also an EXTRA_OEMAKE variable which should > pass additional arguments to make. So I try: > EXTRA_OEMAKE = "all modules" That is used to pass to _every_ make invocation, which isn’t what you want. > The kernel was built by: x86_64-poky-linux-gcc (GCC) 13.2.0 > You are using: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 > Why is it using the compiler from the host? Because Makefiles are hard, kernel makefiles even harder. Especially when someone is trying to be clever and wrap the kbuild infrastructure inside autotools. You _might_ find it easier to write two recipes: one that builds the userspace code and one that builds the kernel module. The userspace one is basically what you’ve already written, but change —with-linux-dir=… to —disable-kernel. Then create a new recipe that has the same SRC_URI but inherits module and tells that what makefile to use (EXTRA_OEMAKE += “-f Makefile.kbuild). This might then build the module using the standard kernel tooling fine and that should force it to use the correct compiler. Ross
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62218): https://lists.yoctoproject.org/g/yocto/message/62218 Mute This Topic: https://lists.yoctoproject.org/mt/103796912/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/leave/6691583/21656/737036229/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-