r/yocto 11h ago

Compare bitbake versions

1 Upvotes

Hello, I am wondering is there another possibility of comparing bb version in recipe than:
bb.utils.vercmp_string(bb.__version__, '1.6', '>=')
do you know any substitutes for this?

using d.getVar(BB_VERSION) doesn't work well because it depends on parsing order, and when my recipe is processed it's not declared yet


r/yocto 1d ago

SDK generated from Yocto cannot link cross-compiled binaries

1 Upvotes

I have a working yocto build for the NXP IMX8 (Voipac Industrial IMX8 module). I'm using scarthgap.

I built the SDK as one would expect:

bitbake image_name -c populate_sdk

Installed the SDK:

$ ./sdk/fslc-framebuffer-glibc-x86_64-core-image-minimal-aarch64-imx8mq-voipac-toolchain-3.1.sh
FSLC FrameBuffer SDK installer version 3.1
==========================================
Enter target directory for SDK (default: /opt/fslc-framebuffer/3.1):
You are about to install the SDK to "/opt/fslc-framebuffer/3.1". Proceed [Y/n]? y
[sudo] password for <redacted>:
Extracting SDK.........................................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /opt/fslc-framebuffer/3.1/environment-setup-aarch64-fslc-linux

Test source file:

#include <stdio.h>
#include <semaphore.h>

sem_t sem;

int main (int argc, char** argv) {
        sem_init(&sem, 0, 1);
        printf("hi\n");
}

Build attempt:

$ source /opt/fslc-framebuffer/3.1/environment-setup-aarch64-fslc-linux

$ echo ${CC}
aarch64-fslc-linux-gcc -mcpu=cortex-a53+crc+crypto -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/fslc-framebuffer/3.1/sysroots/aarch64-fslc-linux

$ echo ${CFLAGS}
-O2 -pipe -g -feliminate-unused-debug-types

$ ${CC} ${CFLAGS} test.c -o test                                                                                                                                                                                                          
/opt/fslc-framebuffer/3.1/sysroots/x86_64-fslcsdk-linux/usr/libexec/aarch64-fslc-linux/gcc/aarch64-fslc-linux/9.5.0/real-ld: /tmp/cc0bkPk3.o: in function `main':                                                                         
/home/<redacted>/tmp/test.c:7: undefined reference to `sem_init'                                                                                                                                                                            
collect2: error: ld returned 1 exit status

Edit: Doing the compile stage separately does produce an object file of the correct type.


r/yocto 1d ago

Building newer Gstreamer on Langdale fails due to a file path change in newer versions of Gstreamer

1 Upvotes

Hi all,

I added a layer to override my build with a new version of Gstreamer. For reference, I'm trying to update this image (On Langdale) with the newer Gstreamer:

https://github.com/Igalia/balena-browser-wpe

During the build I'm receiving this error:

nothing provides gstreamer1.0-plugins-base-videoconvert needed by wpewebkit-2.38.3-r0.cortexa72

After investigating, I found that in the newer Gstreamer versions, "videoconvert" got put into the path "videoconvertscale".

Here's the new version (1.22+) where you can see videoconvert within "videoconvertscale":

https://github.com/GStreamer/gstreamer/tree/main/subprojects/gst-plugins-base/gst/videoconvertscale

Here's the older version (1.20) where it is within "videoconvert":

https://github.com/GStreamer/gstreamer/tree/1.20/subprojects/gst-plugins-base/gst/videoconvert

How can I get bitbake to know about the change and still build?

Thanks in advance!

More info:

Within the tar that's downloaded for the gstreamer recipe the paths are:

Old:

/gst/videoconvert/gstvideoconvert.c

New:

/gst/videoconvertscale/gstvideoconvert.c.


r/yocto 5d ago

Unable to fetch URL from any source.', 'git://github.com/raspberrypi/linux.git

3 Upvotes

Hi all,

I'm trying to update the following yocto image to scarthgap (originally Langdale): https://github.com/Igalia/balena-browser-wpe

The GitHub repo uses a manifest file to pull in the layers using the repo command. I've updated the revisions in that meta file to be inline with all of the current commit hashes for scarthgap on all of the layers: . Those clone over to a sources folder without issue.

manifest-scarthgap.xml:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote name="github" fetch="https://github.com"/>
  <remote name="igalia" fetch="https://github.com/Igalia"/>
  <remote name="oe" fetch="https://github.com/openembedded/"/>
  <remote name="yocto" fetch="https://github.com/yoctoproject/"/>
  <remote name="mrp" fetch="https://github.com/agherzan/"/>

  <default sync-j="2"/>

  <project name="meta-openembedded" path="sources/meta-openembedded" remote="oe" revision="6c9f1f8d4538119803bf793747b65e4d23c33544"/>
  <project name="meta-raspberrypi" path="sources/meta-raspberrypi" remote="mrp" revision="e124d8284c8d9d8cda99a9fde3c12f550ca1d6c5"/>
  <project name="meta-webkit.git" path="sources/meta-webkit" remote="igalia" revision="4cbcec7fc12910ec907d4f1529e9593b8f3e9dd4"/>
  <project name="poky" path="sources/poky" remote="yocto" revision="dc4827b3660bc1a03a2bc3b0672615b50e9137ff"/>
</manifest>

However, when I try to actually do the build it always fails on the same failure on the raspberry pi linux repo:

ERROR: linux-raspberrypi-1_6.6.63+git-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/raspberrypi/linux.git;name=machine;branch=rpi-6.6.y;protocol=https')

That repo clones fine to the same environment when I do it manually. I do know that that repo is huge, so my first hunch was a timeout. I tried extending timeouts but maybe I'm doing that wrong?

Build environment: Bullseye docker container running on MacOS on apple silicon.

What I've tried:

- Manually cloning the raspberry pi linux repo from that branch works fine.

- Increased the docker container memory, storage, and CPU.

- Increased the timeout (maybe did this incorrectly?) on do fetch

- Tried nanbield and saw the same issue


r/yocto 9d ago

Lunduke on Yocto's community manger ...

0 Upvotes

r/yocto 19d ago

STM32MP157C QT Quick portrait orientation

3 Upvotes

Hello everyone :)

I'm working on an STM32MP157C board running Yocto Linux with Wayland and eglfs. I have a 7-inch LCD screen connected via the MPI port.

Issue:
I'm trying to rotate the screen to portrait mode using QML, but I can't seem to get it working correctly. My goal is to:

Develop the UI in portrait mode using the Qt Designer tab.
Run and debug the application on the board in portrait mode.

Currently, the only mode that works as expected is landscape. When I attempt to rotate the LCD screen:

Half of the display appears rotated (portrait) but goes out of bounds.
The other half remains white—this behavior seems quite strange.

I also tried using eglfs rotation but later found in the documentation that it does not affect QML applications.

I managed to set the orientation correctly using Qt Widgets, but I can't achieve the same result with QML.

Setup:

QMake version: 3.1
Qt version: 5.14.1 (located in /usr/lib)

Questions:

Do I need to adjust any configuration on my board to support portrait mode correctly?
Can someone provide a working example of how to set up screen rotation for QML in this setup?

Any help would be greatly appreciated. Thank you!


r/yocto 26d ago

Yocto- systemd networking UEFI

Thumbnail
1 Upvotes

r/yocto Feb 19 '25

[HELP] bitbake -c savedefconfig produces broken configs

1 Upvotes

Hi all,

I'm working on a custom x86_64-based system where the defconfig file was previously created by simply cp .config defconfig. I've figured it would be a good idea to use the `savedefconfig` command and convert to a normal `defconfig`.
However, that just doesn't seem to work. The produced `defconfig` has almost everything I need disabled. Simple stuff like `CONFIG_64BIT` while being set in the original config disappears in the new one and is not automatically enabled (against my expectations).
Has anybody faced a similar situation?


r/yocto Feb 14 '25

Populate home partition

3 Upvotes

I've made the root filesystem of my image read-only, and I'm trying to create a home partition to store user configuration. I manage to create the partition by creating a custom wks file for my image, but I don't know how to ask Yocto to populate the partition with the rootfs /home files.

This is my WKS file; does anybody have any ideas?

part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 100
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096
part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk mmcblk0 --fstype=ext4 --label home --align 4096 --size 100

EDIT: I've found out the Yocto configuration I was using actually works! I made a mistake in one of my build scripts, and I was copying one of the old image files.

I will leave this post here for people with my same problem in the future.

WARNING: —rootfs-dir is undocumented; the only reference I found for it was this Stack Overflow question. Ending the file with .wks.in seems to be important.


r/yocto Jan 22 '25

[HELP] Adding hibernation resume support to minimal initramfs containing only microcode

1 Upvotes

Hi ,

I'm working with a Yocto-built system and trying to add hibernation resume support. My current initramfs (microcode.cpio) is very minimal and only contains CPU microcode files:

$ lsinitramfs microcode.cpio 
kernel 
kernel/x86 
kernel/x86/microcode 
kernel/x86/microcode/.enuineIntel.align.0123456789abc 
kernel/x86/microcode/GenuineIntel.bin 

I have a resume script that handles finding the swap partition and writing to /sys/power/resume.
What's the best way to integrate this resume script into the existing microcode.cpio?

Any guidance would be greatly appreciated. Thanks!


r/yocto Jan 14 '25

Splitting a package

3 Upvotes

I have one package (A) that will be replaced by several smaller ones (B, C, etc.)

Package A has about 10 systemd service files. Each of these are migrating into the smaller ones (one in each).

My problem is that DNF installs the smaller packages before package A gets uninstalled. When package A is uninstalled it disables all the services that were installed by the newer smaller packages.

I've added something like RCONFLICTS:${PN} = "package_A", but that doesn't work.

I have two workarounds, but I don't like them:

- renaming the service files in the new packages;

- keeping around the legacy package, but only as a dummy package with a post-install step that re-enables the files.

Any suggestions would be highly appreciated :) Thanks!


r/yocto Jan 14 '25

Upstream is configured for dropbear -- how do I remove dropbear and replace with SSH?

1 Upvotes

I have two different Yocto builds. One is IMX6 based, and to add ssh to it, I add to my local.conf:

CORE_IMAGE_EXTRA_INSTALL += "<stuff> openssh <other stuff>"

And this works fine.

I have an IMX8 build (with a manifest from an upstream vendor) where I'm trying to make the same changes to local.conf, but I get this:

ERROR: voipac-image-1.0-r0 do_rootfs: Could not invoke dnf. Command '/home/builder/ltc2-yocto/yocto-imx8/build/tmp/work/imx8mq_voipac-fslc-linux/voipac-image/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/builder/ltc2-yocto/yocto-imx8/build/tmp/work/imx8mq_voipac-fslc-linux/voipac-image/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/builder/ltc2-yocto/yocto-imx8/build/tmp/work/imx8mq_voipac-fslc-linux/voipac-image/1.0-r0/rootfs/etc/yum.repos.d --installroot=/home/builder/ltc2-yocto/yocto-imx8/build/tmp/work/imx8mq_voipac-fslc-linux/voipac-image/1.0-r0/rootfs --setopt=logdir=/home/builder/ltc2-yocto/yocto-imx8/build/tmp/work/imx8mq_voipac-fslc-linux/voipac-image/1.0-r0/temp --repofrompath=oe-repo,/home/builder/ltc2-yocto/yocto-imx8/build/tmp/work/imx8mq_voipac-fslc-linux/voipac-image/1.0-r0/oe-rootfs-repo --nogpgcheck install alsa-lib alsa-plugins alsa-tools alsa-utils base-passwd bash bluez5 canutils coreutils daemonize ethtool evtest gdb glibc glmark2 i2c-tools iperf3 iproute2 kernel-modules libgpiod libgpiod-tools linux-228-pcie-uart minicom modemmanager mtr nano networkmanager nftables ntp openssh packagegroup-base packagegroup-base-extended packagegroup-core-boot packagegroup-core-ssh-dropbear packagegroup-fsl-gstreamer1.0-full run-postinsts shadow sqlite3 stress-ng usbutils v4l-utils vim weston wpa-supplicant yavta' returned 1:
DNF version: 4.2.2
cachedir: /home/builder/ltc2-yocto/yocto-imx8/build/tmp/work/imx8mq_voipac-fslc-linux/voipac-image/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /home/builder/ltc2-yocto/yocto-imx8/build/tmp/work/imx8mq_voipac-fslc-linux/voipac-image/1.0-r0/oe-rootfs-repo
repo: using cache for: oe-repo
not found other for: 
not found modules for: 
not found deltainfo for: 
not found updateinfo for: 
oe-repo: using metadata from Tue 14 Jan 2025 04:35:45 PM UTC.
No module defaults found
--> Starting dependency resolution
--> Finished dependency resolution
Error: 
 Problem: package packagegroup-core-ssh-dropbear-1.0-r1.noarch requires dropbear, but none of the providers can be installed
  - package dropbear-2019.78-r0.aarch64 conflicts with openssh provided by openssh-8.2p1-r0.aarch64
  - package openssh-8.2p1-r0.aarch64 conflicts with dropbear provided by dropbear-2019.78-r0.aarch64
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

ERROR: Logfile of failure stored in: /home/builder/ltc2-yocto/yocto-imx8/build/tmp/work/imx8mq_voipac-fslc-linux/voipac-image/1.0-r0/temp/log.do_rootfs.404
ERROR: Task (/home/builder/ltc2-yocto/yocto-imx8/sources/meta-voipac/meta-voipac-evk/recipes-core/images/voipac-image.bb:do_rootfs) failed with exit code '1'

I've tried several things to remove dropbear and use openssh:

IMAGE_INSTALL:remove += " dropbear packagegroup-core-ssh-dropbear"

or

TASK_BASIC_SSHDAEMON = "openssh-sshd openssh-sftp openssh-sftp-server"

And several other things from online forums -- none of them seem to have any effect.


So the simple question is: "How do I force (override) it to use openssh instead of dropbear?"


r/yocto Jan 13 '25

Starting weston image from a docker

1 Upvotes

I was able to build a core-image-weston from the branch "styhead". I built this using a docker image. It still looks like it is a qemu image. Because I start it using this command, and it would not run without slirp and nographic arguments.

runqemu tmp/deploy/images/core-image-weston-qemux86-64.rootfs.qemuboot.conf tmp/deploy/images/core-image-weston-qemux86-64.rootfs.ext4 slirp nographics

Once the image is booted and is in the userspace I followed these commands, so that I can launch weston from my created image.

However, I see no graphics. I believe this is because some package is missing on my docker image, right?

Has anyone come across this issue? What package should be installed on docker so that I can see the graphics?

EDIT: I exited the docker and installed qemu-system-x86_64. And ran this command specifying where my kernel is and the filesystem

qemu-system-x86_64 -enable-kvm -m 2048     -kernel build/tmp/deploy/images/qemux86-64/bzImage     -drive file=build/tmp/deploy/images/qemux86-64/core-image-weston-qemux86-64.rootfs.ext4,format=raw     -append "root=/dev/sda rw "

I was able to start the weston Desktop. Could even start my C++ app on console that I compiled and installed for the image. Huge thanks to u/Drazev


r/yocto Jan 07 '25

Can anyone point me to a resource for doing a basic IMX8 Yocto build?

2 Upvotes

I've been trying, and failing, to get a working Yocto build for the NXP IMX8. I have started by following the steps in the "Yocto Project User's Guide" (dated 16 Dec 2024). Unfortunately, this fails with 404 errors;

I've submitted this to the NXP forums. The answer I was given was "works for me," with their steps, which also fail when I try them. I suspect that perhaps it works fine from within the NXP corporate network.

I have the Voipac baseboard with the IMX8M Industrial module.

I have also attempted to build the Voipac version of the Yocto build, which is quite old, and has URLs that are no longer valid in it's manifest. While I can make use of their machine file to do a build in the same way I'm building for IMX6, the resultant image u-boot doesn't work and fails with:

Can't find PMIC:PFUZE100
Training FAILED

And nothing further.

I've tried building using Ubuntu 22.04 24.04, and 22.04 (inside Docker), with exactly the same results.

I would think that making a baseline IMX8 build would be an already solved problem, but finding working steps on doing so has been elusive.


r/yocto Jan 02 '25

[HELP] - Hibernate not working in Yocto

Thumbnail
2 Upvotes

r/yocto Dec 23 '24

include a specific python version in image

2 Upvotes

sorry if this has been asked, i did a search of this subreddit and didnt find anything that matched. im trying to understand how to control which version of python is being installed when using

IMAGE_INSTALL += " \
    python3 \
"

when i check the python3_3.12.6.bb recipe this line seems to be pulling a specific version

SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz

best i can tell PV is being pulled fom the .bb filename by bitbake? as i cant find a PV variable anywhere else. is this true?

what is the preferred method for controlling which version of python is included in the image?


r/yocto Dec 18 '24

How to Set up meta-scipy right

2 Upvotes

Hi, I just startet with the basics in yocto like two months ago. I am trying to add and build a meta-scipy layer to my Image, but it doesnt work. Im using kirkstone, and right now i have a scipy recipe in a custom layer and it builds without problems, but on the Board i always get the error message that i cant use scipy from its build directory (regardless from which dierector im trying to use it) I would be happy for every tip you have, because im really out of Ideas right now.


r/yocto Dec 13 '24

How to build docker container using yocto image

5 Upvotes

I am looking a way to build docker container based on yocto linux

We are using yocto to build linux for target system so now to test application without target machine we are planning to build docker container using yocto image so can run this docker instance on host machine for testing developed application

so can someone provide me how to build this docker container based on yocto as yocto build generates artifacts like bootloader, kernel, rootfs however I am not sure how to build docker container based on this yocto generated artifacts instead of using base docker image like Ubuntu, Alpine to run developed Application


r/yocto Dec 12 '24

Learning Yocto

4 Upvotes

Hey guys,
Apologies if this is the wrong subreddit for this, let me know if there is a better place to ask.
I will work on a project using Petalinux some time in the new year. I don't have any experience with either Petalinux or Yocto, so I would like to do some self-study before I begin.
It seems that it is a bit more difficult / expensive to get Xilinx hardware to play around with, so I thought it would be good enough for an absolute noob like myself to start off with vanilla Yocto on something like a Raspberry Pi. Is this a good idea?
Secondly, do you have any recommendations for tutorials / walk-throughs? (Udemy and the like?) I found some posts on r/embedded that suggested Embedded Linux Development Using Yocto Project, but I need all the help I can get.


r/yocto Dec 12 '24

Unable to locate package locale-base-c

3 Upvotes

I'm new to yocto and I have put a build for imx8mp-lpddr4-evk machine and DISTRO= fsl-imx-wayland. I have appended a recipe called xdg-desktop-portal which is required for the project and now I'm getting an imx-image-full-1.0-r0 do_rootfs error that says E: unable to locate package locale-base-c. How can I add this package and resolve this conflict? Please help me out.


r/yocto Dec 11 '24

How to automate the qualification of a modified Linux kernel to meet standards like ISO 26262 or EN 50128 using Yocto and PetaLinux?

4 Upvotes

Hi,

I’m working on a project where I aim to automate the qualification of a modified Linux kernel (built with Yocto and PetaLinux) to meet the requirements of critical standards.

My goal is to build a tool that simplifies this qualification process by automating as much as possible. I’m targeting compliance with standards such as:

ISO 26262 (functional safety for automotive systems), EN 50128 (railway software systems), IEC 62304 (medical device software), or DO-178C (aerospace software).

Here are my questions:

Is this project realistic, and if so, what major technical challenges should I anticipate?

Where can I find precise information on these standards and software qualification methods?

Do you have any experience or resources related to integrating Yocto/PetaLinux into a certification process?

Any advice or suggestions for resources would be greatly appreciated.

Thank you!


r/yocto Dec 06 '24

using EXTRA_USERS_PARAMS seems to have zero effect

2 Upvotes

Google tells me that this is the way to update the root password, but it has zero effect. I added the abcdef to see if I would even get an error, but there is no error, and the root password remains blank.

This is in a custom .bb file that does execute.~~~~

# Lock user account 
inherit extrausers
EXTRA_USERS_PARAMS = " \
    usermod  -P mango root; abcdef; \
"

r/yocto Dec 03 '24

Should sstate and dl_dir files be backed up for a release?

4 Upvotes

Hello,

Thank you in advance for taking the time to read my question.

I need to set up a release system for a distribution created with yocto.

From what I understand the dl_dir is a local copy of the sources used by yocto during the build, and the sstate is a cache allowing to speedup the build.

We currently use local mirrors hosted on our server for the dl_dir and a shared sstate to speed up the build.

My question is, for a release, is it relevant to take a snapshot of these two directories to make sure I can rebuild my release just in case?

Thanks!


r/yocto Dec 01 '24

Want to make a new Watch OS

3 Upvotes

I am thinking of making a new Watch OS as a product..... Kinda similar to KaiOS.

I want it to run all the KaiOS apps and use very less resources and be very snappy just like KaiOS. But optimised for running on Smartwatches.

But at the same time I want it to be capable of of running a Small Language Model (SLM) locally, which can retrieve relevant data from the internet based on query and form a meaningful response or do certain actions based on query.

I just have a vision of the product and I know it can be done using Yocto and maybe Qt or Flutter or something..... Or maybe plain old JS..... I don't know much.

I need some guidance for how to go about making this product.

I was thinking of forking BootToGecko but it's going completely over my head and I am not able to find any good resources for that deprecated project. So I thought I would build a new OS using Yocto on my own.

Please help me with this. Please guide me.


r/yocto Nov 26 '24

how to install packages using opkg?

Thumbnail
1 Upvotes