How to remove qemu-native package to reduce build time - yocto

As i'm new to YOCTO build system.Thanks in advance for helping with this.
Recently i try to build a local YOCTO image which is totally does not need to support qemu, but when i build my image such as core-image-minimal, the bitbake server would still bitbake qemu-native package which will cost me lots of time. What i want is to remove this qemu-native package from my whole build process. How can i do it?
I have tried to set ENABLE_BINARY_LOCALE_GENERATION = "0" in my build/conf/local.conf but it does not work.
Could somebody help me with this question?

Related

Yocto extra image feature seems to be not in the image

I've started to work with the Yocto project on a raspberry pi 3 and therefore followed the instructions in this guide.
It adds the dropbear ssh server for remote access
EXTRA_IMAGE_FEATURES_append = " ssh-server-dropbear"
After the creation of the image I checked the image manifest and it seems like dropbear has been added.
dropbear aarch64 2019.78
But it seems like when I run the image the application is not really there. I'd expect something inside /etc/init.d/ but there are no dropbear artifacts.
Also, altough the python meta-layer should be added, the py/python command is unknown on the target.
Can someone tell me what exactly I'm missing?
You're not specifying why you believe dropbear is not part of the image, if it is present on EXTRA_IMAGE_FEATURES (and you even see it in the manifest) I don't see any reason why it wouldn't be there, perhaps you are looking for it in the wrong location?
If you can post an update with the actual error you are getting that would help.
python3 does not come from the meta-python layer, it is part of the core layer (meta), meta-python contains other python related recipes which extend python's functionality.
To install python3 on your image do:
IMAGE_INSTALL += "python3"

How to build a custom/different target in Yocto autotools projects?

I'm trying to use a 3rd-party autotools project in Yocto. Its unit tests are run by 'make check' and requires './configure --enable-oe-sdk', but this is not included in the default recipe (from autotools.bbclass). I want the tests built and run, so How to build a different autoconf target in a Yocto/BitBake recipe? Please note that the unit tests run on the development host, instead of running on the embedded target.
Here is what I have tried. Adding extra options to recipes based on Autoconf. But it doesn't say how to build a different target. I added EXTRA_OECONF += '--enable-oe-sdk', and tried to override do_compile() of the recipe. But got following error.
configure: error: OECORE_TARGET_SYSROOT must be set with --enable-oe-sdk
I'm asking a generic question, but the project in question is github.com/openbmc/phosphor-bmc-code-mgmt. Thank you so much!
In openBMC's own repository, there is the meta-phosphor repository with the recipe ready for phosphor-bmc-code-mgmt.bb.
Clone and add meta-phosphor to conf/bblayers.conf and use the phosphor-software-manager recipe.
I have run several openBMC test, but I am far from an expert.
It looks like the repo you are looking at was designed to be tested using the continues integration docker frame work.
The instruction on how to run the test are here .
In the example they are testing "phosphor-hwmon" so insted try testing "phosphor-bmc-code-mgmt"
If that does not work, I bet the someone on openbmc discord will help you out. https://discord.com/invite/69Km47zH98

Yocto upgrade from fido to morty rootfs is read-only error

So, I was given the task to upgrade our yocto based system from fido to morty. I have very little experience with yocto, I have been struggling with it and trying to understand it for almost a week now. I have managed to fix some issues, but now I'm facing a problem when trying to build the image:
ERROR: basic-image-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['component']
ERROR: basic-image-1.0-r0 do_rootfs: Function failed: do_rootfs
If I disable the compoents the basic-image builds just fine, and both of them build just fine on their own, i.e bb component
I don't even know where to start looking for a solution. So if you have any idea what might be causing this or where to start looking for a solution, it would be greatly appreciated.
Ofcourse I have been browsing the yocto manuals, but there is so much stuff that I'm just overwhelmed by all of it.
Well, the "problem" stems from the fact that you have the following in your image:
IMAGE_FEATURES += "read-only-rootfs"
That implies that nothing can modify the rootfs during runtime, everything has to be done off-line, i.e. when constructing the rootfs in question.
Your package component (adcl and cfgmgr in your original question), all have a post-installation script including the following snippet:
pkg_postinst_${PN} () {
if test "x$D" != "x" then
# Need to run on first boot
exit 1
fi
}
(Something similar at least, which exit 1).
The conditional in my example checks if the pkg_postinst script is being run during rootfs creation, if so, it exits with 1 as exit status. That means that the pkg_postinst has to be run live on the target system. However, as the target system is read-only, this will be impossible, and the build fails.
You'll have to check for pkg_postinst scripts, and rewrite them, such that they're able to be run during rootfs creation.

yocto build for iMX6 TinyRex Module not booting

I am trying to build an image for the iMX6 TinyRex module using yocto. I don't encounter any issues during the build process, everything seems to be working. However when I copy the finished image to an sd card and plug it in, it doesn't boot up. I just get a blank screen.
I'm following this tutorial:
http://www.imx6rex.com/imx6-tiny-rex/software/how-to-start-with-yocto-and-compile-source-codes/
I tried several different images, but none seem to work.
I took over this project from someone else and am pretty new to yocto.
Any help would be greatly appreciated.

Yocto: why is a package included?

I am currently using yocto for building an embedded linux image for TI AM335x (I am using hob, since I find it more comfortable than using command-line).
I start using the recipe for building 'core-image-base' and here is the selection of packages which are included:
Now I would like to exclude the package alsa-utils-1.0.28-r0 from build, since it has some problems compiling for my target and I really do not need it... so, as far as I can understand, I have to remove all the dependencies which brought alsa-utils in (that is: alsa-state and packagegroup-base, looking at following screenshot):
So I move to Package groups tab and I remove packagegroup-base and then I remove alsa-state and alsa-utils from the Included recipes:
Now it seems that alsa-utils is there no more... but if I try to build the image, this is the result:
Why? Who is still bringing-in alsa-utils? What am I doing wrong? Is there a way (even command-line) to know why a package is brought-in by yocto?
Use
bitbake -g alsa-utils -u depexp
to display a dependency tree you should be able to see who's depending on it.
See the openembedded wiki.