cancel
Showing results for 
Search instead for 
Did you mean: 

Yocto project - bitbake fails when using stm32mp13-disco machine

NickXors
Associate

Hi there,

I'm new to the Yocto project and have been following this tutorial series in order to familiarise myself with the process. In the series, the presenter is using an STM32MP157 Discovery Kit to walk through the process. I initially followed the tutorial to the letter, and managed to build an image using the Poky reference distro, along with the ST BSP. I noticed that no image was made for the board I am using (STM32MP135-DK), so I decided to rebuild my image using the "stm32mp13-disco" machine present under "/meta-st-stm32mp/conf/machine". After rerunning "bitbake core-image-minimal" I was met with the following error:

 

ERROR: Could not invoke dnf. Command '/home/<my username>/Projects/yocto/build-mp1/tmp/work/stm32mp13_disco-poky-linux-gnueabi/st-image-userfs/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/<my username>/Projects/yocto/build-mp1/tmp/work/stm32mp13_disco-poky-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/<my username>/Projects/yocto/build-mp1/tmp/work/stm32mp13_disco-poky-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/yum.repos.d --installroot=/home/<my username>/Projects/yocto/build-mp1/tmp/work/stm32mp13_disco-poky-linux-gnueabi/st-image-userfs/1.0-r0/rootfs --setopt=logdir=/home/<my username>/Projects/yocto/build-mp1/tmp/work/stm32mp13_disco-poky-linux-gnueabi/st-image-userfs/1.0-r0/temp --repofrompath=oe-repo,/home/<my username>/Projects/yocto/build-mp1/tmp/work/stm32mp13_disco-poky-linux-gnueabi/st-image-userfs/1.0-r0/oe-rootfs-repo --nogpgcheck install linux-examples-stm32mp1-userfs packagegroup-st-demo' returned 1:
DNF version: 4.11.1
cachedir: /home/<my username>/Projects/yocto/build-mp1/tmp/work/stm32mp13_disco-poky-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /home/<my username>/Projects/yocto/build-mp1/tmp/work/stm32mp13_disco-poky-linux-gnueabi/st-image-userfs/1.0-r0/oe-rootfs-repo
User-Agent: falling back to 'libdnf': could not detect OS or basearch
repo: using cache for: oe-repo
oe-repo: using metadata from Thu 01 Feb 2024 09:52:00 AM UTC.
--> Starting dependency resolution
--> Finished dependency resolution
Error: 
 Problem: conflicting requests
  - nothing provides /bin/sh needed by linux-examples-stm32mp1-userfs-5.4+0+8e1c0b246c-r0.stm32mp13_disco
(try to add '--skip-broken' to skip uninstallable packages)

ERROR: Logfile of failure stored in: /home/<my username>/Projects/yocto/build-mp1/tmp/work/stm32mp13_disco-poky-linux-gnueabi/st-image-userfs/1.0-r0/temp/log.do_rootfs.2756753
ERROR: Task (/home/<my username>/Projects/yocto/meta-st-stm32mp/recipes-st/images/st-image-userfs.bb:do_rootfs) failed with exit code '1'

 

 This appeared to point at the recipe file "st-image-userfs.bb":

 

SUMMARY = "STM32MP userfs Image"
LICENSE = "MIT"

include recipes-st/images/st-image-partitions.inc

# Define to null ROOTFS_MAXSIZE
IMAGE_ROOTFS_MAXSIZE = ""

# Add specific package for our image:
PACKAGE_INSTALL += " \
    ${@bb.utils.contains('MACHINE_FEATURES', 'm4copro', 'm4projects-stm32mp1-userfs', '', d)} \
    linux-examples-stm32mp1-userfs \
    "

# Add demo application described on specific packagegroup
PACKAGE_INSTALL += " \
    packagegroup-st-demo \
    "

 

Before I rebuilt the image, I ran bitbake -c cleanall.

If you need to see any other files in order to help please let me know and I will oblige.

As I stated, I am very new to Yocto project and have not yet had the chance to tinker with things such as modifying recipe files or adding my own packages to the distribution.

I've unfortunately hit a bit of a dead end with this, and any help/pointers in the right direction would be very helpful.

EDIT: Just to add, I'm using a system running Debian 12 (Bookworm) with 8GB RAM, lots of disk space.

4 REPLIES 4
jschneider
Associate III

Hi,

 

Today I tried the same with mickledore distribution. I've got exactly the same error as mentioned above.

 

Best,

J. Schneider

karolalexandersecret
Associate II

Hi,

 

Same problem for me.

Tried also to add "IMAGE_INSTALL:append = " bash"" to local.conf file, but didn't work. Can someone help us on that ?

Ghassen HALLEB
Associate

I had the exact same issue. After days of struggling I managed to resolv the issue by setting the packager as debian instead of rpm in local.conf

PACKAGE_CLASSES ?= "package_deb"
Yassine1
Associate II

Did you find any solutions ?