Could not inherit file classes/pypi.bbclass with meta-raspberrypi Yocto Bitbake - yocto

I have cloned Poky in a folder as follows:
~/Yocto/poky/
I checked out a branch for Rocko as mentioned in the Quick Start Guide
I was successful in creating a qemu according to the Guide. I wish to create Raspberry Pi Image and hence I cloned the meta-raspberrypi in the ~/Yocto/poky/ directory as well as openembedded in the same directory. Hence the current directory structure is as follows:
~/Yocto/poky/
-- meta-raspberrypi/
-- meta-openembedded/
I execute the source oe-init-build-env and change the content of the local.conf and bblayers.conf as follows
local.conf
MACHINE = "raspberrypi2"
bblayers.conf
BBLAYERS ?= " \
/home/<user>/Yocto/poky/meta \
/home/<user>/Yocto/poky/meta-poky \
/home/<user>/Yocto/poky/meta-yocto-bsp \
/home/<user>/Yocto/poky/meta-openembedded/meta-oe \
/home/<user>/Yocto/poky/meta-openembedded/meta-multimedia \
/home/<user>/Yocto/poky/meta-openembedded/meta-networking \
/home/<user>/Yocto/poky/meta-openembedded/meta-python \
/home/<user>/Yocto/poky/meta-raspberrypi \
"
ERROR
upon bitbake rpi-basic-image
ERROR: ParseError at /home/<user>/Yocto/poky/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb:9: Could not inherit file classes/pypi.bbclass
On the Yocto Mailing List a similar query was resolved by adding openembedded/meta-python which already exists in my bblayers file.
I also tried changing the meta-raspberrypi branch to the Rocko by doing the following
git checkout origin/rocko -b rocko
in order to be with the same Poky version of 2.4.2
but I still get the same error.
How should I go about this error in order to create a Rpi Image.

All of your layers need to use matching branches. In this case your meta-python is probably too new (it no longer has the pypi class because it was moved to oe-core). Checkout the rocko branch of meta-openembedded repo and things should start working.

Related

How to include the kernel configuration to my meta-layer and into the build?

I am using cl-som-imx7 board, using gatesgarth branch to setup the yocto env.
I have changed the kernel configurations by
Executing the command
bitbake -c memuconfig virtual/kernel
Rename the .config to defconfig
I don't have any luck in including those changes inside my build. Any suggestion would be appreciated.
The following section of the Yocto Manual illustrates how to do that:
https://www.yoctoproject.org/docs/2.5/kernel-dev/kernel-dev.html#changing-the-configuration
You basically need to rename this .config file to defconfig and add it with your kernel recipe to be as follows
linux_x.x.bb
linux
|
|_ defconfig
and add the following lines to your recipe:
# This to add the package name directory to search paths (i.e. The recipe name which is linux in this example)
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://defconfig"

"Could not inherit file classes/multilib_script.bbclass" during Yocto Bitbake

I'm trying Yocto Bitbake using "Rocko", but encountered the error below:
"Could not inherit file classes/multilib_script.bbclass"
I can see the description to inherit "multilib_script" in certain recipe indeed. But I was not able to find out which layer should be cloned and added as bblayer in "Rocko" version.
bblayers.conf
BBLAYERS ?= " \
${TOPDIR}/../poky/meta \
${TOPDIR}/../poky/meta-poky \
${TOPDIR}/../poky/meta-yocto-bsp \
${TOPDIR}/../meta-openembedded/meta-oe \
"
What should I do to solve this problem?
That bbclass file is part of the main poky metadata layer which you have already included.
As can be seen from http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/classes?h=rocko the classes/multilib_script.bbclass file isn't present in the rocko branch.
It is present in a later release, e.g. thud http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/classes?h=thud and any other releases beyond that.
To use a recipe using that script, you'd either have to backport the class or use a later release where it is present.

Problem with Yocto recipe modification (.bbappend)

I am new in Yocto environment, and I am trying to modify my initscripts recipe (from Poky) with .bbappend file. The problem is that everything I tried with it, it never worked. My file (../sources/recipes-core/initscripts/initscripts_%.bbappend) contains:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://type.sh"
do_install_append () {
install -d ${D}/${sysconfdir}/init.d/test
install -m 755 ${WORKDIR}/type.sh ${D}${sysconfdir}/init.d/test/type.sh
update-rc.d -r ${D} type.sh start 30 2 3 4 5 .
}
It seems that nothing is working ("test" folder is not even created in the rootfs, nor with another folder in /etc).
If I write a mistaken file in SRC_URI in .bbbappend file, bitbake shows a warning (OK).
If I write some syntax error in .bbappend file, bitbake not finishes, it returns an error (OK).
Typing bitbake-layers show-appends , I can see that my .bbappend file appears and it is not skipped.
Maybe the problem is the bitbake, I am doing it with bitbake core-image-minimal, maybe I need another target.
Please, let me know any advice because I don't know what else I can check.
Thank you so much,

Installing library into yocto rootfs

I am working on yocto i have compiled a library using yocto, which installed library inside
/tmp/work/corei7-64-poky-linux/lib-ad/git-r0/package/usr/lib/libad.a
Now inside my recipe i have included
FILES_${PN} += " \
libad.a \
"
Now this is adding this file into build-corei7-64/tmp/sysroots/corei7-64/usr/lib/libad.a
but not into final rootfs, I assume FILES_${PN} will copy my files into rootfs.
but this is not happening.
Any help is appreciated, Thank You
Well, up to now you managed to build and package your code correctly.
I guess you mean with rootfs the image that you build. To add a package to an image you can set IMAGE_INSTALL_append = "lib-ad" within your local conf

Compile rygel for yocto with plugins

I'm using bitbake to compile rygel for yocto from the meta-openembedded layer, with the plugins mpris and gst-launch.
As per the PACKAGECONFIG docs, I created a bbappend file and added the following:
EXTRA_OECONF = "--disable-introspection \
--disable-tracker-plugin \
--with-media-engine=gstreamer \
--enable-mpris-plugin \
--enable-gst-launch-plugin"
PR = "r1"
It compiles and installs, but has no plugins.
The append shows up when I run bitbake-layers show-appends, so at least bitbake is finding it. After running bitbake the directory tmp/work/core2-64-poky-linux/rygel/0.26.1-r1/image/usr/lib/rygel-2.6/plugins/ is populated. Then when I run the image /usr/lib/rygel-2.6/ contains an engines dir and nothing else.
Any idea where I'm going wrong?
I don't think your read all the way down to "If you want to change an existing PACKAGECONFIG block, you can do so one of two ways:".
From a bbappend, just do
PACKAGECONFIG_append = " mpris gst-launch"
In the recipe do_install, they remove some of the engines and plugins files. This might be the reason you do not see them in your image.
do_install_append() {
# Remove .la files for loadable modules
rm -f ${D}/${libdir}/rygel-${LIBV}/engines/*.la
rm -f ${D}/${libdir}/rygel-${LIBV}/plugins/*.la
}
your compiling plugins successfully and not able to see in board(rootfs)? if yes please add below line in your .bbappend file. '
FILES_${PN} += "${libdir}/*"
this will add all your compiled plugins to your rootfs image.