How to use the latest oe-depends-dot in Yocto - yocto

From this link:
http://embeddedguruji.blogspot.com/2018/11/oe-depends-dot-in-yocto.html
It says
To use oe-depends-dot utility you need to first generate
recipe-depends.dot file
When i run in zeus branch of poky, i don't get recipe-depends.dot file
$ bitbake -g core-image-minimal
It only creates pn-buildlist, task-depends.dot
Can we pass 'task-depends.dot' to oe-depends-dot tool?

Generation of recipe-depends.dot has been removed in Bitbake version 1.43.2 (and newer), see commit 4c484cc01e3eee7ab2ab0359fd680b4dbd31dc30. This affects Yocto versions 3.0 and up.
It appears that the documentation had not been updated right away. However, the latest Bitbake documentation does not include references to the file anymore.

Related

dev packages not getting included in Yocto SDK

We are generating Yocto SDK using the following command: bitbake -c populate_sdk <image-name>
Yocto Branch : Dunfell
We don't see header files getting included in the SDK, for example we have libmodbus part of IMAGE_INSTALL, we don't see modbus.h file in SDK which is present in libmodbus-dev package
Could you execute the command below so we can verify your setup:
bitbake -e <image-name> | grep SDKIMAGE_FEATURES
Development packages are automatically included into SDK when they are installed into the image when SDKIMAGE_FEATURES variable defines it
SDKIMAGE_FEATURES = "dev-pkgs staticdev-pkgs"
https://www.yoctoproject.org/docs/3.1/mega-manual/mega-manual.html#var-SDKIMAGE_FEATURES

Pulse Audio: Meson build failing

First step I cloned the pulseaudio source from git [ git clone https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git ]. Secondly went inside the pulseaudio directory and executed meson build command in order to move to the build directory as stated in README file. But i'm getting this error while excecuting this meson build command.
androidbuild#androidbuild-PC:~/pulse/pulseaudio$ (master) meson build
The Meson build system
Version: 0.45.1
Source dir: /home/androidbuild/pulse/pulseaudio
Build dir: /home/androidbuild/pulse/pulseaudio/build
Build type: native build
meson.build:345:61: ERROR: Expecting eol got eol_cont.
if cc.has_header_symbol('sys/syscall.h', 'SYS_memfd_create') \
^
A full log can be found at /home/androidbuild/pulse/pulseaudio/build/meson-logs/meson-log.txt
Likely Meson began silently supporting using \ escaped newlines sometime after meson 0.45.1 (the version you have installed). Looking at the gitlab, pulse audio requires meson >= 0.50 anyway, so this should have failed already. Since you have 0.45 I'm assuming your on an LTS of some kind (since 0.58 is the latest release), I think Ubuntu 20.04 had 0.45?.
This issue will likely be resolved by updating to a newer meson. You can use pip for this, pip install --user meson, or you can probably use a backport repo for your distro (Debian and Ubuntu both provide these in easy to use forms, but all LTS distros have them as some of the dependencies they need will rely on newer build tools)

Specify RPM build order in mock

TLDR: Ensure to keep system OS up-to-date to help ensure consistency with current spec files.
Symptom
When rebuilding PostgreSQL 11.1 SRPM using mock, the build fails with:
BUILDSTDERR: /builddir/build/BUILD/postgresql-11.1/src/bin/psql/command.c:1814 undefined reference to `PQencryptPasswordConn`
NB: PQencryptPasswordConn is a libpq.so function (provided by postgresql-devel-10.3-5.fc27.x86_64 on my system...outside the mock chroot environment). Unless I'm mistaken, the Postgresql SRPM builds the postgresql-devel RPM along with others.
Steps to reproduce
I ran the following to rebuild the SRPM before attempting to apply any patches not already present in the SRPM:
# Obtain SRPM source
git clone https://src.fedoraproject.org/rpms/postgresql.git
cd postgresql
# Download local copies of SRPM sources
wget $(spectool -S *.spec | awk '/^Source.*:\/\//{IFS=" "; print $2}')
# ...check SHAs of downloaded sources...
# Run SRPM-specific prep scripts
./generate-pdf.sh
./generate-sources.sh
# Generate the SRPM
mock --root=fedora-27-x86_64 --resultdir="./SRPMS" --buildsrpm --spec postgresql.spec --sources .
# >>> Everything seems to work fine up to this point <<<
# Build the RPM inside mock chroot
mock --root=fedora-27-x86_64 --rebuild ./SRPMS/postgresql-11.1-4.fc27.src.rpm
# !!! Fail here (with symptom above) !!!
The Problem
I have so far been unable to have mock load the appropriate libpq library headers into the chroot environment to make sure rpmbuild builds against the libpq that contains the PQencryptPasswordConn header (which appears to exist on my system outside the build environment):
grep -lr "PQencryptPasswordConn" /usr/include
# /usr/include/libpq-fe.h
grep -lr "PQencryptPasswordConn" /var/lib/mock/fedora-27-x86_64/root/usr/include
# (Nothing returned)
When reviewing mock's installed_pkgs.log, the following were installed (the latter of which I expect would provide a version of libpq headers):
postgresql-libs-9.6.10-3.fc27.x86_64
postgresql-devel-9.6.10-3.fc27.x86_64
However, I cannot find a way to install the postgresql-* packages into the chroot environment that contain the updated library headers.
The Ask
Since postgresql SRPM is supposed to build postgresql-devel RPM, I think that mock will need to build and install the postgresql-devel RPM in the chroot before rpmbuild attempts to compile psql/command.c so that the latter compilation finds the appropriate library headers (unless the build process is intelligent enough to identify new libraries currently under build).
How can I best accomplish this (would prefer to avoid multiple mock calls for each RPM package built from the SRPM unless that's the only way to go)?
Please note that the build process on my system spawns multiple processes to parallel compilations.
I have also tried to use mockchain —recurse without success.
System Info
Linux 4.16.6-202.fc27.x86_64
First hint, you use the latest postgresql.spec version, but you try to build it against rather old (in fact unsupported nowadays) version 27 of Fedora distribution. I'd encourage you to migrate to a newer version of Fedora, or at least checkout the branch f27 in the same RPM git repository.
Second hint, we changed the layout of PostgreSQL packaging in Fedora 30+. We've cut out the library (libpq.so) into separate package, per announcement.
How to continue; always checkout appropriate branch based on what Fedora you build against, and adjust the spec file appropriately (checkout f27 and update to PostgreSQL 11.1 in this case).
JFTR (might help), there already is a testing modular build of PostgreSQL 11 against Fedora 28+, and the build scripts are maintained in separate branch stream-postgresql-11. With a bit of luck, you would be able to build that branch against old Fedora 27, too. Note that this version of postgresql.spec file is a little bit complicated (it needs to be because we build it against different versions of Fedora).

How to get to menuconfig for u-boot in Yocto environment

I'm using Yocto for the first time for an ARM embedded system with a Xilinx Zynq.
I want to make some configuration changes that requires going in the menuconfig utility. Yocto documentation shows how to do it for the Linux Kernel
bitbake yocto-xlnx -c menuconfig
Which, for Xilinx, I turned into
bitbake linux-xlnx -c menuconfig
It works very well.
Now, I want to do the same with u-boot and change the .config file using the menuconfig utility. I can't find any way to do it in Yocto or Xilinx documentation. I tried the obvious like
bitbake u-boot-xlnx -c menuconfig
just to get an error message:
ERROR: Task do_menuconfig does not exist for target u-boot-xlnx
Any Idea how to get to u-boot menuconfig with Yocto?
Edit:
here are the layers I use
BBLAYERS ?= " \
/home/sylvain/poky/meta \
/home/sylvain/poky/meta-poky \
/home/sylvain/poky/meta-yocto-bsp \
/home/sylvain/poky/openembedded-core/meta \
/home/sylvain/poky/meta-xilinx \
"
It's currently, as of 2.3 Pyro, not possible to run bitbake u-boot -c menuconfig as no-one has implemented that functionality for the U-Boot recipe. Please, file a bug if you'd have uses for this.
Normally, I'd recommend either of the following approaches:
bitbake u-boot -c devshell
Use of devtool.
Use the SDK.
All of these would not only allow you to run make menuconfig, but also to cross-compile U-Boot to verify your configuration.
I found the solution. It works for xilinx distribution. I did not test it for others but it's likely to be similar and it's likely to work for any other menuconfig of any package. It turns out that the full source package is located in my case at:
~/poky/build/tmp/work/zedboard_zynq7-poky-linux-gnueabi/u-boot-xlnx/v2016.07-xilinx-v2016.3+gitAUTOINC+95e11f6eb4-r0/build
I'll let you decode the "board, machine, version etc" coding in the folder string since it depends on each case, but just want to give the idea.
Using the terminal, just go to that folder then run just like in the old days:
make menuconfig
and voilĂ !
I guess when I get to configure busybox and things like that, it will just be the same.
I ran into the same problem.
I build u-boot-at91 for at91sam9x35, but it should be the same for other architectures as well.
Yocto still doesn't support
bitbake u-boot -c menuconfig
I managed to do it with the following steps:
In build directory run:
devtool modify u-boot-at91
This will automatically create the u-boot source files' external directory under: build/workspace/u-boot-at91.
cd build/workspace/u-boot-at91
run menuconfig using:
make menuconfig
If menuconfig doesn't show up you might have to run the do_configure task for u-boot and then retry:
bitbake u-boot-at91 -c configure
Perform required menuconfig changes in the UI and save the configuration in New.config file.
Copy the New.config file to override your target's defconfig file
(in my case at91sam9x5ek_spiflash_config) using:
cp New.config configs/at91sam9x5ek_spiflash_defconfig
Notice the defconfig suffix instead of config!
Push the change to your local git repository:
pushd build/workspace/sources/u-boot-at91
git add at91sam9x5ek_spiflash_defconfig
git commit -m "summary of changes made here"
git status
popd
Create the patch to override the default defconfig file:
devtool update-recipe u-boot-at91
This actually appends the following lines to your u-boot-at91.bb files:
SRC_URI = "git://github.com/linux4sam/u-boot-at91.git;protocol=https;branch=${UBRANCH} \
file://0001-summary-of-changes-made-here.patch \
and creates the patch file with relevant modifications to the recipe's directory.
8. Run BitBake:
bitbake u-boot-at91
or
bitbake core-image-minimal
The new u-boot binary will be built with the new configuration.

Specify the gcc version for bitbake meta-toolchain

I'm just starting to learn Yocto 1.8.
The bitbake meta-toolchain ran fine as described in the documentation and generated the appropriate installation script. However, bitbake picked a version of GCC that I don't want.
What is the recommended way to tell bitbake which version of GCC to pick for the bitbake meta-toolchain build?
Just to keep the record complete.
The exact GCC version is specified in the machine/.conf file as:
# This version is Yocto-branch dependent
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "5.2%"