Hi Bruce,
Thanks, I missed the "make scripts prepare" 8 years has past since I did this 
the last time.
Now I can compile and load the driver but still get the warning.

warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-poky-linux-gcc (GCC) 11.3.0
  You are using:           gcc (GCC) 11.3.0


So something is not 100% correct.

Kind regards
Anders



-----Original Message-----
From: linux-yocto@lists.yoctoproject.org <linux-yocto@lists.yoctoproject.org> 
On Behalf Of Bruce Ashfield
Sent: den 3 mars 2023 19:08
To: Anders Berndtsson <anders.berndts...@idptech.se>
Cc: linux-yocto@lists.yoctoproject.org
Subject: Re: [linux-yocto] Can't compile kernel module under kirkstone

On Fri, Mar 3, 2023 at 12:23 PM Anders Berndtsson 
<anders.berndts...@idptech.se> wrote:
>
> Get this message when compiling a kernel module under branch kirkstone 
> and intel-corei7-64
> warning: the compiler differs from the one used to build the kerne
>   The kernel was built by: x86_64-poky-linux-gcc (GCC) 11.3.0
>   You are using:           gcc (GCC) 11.3.0
> cat /proc/version
> Linux version 5.15.85-intel-pk-standard (oe-user@oe-host) 
> (x86_64-poky-linux-gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 
> 2.38.20220708) #1 SMP PREEMPT Wed Jan 11 19:36:47 UTC 2023 gcc 
> --version gcc (GCC) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There 
> is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
> PURPOSE.

So you are building the module on target ? If so, that is something we test 
nightly, and as part of the release builds, so it is known to work for all 
releases (i.e. we won't release with it broken).

>
> But I actual believe that I use the same compiler as the one used to build 
> the kernel.
> I suspect that the version format from the gcc compiler has changed so the 
> compare of the versions don't work.
>
> The kernel compiling works for an old Yocto kernel 3.19.5  from 2015  with 
> same makefile and source file.

A kernel of that vintage wouldn't have checks for the compiler.

We'd have to know more about your image, your layers, if kernel-devsrc is 
installed on target, and if you've done "make scripts prepare"
before starting to build the module.

Bruce

>
>
> 
>


--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at 
its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12213): 
https://lists.yoctoproject.org/g/linux-yocto/message/12213
Mute This Topic: https://lists.yoctoproject.org/mt/97367211/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to