Date   

Re: Want to use linux-fslc 5.10 with Dunfell

Brian Hutchinson
 

On Tue, Mar 2, 2021 at 8:28 AM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> wrote:

On Tue, Mar 2, 2021 at 2:45 AM Peter Bergin <peter@...> wrote:
Hi Brian,

On 2021-03-01 20:59, Brian Hutchinson wrote:
> Can someone school me on how this works?  I guess I don't know or
> understand the relationship between linux-fslc and linux-fslc-imx
> recipies in meta-freescale/recipies-kernel/linux

you have a bit more info in this thread
https://lists.yoctoproject.org/g/meta-freescale/topic/80897983.

And you can also read the information in the recipes about different
kernels their sources and how they are composed.

linux-fslc-imx:
https://github.com/Freescale/meta-freescale/blob/9de81869018e78b8b861513735b85c2dbc33ca0b/recipes-kernel/linux/linux-fslc-imx_5.4.bb#L12

linux-fslc:
https://github.com/Freescale/meta-freescale/blob/9de81869018e78b8b861513735b85c2dbc33ca0b/recipes-kernel/linux/linux-fslc_5.10.bb#L7

My view on this is that linux-fslc is mainline based and linux-fslc-imx
is NXP based.

Best regards,
/Peter


Thanks Peter,

That helps a lot.  It was my intent to be using FSL kernel and turns out I've been using linux-fslc-imx thus far.  When I first started working on NXP SoC (switched from TI about a year ago) I was using NXP releases and discovered the hard way their new releases were mainly geared at new boards so that's when I switched to fslc.

Regards,

Brian


Ok, forgive me but I'm obviously still in the weeds.  Still trying to pull in linux 5.10 from master.  If linux-fslc is basically community kernel with NXP fixes and patches mainlined ... why is there no COMPATIBLE_MACHINE for imx8mmevk?

I did a clean checkout of gatesgarth, then pulled in the recipes for linux-fslc_5.10 from master into sources/meta-freescale/recipes-kernel/linux
In my local.conf I set:

PREFERRED_PROVIDER_virtual/kernel = "linux-fslc" because it defaults to "linux-fslc-imx" if I don't.

... then when I try to build I get COMPATIBLE_MACHINE errors. 

Here's my local.conf for full disclosure:

PREFERRED_PROVIDER_virtual/kernel = "linux-fslc"
PREFERRED_VERSION_linux-fslc = "5.10%"
MACHINE ??= 'imx8mmevk'
DISTRO ?= 'poky'
PACKAGE_CLASSES ?= 'package_rpm'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
   STOPTASKS,${TMPDIR},1G,100K \
   STOPTASKS,${DL_DIR},1G,100K \
   STOPTASKS,${SSTATE_DIR},1G,100K \
   STOPTASKS,/tmp,100M,100K \
   ABORT,${TMPDIR},100M,1K \
   ABORT,${DL_DIR},100M,1K \
   ABORT,${SSTATE_DIR},100M,1K \
   ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
CONF_VERSION = "1"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

hutch@Gondor:~/yocto/imx8/fsl-community-bsp_gatesgarth/build$ bitbake core-image-base
Loading cache: 100% |                                                                                                                                                                                                                                              | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#############################################################################################################################################################################################################################################| Time: 0:00:10
Parsing of 2286 .bb files complete (0 cached, 2286 parsed). 3492 targets, 234 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'virtual/kernel'
linux-yocto-tiny PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                           
linux-dummy PROVIDES virtual/kernel but was skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-fslc, not linux-dummy                                                                                                                                                           
linux-qoriq PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                                
linux-fslc-lts-4.19 PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                        
linux-gateworks-imx PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                        
linux-yocto-tiny PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                           
linux-yocto PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                                
linux-yocto-dev PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                            
linux-advantech PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                            
linux-fslc PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                                 
linux-kontron PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                              
linux-fslc-qoriq PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                           
linux-yocto PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                                
linux-fslc-imx PROVIDES virtual/kernel but was skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-fslc, not linux-fslc-imx                                                                                                                                                     
linux-toradex PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                              
linux-imx PROVIDES virtual/kernel but was skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-fslc, not linux-imx                                                                                                                                                               
linux-yocto-rt PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                             
linux-variscite PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                            
linux-fslc PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                                 
linux-boundary PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                             
linux-yocto-rt PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                             
linux-toradex PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                              
linux-congatec PROVIDES virtual/kernel but was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE)                                                                                                                                                             
ERROR: Required build target 'core-image-base' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-base', 'virtual/kernel']


Re: Want to use linux-fslc 5.10 with Dunfell

Brian Hutchinson
 


On Tue, Mar 2, 2021 at 2:45 AM Peter Bergin <peter@...> wrote:
Hi Brian,

On 2021-03-01 20:59, Brian Hutchinson wrote:
> Can someone school me on how this works?  I guess I don't know or
> understand the relationship between linux-fslc and linux-fslc-imx
> recipies in meta-freescale/recipies-kernel/linux

you have a bit more info in this thread
https://lists.yoctoproject.org/g/meta-freescale/topic/80897983.

And you can also read the information in the recipes about different
kernels their sources and how they are composed.

linux-fslc-imx:
https://github.com/Freescale/meta-freescale/blob/9de81869018e78b8b861513735b85c2dbc33ca0b/recipes-kernel/linux/linux-fslc-imx_5.4.bb#L12

linux-fslc:
https://github.com/Freescale/meta-freescale/blob/9de81869018e78b8b861513735b85c2dbc33ca0b/recipes-kernel/linux/linux-fslc_5.10.bb#L7

My view on this is that linux-fslc is mainline based and linux-fslc-imx
is NXP based.

Best regards,
/Peter


Thanks Peter,

That helps a lot.  It was my intent to be using FSL kernel and turns out I've been using linux-fslc-imx thus far.  When I first started working on NXP SoC (switched from TI about a year ago) I was using NXP releases and discovered the hard way their new releases were mainly geared at new boards so that's when I switched to fslc.

Regards,

Brian


Re: #yocto #yocto

Otavio Salvador
 



Em ter., 2 de mar. de 2021 às 09:02, <sahilsaini06@...> escreveu:
I am evaluating i.Mx8MM_EVK board for interest and research in Yocto project. I have a question related to system build. Is it feasible to run GNMOE over Wayland and build the Yocto with .deb package support ? Any help in this regard would be appreciated. 

It is, but it all depends on the requirements. Usually we do minimal environments for those embedded devices.

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750


#yocto #yocto

sahilsaini06@...
 

I am evaluating i.Mx8MM_EVK board for interest and research in Yocto project. I have a question related to system build. Is it feasible to run GNMOE over Wayland and build the Yocto with .deb package support ? Any help in this regard would be appreciated. 


Re: bitbake core-image-minimal failed

nus1998
 

Found the issue is caused by realpath, replaced with it in 18.04 and it's OK


在 2021-03-02 11:53:08,"nus1998" <nus1998@...> 写道:

Hi,

I'm using imx zeus 5.4.70-2.3.1, when I build the minimal images, an error encountered:

../../git/src/yp_xdr.c:38:23: fatal error: netconfig.h: No such file or directory
|  #include <netconfig.h>
|                        ^
| compilation terminated.
....
Summary: 1 task failed:
  virtual:native:..../imx-linux-zeus/sources/poky/meta/recipes-extended/libnsl/libnsl2_git.bb:do_compile

netconfig.h can be found at ./tmp/sysroots-components/x86_64/libtirpc-native/usr/include/tirpc, and on compiling there is a message -I<my path>/build-wayland/tmp/work/x86_64-linux/libnsl2-native/1.2.0+gitAUTOINC+37c5ffe303-r0/recipe-sysroot-native/usr/lib/pkgconfig//usr/include/tirpc, so seems relocatable.bbclass doesn't set the relative path properly?


Re: Want to use linux-fslc 5.10 with Dunfell

Andrey Zhizhikin
 

Hello Brian,

On Mon, Mar 1, 2021 at 8:59 PM Brian Hutchinson <b.hutchman@gmail.com> wrote:


On Mon, Mar 1, 2021 at 2:35 PM Brian Hutchinson <b.hutchman@gmail.com> wrote:



On Mon, Mar 1, 2021 at 1:31 PM Otavio Salvador <otavio.salvador@ossystems.com.br> wrote:

Em seg., 1 de mar. de 2021 às 15:29, Brian Hutchinson
<b.hutchman@gmail.com> escreveu:
Ok, don't quite know how to do that yet but will try to figure it out.

I thought something was readily available since I saw the 5.10 recipe.
It is ready for use in gatesgarth and master.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750

I looked using web git this morning before I tried anything and I didn't see 5.10 in meta-freescale/recipes-kernel/linux for Gatesgarth. Only the one recipe I mentioned above in master is there.

Regards,

Brian
Can someone school me on how this works? I guess I don't know or understand the relationship between linux-fslc and linux-fslc-imx recipies in meta-freescale/recipies-kernel/linux
This has been answered by Peter already.


Looking at the linux-fslc-imx_5.4.bb I've been using, it looks like 5.4.98 that i've been using really comes from nxp 5.4.24-1.1.0, kernel.org and some patches??? And a note to "upgraders" that recipe shouldn't collect patches but be applied to linux-fslc kernel tree.
The whole point of the note in the recipe is: if there is a patch that
should be applied to the kernel tree of linux-fslc-imx - then it
should be submitted against the respective branch (which is used in
the recipe) as a PR to https://github.com/Freescale/linux-fslc, and
not kept as a patch in the layer.


Regards,

Brian





--
Regards,
Andrey.


Re: Want to use linux-fslc 5.10 with Dunfell

Peter Bergin
 

Hi Brian,

On 2021-03-01 20:59, Brian Hutchinson wrote:
Can someone school me on how this works?  I guess I don't know or understand the relationship between linux-fslc and linux-fslc-imx recipies in meta-freescale/recipies-kernel/linux
you have a bit more info in this thread https://lists.yoctoproject.org/g/meta-freescale/topic/80897983.

And you can also read the information in the recipes about different kernels their sources and how they are composed.

linux-fslc-imx: https://github.com/Freescale/meta-freescale/blob/9de81869018e78b8b861513735b85c2dbc33ca0b/recipes-kernel/linux/linux-fslc-imx_5.4.bb#L12

linux-fslc: https://github.com/Freescale/meta-freescale/blob/9de81869018e78b8b861513735b85c2dbc33ca0b/recipes-kernel/linux/linux-fslc_5.10.bb#L7

My view on this is that linux-fslc is mainline based and linux-fslc-imx is NXP based.

Best regards,
/Peter


Re: bitbake core-image-minimal failed

nus1998
 

Hi,

Is there an update?

在 2021-03-02 11:53:08,"nus1998" <nus1998@...> 写道:

Hi,

I'm using imx zeus 5.4.70-2.3.1, when I build the minimal images, an error encountered:

../../git/src/yp_xdr.c:38:23: fatal error: netconfig.h: No such file or directory
|  #include <netconfig.h>
|                        ^
| compilation terminated.
....
Summary: 1 task failed:
  virtual:native:..../imx-linux-zeus/sources/poky/meta/recipes-extended/libnsl/libnsl2_git.bb:do_compile

netconfig.h can be found at ./tmp/sysroots-components/x86_64/libtirpc-native/usr/include/tirpc, and on compiling there is a message -I<my path>/build-wayland/tmp/work/x86_64-linux/libnsl2-native/1.2.0+gitAUTOINC+37c5ffe303-r0/recipe-sysroot-native/usr/lib/pkgconfig//usr/include/tirpc, so seems relocatable.bbclass doesn't set the relative path properly?


bitbake core-image-minimal failed

nus1998
 

Hi,

I'm using imx zeus 5.4.70-2.3.1, when I build the minimal images, an error encountered:

../../git/src/yp_xdr.c:38:23: fatal error: netconfig.h: No such file or directory
|  #include <netconfig.h>
|                        ^
| compilation terminated.
....
Summary: 1 task failed:
  virtual:native:..../imx-linux-zeus/sources/poky/meta/recipes-extended/libnsl/libnsl2_git.bb:do_compile

netconfig.h can be found at ./tmp/sysroots-components/x86_64/libtirpc-native/usr/include/tirpc, and on compiling there is a message -I<my path>/build-wayland/tmp/work/x86_64-linux/libnsl2-native/1.2.0+gitAUTOINC+37c5ffe303-r0/recipe-sysroot-native/usr/lib/pkgconfig//usr/include/tirpc, so seems relocatable.bbclass doesn't set the relative path properly?


Re: Want to use linux-fslc 5.10 with Dunfell

Brian Hutchinson
 


On Mon, Mar 1, 2021 at 2:35 PM Brian Hutchinson <b.hutchman@...> wrote:


On Mon, Mar 1, 2021 at 1:31 PM Otavio Salvador <otavio.salvador@...> wrote:
Em seg., 1 de mar. de 2021 às 15:29, Brian Hutchinson
<b.hutchman@...> escreveu:
> Ok, don't quite know how to do that yet but will try to figure it out.
>
> I thought something was readily available since I saw the 5.10 recipe.

It is ready for use in gatesgarth and master.

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

I looked using web git this morning before I tried anything and I didn't see 5.10 in meta-freescale/recipes-kernel/linux for Gatesgarth.  Only the one recipe I mentioned above in master is there.

Regards,

Brian

 
Can someone school me on how this works?  I guess I don't know or understand the relationship between linux-fslc and linux-fslc-imx recipies in meta-freescale/recipies-kernel/linux

Looking at the linux-fslc-imx_5.4.bb I've been using, it looks like 5.4.98 that i've been using really comes from nxp 5.4.24-1.1.0, kernel.org and some patches???  And a note to "upgraders" that recipe shouldn't collect patches but be applied to linux-fslc kernel tree.

Regards,

Brian



Re: Want to use linux-fslc 5.10 with Dunfell

Otavio Salvador
 

Em seg., 1 de mar. de 2021 às 15:29, Brian Hutchinson
<b.hutchman@gmail.com> escreveu:
Ok, don't quite know how to do that yet but will try to figure it out.

I thought something was readily available since I saw the 5.10 recipe.
It is ready for use in gatesgarth and master.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750


Re: Want to use linux-fslc 5.10 with Dunfell

Brian Hutchinson
 



On Mon, Mar 1, 2021, 12:17 PM Otavio Salvador <otavio.salvador@...> wrote:
Hello Brian,

Em seg., 1 de mar. de 2021 às 14:07, Brian Hutchinson
<b.hutchman@...> escreveu:
> I'm wanting to pull in 5.10 kernel into my Dunfell build that's currently using 5.4.x.
>
> I see there is a recipe for 5.10 kernel on master:
>
> https://layers.openembedded.org/layerindex/recipe/58685/
>
> However this link doesn't work
> recipes-kernel/linux/recipes-kernel/linux/linux-imx.inc
>
> I was hoping I could add this recipe and change my local.conf to:
> PREFERRED_PROVIDER_virtual/kernel = "linux-fslc-imx"
> PREFERRED_VERSION_linux-fslc-imx = "5.10%"

linux-fslc-imx just has 5.4 Linux kernels. We have linux-fslc for 5.10.

> What is best way to pull in 5.10 kernel?

You should add it to your product layer and maintain it yourself.

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

Ok, don't quite know how to do that yet but will try to figure it out.

I thought something was readily available since I saw the 5.10 recipe.

Thanks,  

Brian


Re: Want to use linux-fslc 5.10 with Dunfell

Otavio Salvador
 

Hello Brian,

Em seg., 1 de mar. de 2021 às 14:07, Brian Hutchinson
<b.hutchman@gmail.com> escreveu:
I'm wanting to pull in 5.10 kernel into my Dunfell build that's currently using 5.4.x.

I see there is a recipe for 5.10 kernel on master:

https://layers.openembedded.org/layerindex/recipe/58685/

However this link doesn't work
recipes-kernel/linux/recipes-kernel/linux/linux-imx.inc

I was hoping I could add this recipe and change my local.conf to:
PREFERRED_PROVIDER_virtual/kernel = "linux-fslc-imx"
PREFERRED_VERSION_linux-fslc-imx = "5.10%"
linux-fslc-imx just has 5.4 Linux kernels. We have linux-fslc for 5.10.

What is best way to pull in 5.10 kernel?
You should add it to your product layer and maintain it yourself.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750


Want to use linux-fslc 5.10 with Dunfell

Brian Hutchinson
 

Hi,

I'm wanting to pull in 5.10 kernel into my Dunfell build that's currently using 5.4.x.

I see there is a recipe for 5.10 kernel on master:


However this link doesn't work

I was hoping I could add this recipe and change my local.conf to:
PREFERRED_PROVIDER_virtual/kernel = "linux-fslc-imx"
PREFERRED_VERSION_linux-fslc-imx = "5.10%"

... and pull in 5.10 kernel but when I do a build it looks like I'm missing linux-fslc-imx_5.10.bb maybe?  I pulled over the linux-fslc_5.10.bb from above but looking at last build that worked I see linux-fslc_5.4.bb and linux-fslc-imx_5.4.bb ... so I don't know all the info to make a linux-fslc-imx_5_10.bb.

What is best way to pull in 5.10 kernel?

Thanks,

Brian



Re: Wireguard recipe

Zunzunegui Abad, Mario-Sergio
 

Airbus Amber
Yes, that also looks good to me, but when I start configuring wireguard, creating /etc/wireguard/wg0.conf, then I try to start the server with "wg-quick up wg0"
And then the system raises an error
RTNETLINK answers: Operation not supported

That is why I have included kernel-devsrc in IMAGE_INSTALL_append.

My assumption is that wireguard-tools is properly installed in the system, but wireguard-module is nor present.

All Ideas are welcomed.
Thank you very much.

-----Mensaje original-----
De: meta-freescale@lists.yoctoproject.org [mailto:meta-freescale@lists.yoctoproject.org] En nombre de Bas Mevissen Enviado el: viernes, 26 de febrero de 2021 15:14
Para: Zunzunegui Abad, Mario-Sergio
CC: Mario Sergio Zunzunegui Abad; meta-freescale@lists.yoctoproject.org
Asunto: Re: [meta-freescale] Wireguard recipe

On 2021-02-26 15:06, Zunzunegui Abad, Mario-Sergio wrote:
Airbus Amber
Hello Bas.
The result is the same.
I have added to my
sources/meta-freescale/recipes-fsl/images/fsl-image-core.bb the
following IMAGE_INSTALL_append = " \
kernel-devsrc \
wireguard-tools \
wireguard-module \
"
That looks OK to me.

kernel-devsrc is for adding kernel headers.

Exactly the same, I can generate private and public keys with command
"wg genkey . .. ."
But when I run "modprobe wireguard" the result is
modprobe: FATAL: Module wireguard not found.
Please check that the package wireguard-module (in your Yocto build) indeed contains a valid kmod for the kernel you actually run.
If so, check that this kmod is on the target for the kernel you actually run. If not, install the package manually.

Maybe it is good to share what you are actually using. Yocto version, kernel version, board type etc.

Regards,

Bas.


I think I am not adding the module properly.
Any other Idea?
Thank you very much



-----Mensaje original-----
De: Bas Mevissen [mailto:abuse@basmevissen.nl] Enviado el: jueves, 25
de febrero de 2021 15:18
Para: Mario Sergio Zunzunegui Abad
CC: Zunzunegui Abad, Mario-Sergio;
meta-freescale@lists.yoctoproject.org
Asunto: Re: [meta-freescale] Wireguard recipe

On 2021-02-25 15:12, Mario Sergio Zunzunegui Abad wrote:

Hello Bas.
I am afraid I havent realised I had to do that action.
Could you please tell me how to include this module kmod-wireguard?
Thank you very much
Sorry, got the name wrong. That is how it is called in OpenWRT. :-)
What you need is "wireguard-module" and you can add it to
IMAGE_INSTALL_append like wireguard-tools.

Bas.

El jue., 25 feb. 2021 15:09, Bas Mevissen <abuse@basmevissen.nl>
escribió:

On 2021-02-22 16:28, Zunzunegui Abad, Mario-Sergio wrote:

[Edited Message Follows]

Hello.

I am trying to install WireGuard in Yocto.

I have included the code and recipe and compiled all with bitbake
and generated an image.

I have added the code provided by NXP in folder
sources/meta-openembedded/meta-networking/recipes-kernel.

Also added "wireguard-tools" in IMAGE_INSTALL_append in
meta-freescale/recipes-fsl/images/fsl-image-core.bb, then run
"bitbake fsl-image-core"

I can generate public and private keys with wg command.

But when I try to configure WireGuard, it seems that it is not
loaded the module.

root@vpx3-152:~# modprobe wireguard

modprobe: FATAL: Module wireguard not found.

root@vpx3-152:~#

What I am doing wrong?
Aren't you missing the kmod-wireguard package in your image?

Regards.

#Yocto-wireguard

The information in this e-mail is confidential. The contents may not
be disclosed or used by anyone other than the addressee. Access to
this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus
immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or
completeness of this e-mail as it has been sent over public networks.
If you have any concerns over the content of this message or its
Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated
virus scanning software but you should take whatever measures you deem
to be appropriate to ensure that this message and any attachments are
virus free.
The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.


Re: Wireguard recipe

Zunzunegui Abad, Mario-Sergio
 

Airbus Amber

Hello Chistian, Thank you for your support but this is not working for me.

 

I am going to explain what I have done:

 

I got from NXP a module wireguard.tar.gz

This contains:

wireguard.inc

wireguard-module_1.0.20200401.bb

wireguard-tools_1.0.20200319.bb

 

this files have been stored in:

in sources/meta-openembedded/meta-networking/recipes-kernel

 

I have modifies the file

sources/meta-freescale/recipes-fsl/images/fsl-image-core.bb

in order to include the modules “wireguard-tools wireguard-module and kernel-devsrc

adding it to in IMAGE_INSTALL_append

 

Then I run “bitbake fsl-image-core”

And bitbake generates the image.

I flash it into a disk and then run it in the computer.

 

When I execute “modprobe wireguard” it doesn´t find it.

Returning:

modprobe: FATAL: Module wireguard not found.

 

But I can generate the private and public keys with command “wg keygen …”

My assumption is that the wireguard-tools are correctly installed but wireguard-module is not present in the system.

 

I have followed your steps except step 4 assuming this is for a wireless connection that I don’t have.

 

I think your instructions are accurated, but I think I am modifying the files in the wrong place.

 

Could you please clarify the paths since the folder “sources” please.

 

Thank you again for your help.

I am a little struck with this topic.

Best Regards.

 

 

 

 

De: Christian Betz [mailto:christian.betz@...]
Enviado el: viernes, 26 de febrero de 2021 1:55
Para: Zunzunegui Abad, Mario-Sergio
CC: meta-freescale@...
Asunto: Re: [meta-freescale] Wireguard recipe

 

Hello,

 

From my experience there are a number of steps; let me try and save you some trouble!

 

(1) create patch for wireguard in your layer. i needed this for linux-fslc kernel on yocto dunfell as of linux kernel version 5.4.83. (i haven't tried later versions or merged  dunfell branch since december, you may not need this patch right now)

 

filename: ./recipes-wireguard/wireguard/files/wireguard-compat.patch

-------snip------
diff --git a/src/compat/compat-asm.h b/src/compat/compat-asm.h
index 53b33d4..1240bc3 100644
--- a/src/compat/compat-asm.h
+++ b/src/compat/compat-asm.h
@@ -41,8 +41,10 @@
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)
+/*
 #define SYM_FUNC_START ENTRY
 #define SYM_FUNC_END ENDPROC
+*/
 #endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)

-------snip------

 

(2) create bbappend in your layer to apply patch


filename: ./recipes-wireguard/wireguard/wireguard-module_%.bbappend
-------snip------

# Patch to make wireguard compile on Yocto
SRC_URI_append_yourboardname = " file://wireguard-compat.patch;striplevel=2"
-------snip------

 

(3) fix bug with systemd location in recipe (if you are using systemd)


filename: ./recipes-wireguard/wireguard/wireguard-tools_%.bbappend

-------snip------

# Fix bug with systemd unit in wrong location
# TODO: check if this is fixed upstream
do_install () {
    oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \
        SYSTEMDUNITDIR="${systemd_unitdir}/system" \
        WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
        WITH_BASHCOMPLETION=yes \
        WITH_WGQUICK=yes \
        install
}

-------snip------

 

(4) make sure you have a kernel cfg for everything wireguard needs:

 

stock linux-fslc seems to be missing some things wireguard needs.

 

filename: ./recipes-bsp/linux-fslc/files/wireguard-extra-kernel-options.cfg

-------snip------

CONFIG_SKB_EXTENSIONS=y
CONFIG_XFRM=y
CONFIG_NET_IPIP=y
CONFIG_NET_UDP_TUNNEL=y
CONFIG_NET_FOU=y
CONFIG_IPV6_FOU=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_PROCFS=y
CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_SCTP=y
CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
CONFIG_NF_DEFRAG_IPV4=y
CONFIG_NF_DEFRAG_IPV6=y
CONFIG_LIBCRC32C=y

-------snip------

 

(5) add the kernel config in a bbappend for linux-fslc.


filename: grep wireguard recipes-bsp/linux-fslc/linux-fslc_%.bbappend

-------snip------

# Add custom kernel options for wireguard, wireless PCI
# Enable wireguard module
SRC_URI += "file://wireguard-extra-kernel-options.cfg"

-------snip------

 

(6) add "wireguard-tools kernel-module-wireguard" to your image, i.e.:

 

filename: recipes-mycompany/images/myproduct-image.bb

-------snip------

...

IMAGE_INSTALL_append = " wireguard-tools kernel-module-wireguard"

...

-------snip------

 

On Thu, Feb 25, 2021 at 8:36 AM Zunzunegui Abad, Mario-Sergio <mario.zunzunegui@...> wrote:

[Edited Message Follows]

Airbus Amber

Hello.

I am trying to install WireGuard in Yocto.

I have included the code and recipe and compiled all with bitbake and generated an image.

 

I have added the code provided by NXP in folder sources/meta-openembedded/meta-networking/recipes-kernel.

 

Also added  "wireguard-tools" in IMAGE_INSTALL_append in meta-freescale/recipes-fsl/images/fsl-image-core.bb, then run "bitbake fsl-image-core"

 

I can generate public and private keys with wg command.

 

But when I try to configure WireGuard, it seems that it is not loaded the module.

 

root@vpx3-152:~# modprobe wireguard

modprobe: FATAL: Module wireguard not found.

root@vpx3-152:~#

 

What I am doing wrong?

Regards.

 

#Yocto-wireguard



 

--

"the new garbage collector will be an arena-based, quad-color incremental, generational, non-copying, high-speed, cache-optimized garbage collector" -- LuaJIT Roadmap

The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.


Re: Wireguard recipe

Bas Mevissen
 

On 2021-02-26 15:06, Zunzunegui Abad, Mario-Sergio wrote:
Airbus Amber
Hello Bas.
The result is the same.
I have added to my
sources/meta-freescale/recipes-fsl/images/fsl-image-core.bb the
following IMAGE_INSTALL_append = " \
kernel-devsrc \
wireguard-tools \
wireguard-module \
"
That looks OK to me.

kernel-devsrc is for adding kernel headers.
Exactly the same, I can generate private and public keys with command
"wg genkey . .. ."
But when I run "modprobe wireguard" the result is
modprobe: FATAL: Module wireguard not found.
Please check that the package wireguard-module (in your Yocto build) indeed contains a valid kmod for the kernel you actually run.
If so, check that this kmod is on the target for the kernel you actually run. If not, install the package manually.

Maybe it is good to share what you are actually using. Yocto version, kernel version, board type etc.

Regards,

Bas.

I think I am not adding the module properly.
Any other Idea?
Thank you very much
-----Mensaje original-----
De: Bas Mevissen [mailto:abuse@basmevissen.nl] Enviado el: jueves, 25
de febrero de 2021 15:18
Para: Mario Sergio Zunzunegui Abad
CC: Zunzunegui Abad, Mario-Sergio; meta-freescale@lists.yoctoproject.org
Asunto: Re: [meta-freescale] Wireguard recipe
On 2021-02-25 15:12, Mario Sergio Zunzunegui Abad wrote:

Hello Bas.
I am afraid I havent realised I had to do that action.
Could you please tell me how to include this module kmod-wireguard?
Thank you very much
Sorry, got the name wrong. That is how it is called in OpenWRT. :-)
What you need is "wireguard-module" and you can add it to
IMAGE_INSTALL_append like wireguard-tools.
Bas.

El jue., 25 feb. 2021 15:09, Bas Mevissen <abuse@basmevissen.nl>
escribió:

On 2021-02-22 16:28, Zunzunegui Abad, Mario-Sergio wrote:

[Edited Message Follows]
Hello.
I am trying to install WireGuard in Yocto.
I have included the code and recipe and compiled all with bitbake
and generated an image.
I have added the code provided by NXP in folder
sources/meta-openembedded/meta-networking/recipes-kernel.
Also added "wireguard-tools" in IMAGE_INSTALL_append in
meta-freescale/recipes-fsl/images/fsl-image-core.bb, then run
"bitbake fsl-image-core"
I can generate public and private keys with wg command.
But when I try to configure WireGuard, it seems that it is not
loaded the module.
root@vpx3-152:~# modprobe wireguard
modprobe: FATAL: Module wireguard not found.
root@vpx3-152:~#
What I am doing wrong?
Aren't you missing the kmod-wireguard package in your image?

Regards.
#Yocto-wireguard
The information in this e-mail is confidential. The contents may not
be disclosed or used by anyone other than the addressee. Access to
this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus
immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or
completeness of this e-mail as it has been sent over public networks.
If you have any concerns over the content of this message or its
Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated
virus scanning software but you should take whatever measures you deem
to be appropriate to ensure that this message and any attachments are
virus free.


Re: Wireguard recipe

Zunzunegui Abad, Mario-Sergio
 

Airbus Amber
Hello Bas.
The result is the same.
I have added to my sources/meta-freescale/recipes-fsl/images/fsl-image-core.bb the following IMAGE_INSTALL_append = " \
kernel-devsrc \
wireguard-tools \
wireguard-module \
"

kernel-devsrc is for adding kernel headers.

Exactly the same, I can generate private and public keys with command "wg genkey . .. ."
But when I run "modprobe wireguard" the result is
modprobe: FATAL: Module wireguard not found.


I think I am not adding the module properly.
Any other Idea?
Thank you very much



-----Mensaje original-----
De: Bas Mevissen [mailto:abuse@basmevissen.nl] Enviado el: jueves, 25 de febrero de 2021 15:18
Para: Mario Sergio Zunzunegui Abad
CC: Zunzunegui Abad, Mario-Sergio; meta-freescale@lists.yoctoproject.org
Asunto: Re: [meta-freescale] Wireguard recipe

On 2021-02-25 15:12, Mario Sergio Zunzunegui Abad wrote:

Hello Bas.
I am afraid I havent realised I had to do that action.
Could you please tell me how to include this module kmod-wireguard?
Thank you very much
Sorry, got the name wrong. That is how it is called in OpenWRT. :-) What you need is "wireguard-module" and you can add it to IMAGE_INSTALL_append like wireguard-tools.

Bas.

El jue., 25 feb. 2021 15:09, Bas Mevissen <abuse@basmevissen.nl>
escribió:

On 2021-02-22 16:28, Zunzunegui Abad, Mario-Sergio wrote:

[Edited Message Follows]

Hello.

I am trying to install WireGuard in Yocto.

I have included the code and recipe and compiled all with bitbake
and generated an image.

I have added the code provided by NXP in folder
sources/meta-openembedded/meta-networking/recipes-kernel.

Also added "wireguard-tools" in IMAGE_INSTALL_append in
meta-freescale/recipes-fsl/images/fsl-image-core.bb, then run
"bitbake fsl-image-core"

I can generate public and private keys with wg command.

But when I try to configure WireGuard, it seems that it is not
loaded the module.

root@vpx3-152:~# modprobe wireguard

modprobe: FATAL: Module wireguard not found.

root@vpx3-152:~#

What I am doing wrong?
Aren't you missing the kmod-wireguard package in your image?

Regards.

#Yocto-wireguard

The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.


Re: imx6dl dunfell and kernel: linux-fslc or linux-fslc-imx?

Bas Mevissen
 

On 2021-02-26 11:26, Terry Barnaby wrote:
On 25/02/2021 12:02, Fabio Estevam wrote:
On Thu, Feb 25, 2021 at 8:58 AM Terry Barnaby <terry@beam.ltd.uk> wrote:

Many thanks for that info, from Internet info it looked like the
gstreamer-imx package and associated lower libraries/drivers were
needed, I will try another build, the gstreamer video hardware support
wasn't there (as reported by gst-inspect-1.0) when I tried, maybe I got
lost in a tangle of distro, kernel and bitbake targets.
The v4l2dec/enc plugins only show up if the VPU driver were successfully loaded.
Make sure that the VPU (coda) driver is being loaded correctly with
the associated firmware.
After that, these v4l2dec/enc plugins should be reported by gst-inspect.
I discovered where I was going wrong. My Yocto/Freecale build for the
Wandboard with standard fslc-x11 distro and linux-fslc kernel did have
iMX8 video hardware supported and working!
I was originally using a Wandboard supplied binary distro for testing
that was quite old that used gstreamer modules such as imxv4l2sink,
vpuenc_h264, overlaysync etc and most of the Internet documentation
for iMX6's was the same. However the latest dunfell level gstreamer
uses the more generally standard v4l2h264enc gstreamer module that
ends up by using the iMX6 VPU's H264 encoder.
Now I just need to work out if the current iMX6 video hardware API's
allows me to do the video processing pipeline I want/need with
suitably low enough CPU and memory bandwidth usage. Also how to get an
efficient gstreamer video source for performance testing while I await
a working physical camera as videotestsrc uses a lot of CPU for some
reason masking the performance testing.
Good to hear you make progress!

Note I am using Fedora33 as a build platform now, and that seems fine
with dunfell although not yet marked as a known working platform for
building.
I also always use the latest Fedora as my development platform. It usually works without a problem (except for the warning). Only the uninative cannot always keep up with the latet glibc used in Fedora. But that is usually picked up very quickly.

For older Yocto versions, I use systemd containers with a matching OS, like CentOS 7 or Debian. Toradex has a nice write-up on how to set that up.

Many thanks for everyone's help.
Terry


Re: imx6dl dunfell and kernel: linux-fslc or linux-fslc-imx?

Terry Barnaby
 

On 25/02/2021 12:02, Fabio Estevam wrote:
On Thu, Feb 25, 2021 at 8:58 AM Terry Barnaby <terry@beam.ltd.uk> wrote:

Many thanks for that info, from Internet info it looked like the
gstreamer-imx package and associated lower libraries/drivers were
needed, I will try another build, the gstreamer video hardware support
wasn't there (as reported by gst-inspect-1.0) when I tried, maybe I got
lost in a tangle of distro, kernel and bitbake targets.
The v4l2dec/enc plugins only show up if the VPU driver were successfully loaded.

Make sure that the VPU (coda) driver is being loaded correctly with
the associated firmware.

After that, these v4l2dec/enc plugins should be reported by gst-inspect.
I discovered where I was going wrong. My Yocto/Freecale build for the Wandboard with standard fslc-x11 distro and linux-fslc kernel did have iMX8 video hardware supported and working!

I was originally using a Wandboard supplied binary distro for testing that was quite old that used gstreamer modules such as imxv4l2sink, vpuenc_h264, overlaysync etc and most of the Internet documentation for iMX6's was the same. However the latest dunfell level gstreamer uses the more generally standard v4l2h264enc gstreamer module that ends up by using the iMX6 VPU's H264 encoder.

Now I just need to work out if the current iMX6 video hardware API's allows me to do the video processing pipeline I want/need with suitably low enough CPU and memory bandwidth usage. Also how to get an efficient gstreamer video source for performance testing while I await a working physical camera as videotestsrc uses a lot of CPU for some reason masking the performance testing.

Note I am using Fedora33 as a build platform now, and that seems fine with dunfell although not yet marked as a known working platform for building.

Many thanks for everyone's help.

Terry

201 - 220 of 24791