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.
Related
On Yocto, I have a recipe (application_1.0.0.bb) with a dependency to Poco package (poco_1.11.2.bb):
DEPENDS = "poco"
In the configure step of application_1.0.0.bb, I need to use arc.
This is an executable that the Poco recipe generates. In the poco/1.11.2-r0 workdir, I can see it under poco/1.11.2-r0/package/usr/bin/arc. However, it is not transfered to the application workdir.
I need a bbappend recipe but I cannot seem to make it work, poco_%.bbappend:
do_install:append() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/package/usr/bin/arc ${D}${bindir}
This gives an already stripped error, so I added INSANE_SKIP:${PN}:append = "already-stripped" but arc is still not present in application_1.0.0 WORKDIR.
do_install is a task where files are copied from build system to build target. Hence, it is mandatory to use variable FILES_PN to install files in your target.
Then, I advice you to add in your .bbappend:
FILES_PN += "/usr/bin/arc"
Note that do_install:append is a deprecated method. Use do_install_append instead. Also, you can remove this task if arc executable is already inside your workdir. You need to read documentation https://docs.yoctoproject.org/
What changes should make to enable dlt-system.
In build folder dlt-system application is not generating.
Manually by using command: cmake -D with dlt-system=ON it will generate but I need to generate while building please look at recipie image
Your recipe supports dlt-system via PACKAGECONFIG.
In order to activate that flags in the compilation process, you just need to add dlt-system to PACKAGECONFIG in .bb or .bbappend file to the recipe:
PACKAGECONFIG_append = " dlt-system"
If you want to add it from local.conf:
PACKAGECONFIG_pn-name_append = " dlt-system"
Just change name with your recipe name.
This will add -DWITH_DLT_SYSTEM=ON to EXTRA_OECMAKE which is used in do_configure of the cmake class.
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.
I have created a Yocto autotools project in Eclipse (based on a Hello World project).
I wanted to separate my code into a number of libs and then link them in a form of static libs (.a) to my project.
Now I have one app and a number of static libs. However, no matter what I try I can't get my code to compile. Each separate lib compiles and produces a .a file, but my app doesn't.
After searching the web I have a possible solution - add a direct link to my static libs:
MyApp_CPPFLAGS="-I$LOCATION"
MyApp_LDADD="/home/xxx/workspace/MyApp/Encoding2/Debug/libEncoding2.a"
This is my Makefile.am file, where libEncoding2.a exist in that path.
The error I get is:
make[2]: *** No rule to make target `"/home/xxx/workspace/MyApp/Encoding2/Debug/libEncoding2.a"', needed by `MyApp'. Stop.
I already built the lib so I am not sure why a make try is even needed.
Any help will be appreciated.
Because you use static library in your recipes, you can make a soft link to the library in your project source folder, i.e., hello-world-0.1, using following command to link to your static library
ln -s /home/xxx/workspace/MyApp/Encoding2/Debug/libEncoding2.a
and then edit your bb file, hello-world_0.1.bb, adding the source path to your URL
SRC_URI = " \
file://libEncoding2.a \
file://hello-world.c \
"
and in the do_compile block, using follow command to compile your project
do_compile() {
${CC} hello-world.c libEncoding.a -o hello-world
}
do_install() {
install -d ${D}${bindir}/Hello
install -m 0755 enet ${D}${bindir}/Hello
}
After you bitbake your project
bitbake hello-world
and run mkefidisk.sh, you can find the hello-world in /usr/bin/Hello/hello-world. Hope this hint can help you.
BTW, I am not familiar with autotools, I just use make to bitbake the recipes. And your static library should also be created in Yocto not in Eclipse I think. So I think your path for the static library maybe not correct, it should locate in ~/yocto/build/tmp/... or some where like this. In my case, it was located in ln -s ~/yocto/build/tmp/sysroots/intel-corei7-64/usr/lib/libEncoding.a depends on your target environment.
Depending on whether you're using libtool or not, you should have either a noinst_LTLIBRARIES or noinst_LIBRARIES list of targets, respectively. This should only include the name of your library (libEncoding2.la or libEncoding2.a.)
You should never use a full path for this, and you should not quote Make variables, so what you were looking for is
MyApp_CPPFLAGS = -I$LOCATION
MyApp_LDADD = libEncoding2.la # or .a
And that would work.
But on the other hand it seems like you should take some time to understand how autotools work, as it might not be what you're looking for. With a grain of salt you can take my Autotools Mythbuster as a starting point.
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.