ragnoraq
Posts: 2
Joined: Fri Oct 04, 2019 4:12 pm

Yocto and BCM2835 library

Fri Oct 04, 2019 4:37 pm

Does anybody have any experience building a Yocto image that includes the BCM2835 library? Right now I'm just trying to build the core-image-minimal with the bcm2835 library added. It gets to the point in the build process where it starts trying to build the rootfs and then it fails and I've not been able to figure out what the problem is.

I have tried building the core-image-minimal without adding in the bcm2835 library and that builds fine so the problem appears to be with the library.

Here is the bitbake output from trying to build the image:

Code: Select all

bitbake core-image-minimal
Loading cache: 100% |#############################################################################################################################################################################################################################################################################################################################################################################################| Time: 0:00:02
Loaded 3318 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.42.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "raspberrypi2"
DISTRO               = "poky"
DISTRO_VERSION       = "2.7.1"
TUNE_FEATURES        = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU           = "hard"
meta                 
meta-poky            = "warrior:b58c50811b5151fb7f9980cb99c32df4eebd0b88"
meta-oe              
meta-multimedia      
meta-networking      
meta-python          = "warrior:3bdbf72e3a4bf18a4a2c7afbde4f7ab773aeded9"
meta-raspberrypi     = "warrior:0750d5d2bc9596f35d5d61bb0ff657be4b02bfdc"

Initialising tasks: 100% |########################################################################################################################################################################################################################################################################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 2 Found 0 Missed 2 Current 810 (0% match, 99% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: core-image-minimal-1.0-r0 do_rootfs: Could not invoke dnf. Command '/home/tom/Projects/raspberrypi/Brewer/build/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/tom/Projects/raspberrypi/Brewer/build/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/tom/Projects/raspberrypi/Brewer/build/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/yum.repos.d --installroot=/home/tom/Projects/raspberrypi/Brewer/build/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs --setopt=logdir=/home/tom/Projects/raspberrypi/Brewer/build/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp --repofrompath=oe-repo,/home/tom/Projects/raspberrypi/Brewer/build/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/oe-rootfs-repo --nogpgcheck install bcm2835 packagegroup-core-boot run-postinsts' returned 1:
DNF version: 4.1.0
cachedir: /home/tom/Projects/raspberrypi/Brewer/build/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /home/tom/Projects/raspberrypi/Brewer/build/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/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 Fri 04 Oct 2019 04:00:38 PM UTC.
Last metadata expiration check: 0:00:01 ago on Fri 04 Oct 2019 04:00:39 PM UTC.
No module defaults found
No match for argument: bcm2835
Error: Unable to find a match

ERROR: core-image-minimal-1.0-r0 do_rootfs: 
ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/tom/Projects/raspberrypi/Brewer/build/tmp/work/raspberrypi2-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.2523
ERROR: Task (/home/tom/Projects/Yocto/poky-warrior/meta/recipes-core/images/core-image-minimal.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2562 tasks of which 2561 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/tom/Projects/Yocto/poky-warrior/meta/recipes-core/images/core-image-minimal.bb:do_rootfs
Summary: There were 3 ERROR messages shown, returning a non-zero exit code
Here is my local.conf:

Code: Select all

MACHINE ?= "raspberrypi2"
DL_DIR ?= "/home/tom/Projects/Yocto/source"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"
IMAGE_INSTALL_append += "bcm2835" 
Here is the bblayers.conf

Code: Select all

# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  /home/tom/Projects/Yocto/poky-warrior/meta \
  /home/tom/Projects/Yocto/poky-warrior/meta-poky \
  /home/tom/Projects/Yocto/poky-warrior/meta-openembedded/meta-oe \
  /home/tom/Projects/Yocto/poky-warrior/meta-openembedded/meta-multimedia \
  /home/tom/Projects/Yocto/poky-warrior/meta-openembedded/meta-networking \
  /home/tom/Projects/Yocto/poky-warrior/meta-openembedded/meta-python \
  /home/tom/Projects/Yocto/poky-warrior/meta-raspberrypi \
  "


ragnoraq
Posts: 2
Joined: Fri Oct 04, 2019 4:12 pm

Re: Yocto and BCM2835 library

Tue Oct 15, 2019 5:58 pm

I was able to figure the problem out; you have to include the bcm2835-dev package, not simply bcm2835. So in local.conf I changed the last line to
IMAGE_INSTALL_append += "bcm2835-dev"

Return to “Other”