Yocto - tools-profile' in IMAGE_FEATURES (added via EXTRA_IMAGE_FEATURES) is not a valid image feature - yocto

I am trying to install the tools-profile in the yocto but I get an error saying that tools-profile is not a valid option. How can I debug this? How to check why is it failing? Here is how I tried it.
Here is my bblayers.conf
LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
${TOPDIR}/../poky/meta \
${TOPDIR}/../poky/meta-poky \
${TOPDIR}/../poky/meta-yocto-bsp \
${TOPDIR}/../layers/meta-gplv2 \
${TOPDIR}/../layers/meta-xilinx/meta-xilinx-bsp \
${TOPDIR}/../layers/openembedded-core/meta \
${TOPDIR}/../layers/meta-openembedded/meta-oe \
${TOPDIR}/../layers/meta-openembedded/meta-multimedia \
${TOPDIR}/../layers/meta-openembedded/meta-networking \
${TOPDIR}/../layers/meta-openembedded/meta-python \
${TOPDIR}/../layers/meta-custom \
"
BBLAYERS_NON_REMOVABLE ?= " \
${TOPDIR}/../poky/meta \
${TOPDIR}/../poky/meta-poky \
"
In the local.conf, I have added the following.
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile"

Probably too late but I will answer this question as this happened to me yesterday.
The issue is that you have an image that inherits only image.bbclass. If you look into image.bbclass you will see that it doesn't know anything about tools-profile but core-image.bbclass does.
All you have to do is to change inherit image to inherit core-image in an image that is throwing the error.
In my case it was swupdate-image.

Related

Yocto build for samba recipe failed

Yocto build for samba recipe failed
I am trying to build this samba recipe file
Here
bitbake smbnetfs
Error :
smbnetfs_git.bb DEPENDS on or otherwise requires it) samba was
skipped: it has incompatible license(s): GPL-3.0+ LGPL-3.0+ ERROR:
Required build target 'smbnetfs' has no buildable providers. Missing
or unbuildable dependency chain was: ['smbnetfs', 'samba']
HOMEPAGE = "https://www.samba.org/"
SECTION = "console/network"
LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 "
SAMBA_MIRROR = "http://samba.org/samba/ftp"
MIRRORS += "\
${SAMBA_MIRROR} http://mirror.internode.on.net/pub/samba \n \
${SAMBA_MIRROR} http://www.mirrorservice.org/sites/ftp.samba.org \n \
"
SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
file://16-do-not-check-xsltproc-manpages.patch \
file://20-do-not-import-target-module-while-cross-compile.patch \
file://21-add-config-option-without-valgrind.patch \
file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \
file://0006-avoid-using-colon-in-the-checking-msg.patch \
file://netdb_defines.patch \
file://glibc_only.patch \
file://iconv-4.7.0.patch \
file://dnsserver-4.7.0.patch \
file://smb_conf-4.7.0.patch \
file://volatiles.03_samba \
"
SRC_URI_append_libc-musl = " \
file://samba-pam.patch \
file://samba-4.3.9-remove-getpwent_r.patch \
"
SRC_URI[md5sum] = "0253021a45c479cec1e135b004a0177a"
SRC_URI[sha256sum] = "1eede30fc8ef6504e24602fb72b00baa0a7b73b59f16d25cb0771dc8c7c57d6e"
inherit systemd waf-samba cpan-base perlnative update-rc.d
# remove default added RDEPENDS on perl
RDEPENDS_${PN}_remove = "perl"
DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libbsd libaio libpam"
My finding: There problem in LICENSE and LIC_FILES_CHKSUM
Reason = common-licenses folder is not available in the meta-openembedded
Why folder is missing from the meta-openembedded. How to resolve it.
I have gone through almost all the site. I have tired the option to close the license as below
LICENSE = "CLOSED"
BB_STRICT_CHECKSUM = "0"
But still no luck.
I tired this suggestion as well here and here
Please suggestion

How to install a (sub)package of a virtual package in Yocto

Setup
I am working with Yocto 3.4 "Honister" and I utilize the following layers:
openembedded-core (refspec: yocto-3.4)
meta-openembedded (refspec: f632403d1800363ac63a1ad5543278b82c659832)
meta-raspberrypi (refspec: 1584bddcf31f4bf3acc2304aa8dae927e8bec970)
I created my own distro.conf which essentially looks like this:
DISTRO_FEATURES = "acl argp ext2 ipv4 ipv6 largefile opengl pam usbhost xattr zeroconf systemd vfat wayland"
DISTRO_EXTRA_RDEPENDS += "packagegroup-core-boot"
INIT_MANAGER = "systemd"
PACKAGE_CLASSES ?= "package_deb"
PREFERRED_PROVIDER_base-utils = "packagegroup-core-base-utils"
VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
VIRTUAL-RUNTIME_base-utils-hwclock = "util-linux-hwclock"
VIRTUAL-RUNTIME_base-utils-syslog = ""
IMAGE_LINGUAS ?= "de-de en-us"
GLIBC_GENERATE_LOCALES ?= "de_DE.UTF-8 en_US.UTF-8"
Question
My goal is to have libGLESv2.so installed distro-wide. The mesa recipe provides the lib like this:
...
PROVIDES = " \
${#bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
${#bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2', '', d)} \
${#bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
${#bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
virtual/mesa \
"
...
PACKAGECONFIG:class-target ??= "${#bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
${#bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium virgl', '', d)} \
${#bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
${#bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
elf-tls \
"
...
PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libosmesa libosmesa-dev \
libgl-mesa libgl-mesa-dev \
libglapi libglapi-dev \
libgbm libgbm-dev \
libgles1-mesa libgles1-mesa-dev \
libgles2-mesa libgles2-mesa-dev \
libgles3-mesa libgles3-mesa-dev \
libxatracker libxatracker-dev \
mesa-megadriver mesa-vulkan-drivers \
mesa-vdpau-drivers \
"
...
For raspberry-pis the file rpi-default-providers.inc sets the default providers:
...
PREFERRED_PROVIDER_virtual/libgles2 ?= "${#bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"
...
Therefore the connection from the virtual package to the concrete provider should be setup properly. But (obviously) this does not deploy the library into the final rootfs. How can this be done?
What I tried so far
The obvius way to go would be to just install the package by name in the distro.conf with something like this:
...
DISTRO_EXTRA_RDEPENDS += "libgles2-mesa"
...
This works, but honestly this approach feels kinda wrong to me. In my opinion this bypasses the whole concept of virtual packages. Or am I wrong on that?
Additionally for testing purposes I installed weston to the image. This adds libGLESv2.so to the rootfs and I tried to resolve why this is happening (and utilize the same approach for my problem) but I cannot figure it out. From the weston recipe the relevant parts for the problem seems to be those:
...
DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
...
# Weston on KMS
PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
# Weston on Wayland (nested Weston)
PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
...
This adds all the virtual packages to the list of DEPENDS, but when I do that (e.g in my image recipe) I see mesa being build but the library is not deployed to the rootfs. I fail to see how libgles2-mesa is pulled here.
Assuming every package's recipe is correctly configured (you can assume this for Yocto's, check your own), in order to enable GLESv2 across the entire compilation you need:
DISTRO_FEATURES += " gles2"
either on the image recipe or in conf/local.conf

Does HTTPie have the equivalent of curl's -d option?

I want to query a REST API with HTTPie. I am usuale to do so with curl, with which I am able to specify maxKeys and startAfterFilename e.g.
curl --location --request GET -G \
"https://some.thing.some.where/data/v1/datasets/mydataset/versions/2/files" \
-d maxKeys=100 \
-d startAfterFilename=YYYMMDD_HHMMSS.file \
--header "Authorization: verylongtoken"
How can I use those -d options in HTTPie?
In your case the command looks like this:
http -F https://some.thing.some.where/data/v1/datasets/mydataset/versions/2/files \
Authorization:verylongtoken \
startAfterFilename=="YYYMMDD_HHMMSS.file" \
maxKeys=="100"
Although, there is a bunch of methods to pass some data with httpie. For example
http POST http://example.com/posts/3 \
Origin:example.com \ # : HTTP headers
name="John Doe" \ # = string
q=="search" \ # == URL parameters (?q=search)
age:=29 \ # := for non-strings
list:='[1,3,4]' \ # := json
file#file.bin \ # # attach file
token=#token.txt \ # =# read from file (text)
user:=#user.json # :=# read from file (json)
Or, in the case of forms
http --form POST example.com \
name="John Smith" \
cv=#document.txt

Add OP-TEE to Yocto

I am attempting to build a Yocto image incorporating OP-TEE. I'm used to the output from OP-TEE's build repo (bl1.bin etc) and I can't get the Yocto system to do the same. Also no /dev/tee devices exist (so maybe the kernel isn't configured). Although xtest and optee-examples have been installed. I am attempting to first build it against QEMU ARMv8.
Here is my config so far:
local.conf
MACHINE ?= "qemuarm64"
PREFERRED_PROVIDER_virtual/kernel = "linux-linaro-aarch64"
IMAGES_CLASSES = "image_types_bios image_types_uefi"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
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"
CONF_VERSION = "1"
OPTEEOUTPUTMACHINE = "vexpress"
OPTEEMACHINE = "vexpress-qemu_armv8a"
CORE_IMAGE_EXTRA_INSTALL += "optee-client optee-examples optee-os optee-test python-pycrypto"
INSANE_SKIP_optee-examples = "ldflags"
DISTRO_FEATURES_append = "optee"
bblayers.conf
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/mnt/raid/yocto_stuff/arm64/poky/meta \
/mnt/raid/yocto_stuff/arm64/poky/meta-poky \
/mnt/raid/yocto_stuff/arm64/poky/meta-yocto-bsp \
/mnt/raid/yocto_stuff/arm64/meta-linaro/meta-optee \
/mnt/raid/yocto_stuff/arm64/meta-linaro/meta-linaro \
/mnt/raid/yocto_stuff/arm64/meta-openembedded/meta-oe \
/mnt/raid/yocto_stuff/arm64/meta-openembedded/meta-networking \
/mnt/raid/yocto_stuff/arm64/meta-openembedded/meta-python \
"
Thanks for any help.

Yocto:Could not inherit file classes/autotools-brokensep.bbclass

I am new to yocto project. I am getting the following error while running the bitbake command
$bitbake gemini-image
ERROR: ParseError at /home/zappy/Desktop/fyocto/meta-ivi/meta-ivi/recipes-extended/persistence-client-library/persistence-client-library_git.bb:18: Could not inherit file classes/autotools-brokensep.bbclass
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
my bblayers.conf file is
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "6"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/zappy/Desktop/fyocto/poky/meta \
/home/zappy/Desktop/fyocto/poky/meta-yocto \
/home/zappy/Desktop/fyocto/poky/meta-yocto-bsp \
/home/zappy/Desktop/fyocto/meta-ivi/meta-ivi \
/home/zappy/Desktop/fyocto/meta-ti \
"
BBLAYERS_NON_REMOVABLE ?= " \
/home/zappy/Desktop/fyocto/poky/meta \
/home/zappy/Desktop/fyocto/poky/meta-yocto \
And my local.conf file is(edited lines only)
MACHINE?= ”pandaboard”
DISTRO ?= "poky-ivi-systemd"
INCOMPATIBLE_LICENSE = "GPLv3"
any one familiar with these types of errors??
please feel free to ask if any further details is needed to understand the problem
EDIT:
This is the persistence-client-library_git.bb file
SUMMARY = "GENIVI Persistence Client Library"
DESCRIPTION = "The Persistence Management is responsible to handle \
persistent data, including all data read and modified often during \
a lifetime of an infotainment system."
HOMEPAGE = "http://projects.genivi.org/persistence-client-library"
BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Persistence"
LICENSE = "MPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=6161c6840f21a000e9b52af81d2ca823"
DEPENDS = "dlt-daemon dbus libcheck persistence-common-object"
PV = "7.0+git${SRCPV}"
SRC_URI = "git://git.projects.genivi.org/persistence/persistence-client-library.git"
SRCREV = "441b3ce710ec6b7f1e6360cdf29e5c4243af9f1e"
S = "${WORKDIR}/git"
inherit pkgconfig autotools-brokensep
PARALLEL_MAKE = ""
FILES_${PN} = " \
${libdir}/*.so \
${libdir}/*.so.* \
${sysconfdir} \
"
do_install_append() {
install -d ${D}${sysconfdir}/dbus-1/system.d
install -m 0644 ${S}/config/org.genivi.persistence.admin.conf ${D}${sysconfdir}/dbus-1/system.d
}
RDEPENDS_${PN} = "node-state-manager"
Problem: It is not able to locate the autotools-brokensep.bbclass which is mentioned in your persistence-client-library_git.bb as inherit pkgconfig autotools-brokensep
Solution: Provide the path of the file in bblayers.conf where the file locates, and even check th layers.conf of which the file resides.