1

I want to build a yocto image with linux-raspberrypi which is present in meta-raspberrypi/recipe-kernel/linux-raspberrypi_x.x.bb

While building image with "bitbake core-image-minimal". It compiles kernel from poky/meta/recipe-kernel/linux-libc-headers_x.x.bb

If I use the following lines in local.conf

PREFERRED_VERSION_linux-raspberrypi = "4.9.%"
IMAGE_INSTALL_append = " linux-raspberrypi"

This is the Error I am getting. ERROR: Nothing RPROVIDES 'linux-raspberrypi' (but /home/harris/poky/meta/recipes-core/images/core-image-minimal.bb RDEPENDS on or otherwise requires it)

What else I should write in local.conf to compile kernel from meta-raspberrypi. Also how to stop bitbake fetching kernel directly from poky/meta/recipe-kernel/linux-libc-headers.

I am using 'sumo' branch.

Mohammed Harris
  • 326
  • 6
  • 25

1 Answers1

2

Remove IMAGE_INSTALL_append = " linux-raspberrypi" and try adding to local.conf (or machine.conf) PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi".

bac
  • 93
  • 1
  • 13
danrodlor
  • 1,329
  • 8
  • 16
  • Thanks danlor. But now inside recipe-kernel/ two kernel versions are available to build the kernel which I wish.I tried giving "PREFERRED_VERSION_linux-raspberrypi ??= "4.9%" ".But 4.14 kernel is only getting compiled.How to build the kernel that I wish(4.9). – Mohammed Harris Feb 08 '19 at 11:29
  • With "??=" you're setting a "weak" default value, that can (and will) be overrided by the use of "?=" and/or "=" (check it out; https://www.yoctoproject.org/docs/2.6/bitbake-user-manual/bitbake-user-manual.html#setting-a-weak-default-value). So, just rewrite your sentence in order to assure that the desired version is going to be set: PREFERRED_VERSION_linux-raspberrypi = "4.9%" – danrodlor Feb 11 '19 at 07:12