bitbake linux-imx-rt error: Multiple providers virtual/kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bitbake linux-imx-rt error: Multiple providers virtual/kernel

5,112 Views
durmus
Contributor IV

Hi,

I followed "Freescale Yocto Project User's Guide" for "fsl-yocto-L3.14.52_1.1.0-ga".

When the setup is complete (repo init, repo sync, machine setup, etc.) the first thing I did was:

bitbake linux-imx-rt

And it gives the following errors:

ERROR: Multiple .bb files are due to be built which each provide virtual/kernel (/home/durmus/Yocto/fsl-release-bsp_fido/sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-rt_3.14.28.bb /home/durmus/Yocto/fsl-release-bsp_fido/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-imx_3.14.52.bb).

This usually means one provides something the other doesn't and should.

ERROR: The recipe linux-imx-rt is trying to install files into a shared area when those files already exist. Those files and their manifest location are:

   /home/durmus/Yocto/fsl-release-bsp_fido/build/tmp/sysroots/imx6solosabresd/sysroot-providers/virtual_kernel

Matched in manifest-imx6solosabresd-linux-imx.populate_sysroot

Please verify which recipe should provide the above files.

The build has stopped as continuing in this scenario WILL break things, if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error however switching DISTRO_FEATURES on an existing build directory is not supported, you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above.

ERROR: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.

ERROR: Function failed: sstate_task_postfunc

ERROR: Logfile of failure stored in: /home/durmus/Yocto/fsl-release-bsp_fido/build/tmp/work/imx6solosabresd-poky-linux-gnueabi/linux-imx-rt/3.14.28-r0/temp/log.do_populate_sysroot.8289

ERROR: Task 3 (/home/durmus/Yocto/fsl-release-bsp_fido/sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-rt_3.14.28.bb, do_populate_sysroot) failed with exit code '1'

I tried adding PREFERRED_PROVIDER_virtual/kernel = "linux-imx-rt" to my local.conf, but the result is still the same.

How can I resolve this issue?

Thanks in advance.

Durmus

Labels (3)
3 Replies

2,598 Views
charles-chau
Contributor II

Have you tried to delete the /tmp, /sstate-cache and then rebuilt?

Try to create a clean build folder instead of using the old one to prevent multiple files problems.

If you know that you need to use linux-imx-rt, then try to remove the linux-imx from /meta-fsl-bsp-release/meta-bsp from bblayers.conf or /sources

2,598 Views
durmus
Contributor IV

Hi,

bitbake linux-imx-rt was the first thing I did after Yocto setup. Therefore, there was no /tmp or /sstate-cache folder to begin with.

I think the errors occur because all kernel recipes try to use /tmp/work-shared folder.

In my case:

/tmp/work/imx6solosabresd-poky-linux-gnueabi/linux-imx-rt/3.14.28-r0/git links to /tmp/work-shared/imx6solosabresd/kernel-source

/tmp/work/imx6solosabresd-poky-linux-gnueabi/linux-imx/3.14.28-r0/git also links to /tmp/work-shared/imx6solosabresd/kernel-source

This was not the case in previous versions.

Following your suggestion, I removed the .bb files which caused errors:

/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-imx_3.14.52.bb

/sources/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.14.28.bb

/sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-mfgtool_3.14.28.bb

/sources/meta-fsl-arm/recipes-kernel/linux/linux-fslc_4.1.bb

Then I cleaned /tmp and /sstate-cache and now it seems to build linux-imx-rt. However, I will need to use both linux-imx and linux-imx-rt.

How can I modify the recipes so that they will not use the shared-area?

Durmus

0 Kudos
Reply

2,598 Views
charles-chau
Contributor II

You would not need to use to 2 kernel recipes for one machine.

What you should do is to modify the kernel to match what you need.

Try to get the source code of the kernel. Modify the the kernel recipe to point the SRC_URI to the directory of the downloaded/modified Kernel.  This is the kernel source from linux-imx linux-2.6-imx.git - Freescale i.MX Linux Tree

By the way, where do you get the document?  There are two versions of BSP, the community one and the Freescale one.  The community one is more updated while the Freescale one is stable.  You could find the community one in FSL Community BSP .  Choose one, but not both. 

0 Kudos
Reply