Search code examples
embedded-linuxyoctoyocto-recipe

Fail to build Yocto extensible SDK


I'm new to Yocto and I've been trying to setup for developing with devtool.

I've followed the instructions from from the Yocto Linux Kernel Development Manual, but I've made a change to Step #2, setting MACHINE = stm32mp1 since I'm targeting the STM32MP157D-DK1. However, Step #5 fails, where it asks you to build the SDK using the command bitbake core-image-minimal -c populate_sdk_ext with the following error:

ERROR: buildtools-tarball-1.0-r0 do_populate_sdk: Could not invoke dnf. Command '/home/myusername/Projects/yocto/stm32mp1-build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/myusername/Projects/yocto/stm32mp1-build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/sdk/image/etc/dnf/dnf.conf --setopt=reposdir=/home/myusername/Projects/yocto/stm32mp1-build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/sdk/image/etc/yum.repos.d --installroot=/home/myusername/Projects/yocto/stm32mp1-build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/sdk/image --setopt=logdir=/home/myusername/Projects/yocto/stm32mp1-build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/temp --repofrompath=oe-repo,/home/myusername/Projects/yocto/stm32mp1-build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/oe-sdk-repo --nogpgcheck install nativesdk-binutils nativesdk-buildtools-perl-dummy nativesdk-ca-certificates nativesdk-chrpath nativesdk-fiptool-stm32mp nativesdk-gcc-arm-none-eabi nativesdk-git nativesdk-git-perltools nativesdk-glibc-gconv-utf-16 nativesdk-glibc-gconv-utf-32 nativesdk-libnss-nis nativesdk-make nativesdk-mtools nativesdk-ncurses-libncursesw nativesdk-ncurses-terminfo-base nativesdk-openocd-stm32mp nativesdk-openssl-dev nativesdk-optee-sdk nativesdk-patch nativesdk-pigz nativesdk-python3-core nativesdk-python3-git nativesdk-python3-jinja2 nativesdk-python3-misc nativesdk-python3-modules nativesdk-python3-pycrypto nativesdk-python3-pycryptodomex nativesdk-python3-pyelftools nativesdk-python3-subunit nativesdk-python3-testtools nativesdk-rpcsvc-proto nativesdk-sdcard-raw-tools nativesdk-stm32wrapper4dbg nativesdk-svd-tools nativesdk-tar nativesdk-texinfo nativesdk-u-boot-mkimage nativesdk-wayland nativesdk-wget' returned 1:
DNF version: 4.2.2
cachedir: /home/myusername/Projects/yocto/stm32mp1-build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/sdk/image/var/cache/dnf
Added oe-repo repo from /home/myusername/Projects/yocto/stm32mp1-build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/oe-sdk-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 Sun 02 Jan 2022 01:50:06 AM UTC.
No module defaults found
--> Starting dependency resolution
--> Finished dependency resolution
Error: 
 Problem: conflicting requests
  - nothing provides libpython2.7.so.1.0()(64bit) needed by nativesdk-gcc-arm-none-eabi-9-r0.x86_64_nativesdk
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

ERROR: Logfile of failure stored in: /home/myusername/Projects/yocto/stm32mp1-build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/temp/log.do_populate_sdk.2232965
ERROR: Task (/home/myusername/Projects/yocto/poky/meta/recipes-core/meta/buildtools-tarball.bb:do_populate_sdk) failed with exit code '1'

Based on similar issues I've found on the internet, I've tried adding the layer meta-python2, and setting IMAGE_INSTALL_append = " python-dev" in my local.conf. However, the issue persists.

I'm on Linux Mint 20.2, which is based on Ubuntu 20.04 LTS. Below are the active layers:

layer                 path                                      priority
==========================================================================
meta                  /home/myusername/Projects/yocto/poky/meta       5
meta-poky             /home/myusername/Projects/yocto/poky/meta-poky  5
meta-yocto-bsp        /home/myusername/Projects/yocto/poky/meta-yocto-bsp  5
meta-oe               /home/myusername/Projects/yocto/meta-openembedded/meta-oe  6
meta-python           /home/myusername/Projects/yocto/meta-openembedded/meta-python  7
meta-st-stm32mp       /home/myusername/Projects/yocto//meta-st-stm32mp  6
meta-python2          /home/myusername/Projects/yocto/meta-python2    7

I've confirmed that bitbake core-image-minimal -c populate_sdk_ext succeeds with MACHINE = qemux86.

Just bitbake core-image-minimal command succeeds with MACHINE = stm32mp1.


Solution

  • I've fixed the build issue. It required adding meta-python2 as I did; but instead of IMAGE_INSTALL_append = " python-dev", TOOLCHAIN_HOST_TASK_append = " nativesdk-python-core" is needed instead in local.conf.