i.MX Yocto Project: How can I find out the packages include on an image?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX Yocto Project: How can I find out the packages include on an image?

i.MX Yocto Project: How can I find out the packages include on an image?

On the build folder, type

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

where <image> is the image name (e.g. core-image-minimal). In case you want to know if a certain <package> is included on an image, just grep the output

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

Labels (1)
Comments

Hi Leonardo

I am speechless :smileyshocked: Step over the link several times without seeing it.

I only got to bitbake -g <image> and tried to load the .dot files in my Ubuntu 12.04. It hung forever. I opened them in textmode and close it inmediately :smileysilly:


Thank you

Hello again

As forever_newbies we are yet fighting with package names.

We have found useful to add build history to compilation:

INHERIT += "buildhistory"

BUILDHISTORY_COMMIT = "1"

The list of all files included in image and the package-names lists let us see if our try to add a particular file/binary is included without testing the image on the board.

Also we found that spec files seem to list all possible sub-package names in a package source. We do:

  cd build/tmp/work

  find . \( -name '*.spec'  \) -exec grep "filename" {} \; -print

to look for the sub-package with a particular file.

The problem comes when the package is not included in the image at all. Then its directory does not exist at build/tmp/work. Then we googled and merged the results with this list of existing packages: http://packages.yoctoproject.org/

I don´t know if there are better ways to do it. Maybe somewhere is an index of what package have a particular binary. Maybe not. If anybody knows, feel free to let us know.

Thank you

Hi Diego,

Thanks for sharing those tips. I will definitely include your comments on the main post soon, so people can find it faster.

Leo

%3CLINGO-SUB%20id%3D%22lingo-sub-1101957%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX%20Yocto%20Project%3A%20How%20can%20I%20find%20out%20the%20packages%20include%20on%20an%20image%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101957%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EOn%20the%20%3CEM%3Ebuild%20%3C%2FEM%3Efolder%2C%20type%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%0A%3CP%3E%3CEM%3Ebitbake%20-g%20%3CSTRONG%3E%3CIMAGE%3E%3C%2FIMAGE%3E%3C%2FSTRONG%3E%20%26amp%3B%26amp%3B%20cat%20pn-depends.dot%20%7C%20grep%20-v%20-e%20'-native'%20%7C%20grep%20-v%20digraph%20%7C%20grep%20-v%20-e%20'-image'%20%7C%20awk%20'%7Bprint%20%241%7D'%20%7C%20sort%20%7C%20uniq%3C%2FEM%3E%3C%2FP%3E%0A%0A%3C%2FBLOCKQUOTE%3E%3CP%3E%3C%2FP%3E%3CP%3Ewhere%20%3CSTRONG%3E%3CEM%3E%3CIMAGE%3E%20%3C%2FIMAGE%3E%3C%2FEM%3E%3C%2FSTRONG%3E%20is%20the%20image%20name%20(e.g.%20%3CEM%3Ecore-image-minimal).%20%3C%2FEM%3EIn%20case%20you%20want%20to%20know%20if%20a%20certain%20%26lt%3B%3CSTRONG%3E%3CEM%3Epackage%26gt%3B%3C%2FEM%3E%3C%2FSTRONG%3E%20is%20included%20on%20an%20image%2C%20just%20grep%20the%20output%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%0A%3CP%3E%3CEM%3Ebitbake%20-g%20%3CSTRONG%3E%3CIMAGE%3E%3C%2FIMAGE%3E%3C%2FSTRONG%3E%20%26amp%3B%26amp%3B%20cat%20pn-depends.dot%20%7C%20grep%20-v%20-e%20'-native'%20%7C%20grep%20-v%20digraph%20%7C%20grep%20-v%20-e%20'-image'%20%7C%20awk%20'%7Bprint%20%241%7D'%20%7C%20sort%20%7C%20uniq%20%7C%20grep%20%3CSTRONG%3E%3CPACKAGE%3E%3C%2FPACKAGE%3E%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%0A%0A%3C%2FBLOCKQUOTE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1101957%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EYocto%20Project%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1101960%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX%20Yocto%20Project%3A%20How%20can%20I%20find%20out%20the%20packages%20include%20on%20an%20image%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101960%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Diego%2C%3C%2FP%3E%3CP%3EThanks%20for%20sharing%20those%20tips.%20I%20will%20definitely%20include%20your%20comments%20on%20the%20main%20post%20soon%2C%20so%20people%20can%20find%20it%20faster.%3C%2FP%3E%3CP%3ELeo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1101959%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX%20Yocto%20Project%3A%20How%20can%20I%20find%20out%20the%20packages%20include%20on%20an%20image%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101959%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20again%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAs%20forever_newbies%20we%20are%20yet%20fighting%20with%20package%20names.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EWe%20have%20found%20useful%20to%20add%20build%20history%20to%20compilation%3A%3C%2FP%3E%3CP%3EINHERIT%20%2B%3D%20%22buildhistory%22%3C%2FP%3E%3CP%3EBUILDHISTORY_COMMIT%20%3D%20%221%22%3C%2FP%3E%3CP%3EThe%20list%20of%20all%20files%20included%20in%20image%20and%20the%20package-names%20lists%20let%20us%20see%20if%20our%20try%20to%20add%20a%20particular%20file%2Fbinary%20is%20included%20without%20testing%20the%20image%20on%20the%20board.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAlso%20we%20found%20that%20spec%20files%20seem%20to%20list%20all%20possible%20sub-package%20names%20in%20a%20package%20source.%20We%20do%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%20cd%20build%2Ftmp%2Fwork%3C%2FP%3E%3CP%3E%26nbsp%3B%20find%20.%20%5C(%20-name%20'*.spec'%26nbsp%3B%20%5C)%20-exec%20grep%20%22filename%22%20%7B%7D%20%5C%3B%20-print%3C%2FP%3E%3CP%3Eto%20look%20for%20the%20sub-package%20with%20a%20particular%20file.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThe%20problem%20comes%20when%20the%20package%20is%20not%20included%20in%20the%20image%20at%20all.%20Then%20its%20directory%20does%20not%20exist%20at%20build%2Ftmp%2Fwork.%20Then%20we%20googled%20and%20merged%20the%20results%20with%20this%20list%20of%20existing%20packages%3A%20%3CA%20href%3D%22http%3A%2F%2Fpackages.yoctoproject.org%2F%22%20title%3D%22http%3A%2F%2Fpackages.yoctoproject.org%2F%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttp%3A%2F%2Fpackages.yoctoproject.org%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20don%C2%B4t%20know%20if%20there%20are%20better%20ways%20to%20do%20it.%20Maybe%20somewhere%20is%20an%20index%20of%20what%20package%20have%20a%20particular%20binary.%20Maybe%20not.%20If%20anybody%20knows%2C%20feel%20free%20to%20let%20us%20know.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1101958%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX%20Yocto%20Project%3A%20How%20can%20I%20find%20out%20the%20packages%20include%20on%20an%20image%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101958%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Leonardo%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20am%20speechless%20%3Asmileyshocked%3A%20Step%20over%20the%20link%20several%20times%20without%20seeing%20it.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20only%20got%20to%20%3CEM%3Ebitbake%20-g%20%3CSTRONG%3E%3CIMAGE%3E%20%3C%2FIMAGE%3E%3C%2FSTRONG%3E%3C%2FEM%3Eand%20tried%20to%20load%20the%20.dot%20files%20in%20my%20Ubuntu%2012.04.%20It%20hung%20forever.%20I%20opened%20them%20in%20textmode%20and%20close%20it%20inmediately%20%3Asmileysilly%3A%3C%2FP%3E%3CP%3E%3CEM%3E%3CSTRONG%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3EThank%20you%3CEM%3E%3CSTRONG%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎06-21-2013 01:23 PM
Updated by: