what is a reference distribution? - yocto

I needed to understand what is poky in Yocto, so I typed the following question in Google:
what is poky in yocto
The first answer that I got was
Poky is a reference distribution of the Yocto Project. It contains the
OpenEmbedded Build System (BitBake and OpenEmbedded Core) as well as a
set of metadata to get you started building your own distro.
Then I tried to understand what is a reference distribution. I tried googling for it but came up empty.
Can someone explain what is a reference distribution? Are there non reference distributions? What does it mean for a piece of software to be a reference distribution?
P.S. I do know what Linux distros are. What I don't know is the meaning of the phrase reference distribution in the context of the Yocto project.

I understand what you need. click the yocto-tutorial
for better understanding of Yocto Project and Yocto Reference Distro's(poky)

Related

Cross compile, create a layer or use PIP

I'm new with Yocto and I have some questions.
1st- I want to run a C++ executable (with OpenCV). I have found two methods:
Cross compiling C++ code and copy the executable and OpenCV ".so"
files to Yocto (It works)
Create a layer with this code
Which method is better and why?
2nd- I want to work with python. I found two methods to include Python Libraries:
Creating a Layer
Adding Pip to yocto and using pip to install
Again I have the same question, which method is better?
Thank you so much!!!

"No package provides libsystemd.so.0(LIBSYSTEMD_219)" during do_rootfs

I'm attempting to build an image with the phytec bsp 18.2 from here: https://wiki.phytec.com/productinfo/phycore-i-mx7/bsp-yocto-fsl-imx7/
I require a newer version of systemd (> 234) and so am substituting the systemd recipe for version 234 from rocko, found here: http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd?h=rocko by putting this in a custom layer. However, during the do_rootfs step, I receive an error that "No package provides libsystemd.so.0(LIBSYSTEMD_219). I've tried a work-around recommended here: Smart can't install...no package provides shared object file and it didn't solve the issue. I've tried echoing libsystemd.so.0, LIBSYSTEMD_219, and libsystemd.so.0(LIBSYSTEMD_219) to both ${rootfs}/etc/rpm/sysinfo/Providename and ${rootfs}/var/lib/rpm/Providename and had no luck. Does anyone have an idea on how to fix this? I'd appreciate any help that could be offered, and please let me know if I can offer any more information.
I don't know about the yocto wrapper, etc, but in standard RPM-land, this error:
Computing transaction...error: Can't install python3-systemd-234-r0.0#cortexa7hf_neon: no package provides libsystemd.so.0(LIBSYSTEMD_219)
means that there is a .so or executable in the RPM named python3-systemd-234-r0.0 that was compiled with a specific version of libsystemd.so.0 that had the flag LIBSYSTEMD_219. That flag is the "ELF Symbol Versioning" and it's seen most with GLIBC_XX when you try to install an RPM that's too new for a target system (e.g. CentOS 7 RPM on CentOS 6).
The systemd on your target machine is too old, so it only defines the versions it is compatible with, e.g. libsystemd.so.0(LIBSYSTEMD_210) or similar.
What you need to do is build your python3-systemd-234-r0.0 on a machine with the same version of systemd as the target (or cross-compile appropriately), or create a systemd RPM that includes the functionality you're attempting.
So you need to figure out how to apply one of these solutions to your build system; sorry I don't know enough about yocto to help there.

Include precompiled zImage in yocto project

I have a custom board with imx6dl chip and peripherals. I have compiled u-boot, zImage and rootfs from examples provided by manufacturer. But when i try to build yocto from git repo with latests releases, it fails to run (some drivers not working, board is loading and display interface, but touchscreen is not working for ex.),
Is there any way to include precompiled binaries zImage, u-boot and device table to bitbake recipes? I'm very new to yocto project, and only need to get bootable image with working drivers and qt5.
If you have a working boot chain (e.g. u-boot, kernel and device tree) that you have built out-of-yocto, then you might try building a rootfs only. This requires two main settings, to be made in your local.conf to get started. Please don't firget that this is just a starting point, and it is highly advised to get the kernel/bootloader build sorted out really soon.
PREFERRED_PROVIDER_virtual/kernel = "linux-dummy to have no kernel being built, and something like MACHINE="qemuarm" to set up an armv7 build on poky later than version 3.0. The core-image-minimal target should at least be enough to drop you in a shell for starters, and then you can proceed from there.
Additionally, it might be qorth asking the board vendor or the yocto community (#yocto on the freenode server) if they know about a proper BSP layer. FSL things are quite nicely supported these days, and if your board is closely related to one of the well-known ones, you've got a high chance that meta-freescale just does the trick nicely.
Addition:
#Martin pointed out the mention of Qemu is misleading. This is just the easiest way to make Yocto build a userland for the armv7-architecture which the imx6dl is based on. The resulting root filesystem should be sufficiently compatible to get started, before moving on to more tuned MACHINE configuration.

How to add ldd utility to bitbake image

I need ldd utility in my final image of yocto. When I needed usbutils before, I went ahead and added the line in ../build/conf/local.conf file
CORE_IMAGE_EXTRA_INSTALL += "usbutils"
After searching around I came to see that ldd is part of the libc-bin package, atleast on my Ubuntu machine. But after reading this, I see that it is in eglibs recipe and not part of the standard package. Adding libc-bin similar to usbutils threw a Nothing RPROVIDES libc-bin error which is understandable.
What are the steps I take to get ldd onto my image if I need to add eglibs recipe. If not, is there another way I can do this.
Please bear with me, still a newbie with yocto and bitbake.
How to add "ldd" to your image depends on the used C library.
In case of glibc:
At least for the current "zeus" version the glibc recipes provide a separate ldd package, see: https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/glibc/glibc-package.inc?h=zeus#n27
In case of musl:
At least for the current "zeus" version the musl package itself provides ldd, see: https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/musl/musl_git.bb?h=zeus#n91
Adding packages to your image can be done in various ways but I would recommend to use
IMAGE_INSTALL_append. For more info in this topic please consult the YoctoProject manual: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#usingpoky-extend-customimage.

What is Bitbake and Poky?

Can someone please briefly explain what is Bitbake, Poky, Recipes in simple words? I just want a basic understanding of what these are. Thanks.
Let's create a simple relationship of Bitbake, poky and recipes.
Poky is the Yocto Project reference system and is composed of collection of tools and metadata. Poky is platform-independent and performs cross-compiling, using Bitbake Tool, OpenEmbedded Core, and a default set of metadata. The main objective of Poky is to provide all the features an embedded developer needs.
Bitbake is a task scheduler that parses Python and Shell script mixed code, which we called Recipes. The code parsed generates and runs tasks. They are a set of steps orders according to the code's dependencies.
Metadata is where all the Recipes are located. Metadata is composed of a mix of Python and Shell Script text files. Poky uses this to extend OpenEmbeddded Core, meta-yocto, and meta-yocto-bsp
Sources: Embedded Linux Development with Yocto Project by Otavio Salvador and Daiane Angolini
Bitbake is a generic task execution engine that allows shell and Python tasks to be run efficiently and in parallel while working within complex inter-task dependency constraints. More details: what is bitbake
Poky provides an open source, full-platform build tool based on Linux, X11, Matchbox, GTK+, Pimlico, Clutter, and other GNOME Mobile technologies. Poky is primarily a platform builder that generates filesystem images based on open source software. More details: what is poky
Recipes (.bb files) are fundamental components in the Yocto Project environment. Each software component built by the OpenEmbedded build system requires a recipe to define the component. More details: how to create a recipe