Building an external kernel module with Yocto Honister and devtool: ERROR: Kernel configuration is invalid - yocto

When building an external kernel module with devtool build in Yocto, the build sometimes fails.
| ERROR: Kernel configuration is invalid.
| include/generated/autoconf.h or include/config/auto.conf are missing.
| Run 'make oldconfig && make prepare' on kernel src to fix it.
How can I fix that?

This is a bug but there is a workaround. Just execute
bitbake -c cleansstate make-mod-scripts

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

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.

Installing PJSIP python lib with YOCTO

I am trying to install PJSIP on Yocto but I have some problems...
This is my recipe.
And the problems I have are :
Sometimes Yocto seems to compile without taking note of my layer and sometimes yes... I do have added my layer in the bblayers file because sometimes the changes I do in my recipe are in my image but most of the time not...
For installing the python library of PJSIP we have to do make or
python setup.py install in the pjsip-apps/src/python/ folder.
Why this in the recip:
cd ${S}/pjsip-apps/src/python
oe_runmake
It's not working? (I say so because if I do python --> import pjsua
on the target it's not working) How can I install it without doing
it by hand after : cp -r ${S}/pjsip-apps/src/python/* ${D}/usr/pjsip-python --no-preserve=ownership in the recip ?
Thank you for your help !

building qt5 on raspberry pi3 failed

I enabled gstreamer 1.0, but it failed with the message:
ERROR: Feature 'gstreamer_1_0' was enabled, but the pre-condition 'libs.gstreamer_1_0' failed.
This is my configure script:
/configure -v -opengl es2 -device linux-rasp-pi-g''+ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs -prefix /usr/local/qt5 -no-pch -gstreamer 1.0 -nomake examples -nomake tests &> output_configure.
Thanks!
I had exactly the same issue. After installing gstreamer-1.0 on Raspberry Pi and copying the libs to the host system, make sure you fix relative links in your sysroot directory.
Configuring Qt when building from source produces config.cache file. If you delete it, ./configure script will reconfigure everything. This is how you can identify broken symlinks, because it will try to compile a minimal program. For example my installation failed on missing libm.so, which was a symlink to a non-existing file.
Running ./sysroot-relativelinks.py sysroot relinked all the symlinks after installing gstreamer-1.0 and so Qt was able to find the libs.

How do install tensor flow gpu?

I am currently having some problems installing tensor flow with gpu support.
This is the guide i've followed.
Install NVIDIA CUDA (preinstalled)
Install NVIDIA cuDNN (preinstalled)
Install bazel
wget https://github.com/bazelbuild/bazel/releases/download/0.4.3/bazel-0.4.3-installer-linux-x86_64.sh
chmod +x bazel-0.4.3-installer-linux-x86_64.sh
./bazel-0.4.3-installer-linux-x86_64.sh --user
install tensor flow from source
git clone https://github.com/tensorflow/tensorflow
cd tensorflow/
./configure
bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
the last one don't finish.. or it does.. it comes up with an error message
a#fe1:~/tensorflow$ bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
.
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.build/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
Server finished RPC without an explicit exit code
after this should i be able to do this
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tenso
rflow_pkg
according to the guide, but is not possible.
i've previously had tensor flow cpu version running, but since the need of gpu were sincerely pressing i decided to install it... but didn't think it would be this troublesome..
any idea on why it is not possible to build it?
os:centOS 7.1
gpu:nvidea
I've had problems attemping to install Tensorflow from source using Bazel as well.It could be that the current bazel build has problems,since that occured in the past with me.It would help if you provided us with information about your system(OS & GPU),but you're probably better off using pip(or pip3) and doing sudo pip(3) install tensorflow-gpu.