Is there a way to check the exact list of packages that will be installed in the image in Yocto?
Asked Answered
M

5

27

In Yocto-based Embedded Linux distributions, I am really interested in finding the complete list of packages/recipes/kernel modules from each dependent layers that will be built and installed to an image file before executing the image building recipe such as:

bitbake my-image-minimal

Is there a way to achieve this? Any guidance in this regard is appreciated.

Thanks in advance.

Meridithmeriel answered 22/10, 2017 at 20:6 Comment(0)
Y
30

Yes, like this on old Bitbake versions:

bitbake -g <image> && cat pn-depends.dot | grep -v -e '-native' \
    | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq

Taken from the NXP Community website

On newer:

bitbake -g <image> && cat pn-buildlist | grep -ve "native" | sort | uniq
Yoruba answered 22/10, 2017 at 20:16 Comment(8)
Hi, for some reason pn-depends.dot is not created. Only task-depends.dot, pn-buildlist, and recipe-depends.dot is created.Meridithmeriel
I actually discovered that pn-buildlist has what I need. But still I would like to show what this command is capable of, however the pn-depends.dot is somehow still missingMeridithmeriel
It seems they did a refactor and it's not working on newer versions. It now can be simplifiedYoruba
The second method doesn't seem to show all packages that are in the image. I have a package that is in RDEPENDS of one of the listed packages, and it's not shown in the listRecess
I can't remember with version I use to write this answer. It maybe changed. Could you find a way working for you?Yoruba
As from the manual: "pn-buildlist: Shows a simple list of targets that are to be built." If you find a name in pn-buildlist, this does not necessarily mean that the package is included in the image. One example is if you have RDEPENDS_${PN}-ptest, which adds run-time dependencies for a package test suite.Pretence
I believe -cross should also be filtered out; that's the cross-compilation toolchain that won't be installed either.Petr
Agree with @MikeBergmann, this is for build dependency only. If you compare the packages in pn-buildlist with the image manifest file, you will notice the difference easilyMiddlebreaker
L
26

Yes,

Yocto maintains packages information in a form of manifest file located in

<"your_build_folder">/tmp/deploy/images/<"machine_image">/<"image_name">.manifest.

Ladylove answered 23/10, 2017 at 5:59 Comment(2)
This is a great tool for "after" the build, but he asked before.Yoruba
The package names in the manifest file is different. Usually they got added with some suffix number to the real package name. Any good idea to get the real package name from the manifest file?Middlebreaker
B
8

You can find the list in the generated .manifest file. See IMAGE_MANIFEST

Burtis answered 19/11, 2017 at 17:49 Comment(1)
The package names in the manifest file is different. Usually they got added with some suffix number to the real package name. Any good idea to get the real package name from the manifest file?Middlebreaker
H
0

We've talked about this in the past and for various reasons, it is hard to know what packages would end up in the image, without going through the complete build process.

One of the best tools for seeing what is an an image is the buildhistory class. Add it to your user classes in local.conf. The output ends up in the build directory within the buildhistory sub-directory.

Hy answered 19/11, 2017 at 19:0 Comment(0)
T
0

Add INHERIT += "buildhistory" in your conf/local.conf and rebuild.

Tilth answered 7/11, 2019 at 17:24 Comment(2)
Could you please give some hint on what it might do? That would be superhelpful. ThankyouParette
Hi, it's passed some time from when i was into this, but, probably the usage may be better checked here: #27532398Tilth

© 2022 - 2024 — McMap. All rights reserved.