Live Coding with Yocto Project #3: package dependencies and splitting

  Рет қаралды 10,054

Yocto Project

Yocto Project

Күн бұрын

Пікірлер: 25
@ericgorder1
@ericgorder1 3 жыл бұрын
I appreciate this video, it was a good example of dependencies. Before I didn't know that there was 2 types of dependencies. Now your video informs me well and now I know more about dependencies in Yocto. I appreciate your efforts for these live coding sessions and hope that you will make good rewards and income. Cheers and good luck!
@tomjordansantiago2383
@tomjordansantiago2383 Жыл бұрын
Hi, what's the difference of adding libanswer-example at the start, using '=+', of PACKAGES variable that adding it at the end using '+='? when I tried using '+=' the ask binary is still available (libanswer-example is still not added in IMAGE_INSTALL variable), but when using '=+' the binary is no more there.
@hoonchoi70
@hoonchoi70 3 жыл бұрын
Nice presentation. Learn a lot. Tons of thanks!
@alican-mj4lr
@alican-mj4lr 4 жыл бұрын
Thank you for the video. on the 16:40 RDEPENDS has _${PN} extension but DEPENDS don't. I could not understand why DEPENDS dont have it. You had said that, "DEPENDS are prepared for the recipe RDEPENDS are prepared for the packge ", on 16:39 you said RDEPENDs to package called libanswer. But libanswer is name of our recipe, so it was a bit confusing.
@TheYoctoProject
@TheYoctoProject 4 жыл бұрын
"libanswer" is the name of the recipe and the name of the produced package. This is the the common case, that the main package shares the name of the recipe. So yes, this really applies: DEPENDS is for defining what the recipe needs to build RDEPENDS_${PN} is for defining what the package named $PN needs at runtime. Example, you have a recipe "aaa" that produces two packages "aaa-foo" and "aaa-bar", then you could need: RDEPENDS_${PN}-foo = "something" RDEPENDS_${PN}-bar = "elsething"
@mirzaavdic7235
@mirzaavdic7235 4 жыл бұрын
@@TheYoctoProject Would this mean that if you leave RDEPENDS without a package suffix (_${PN}) that the selected runtime dependency will be defined for all packages that the recipe produces?
@TheYoctoProject
@TheYoctoProject 4 жыл бұрын
@@mirzaavdic7235 good question, try and find out. (bitbake -e) but from my feeling I would rather guess that no package ends up with the RDEPEND.
@mirzaavdic7235
@mirzaavdic7235 4 жыл бұрын
@@TheYoctoProject For people who are interested at the answer, at least at the SUMO version, the correct answer is: ERROR: Variable RDEPENDS is set as not being package specific, please fix this. [pkgvarcheck]
@milanshah6697
@milanshah6697 3 жыл бұрын
Let's say there is a case where "syslog-ng" package is providing eventlog as a part of library but my project already has eventlog. So when building the image, both syslog-ng and eventlog are trying to install libevtlog* libraries in /usr/lib/ directory. Now I can't remove eventlog package from my package. I want both of them to build but have an option to choose which library to use. So I want to split eventlog library from syslog-ng, what is the best option to do that?
@ericgorder1
@ericgorder1 3 жыл бұрын
I have a question: is += and =+ same thing in the recipe files? Thanks!
@alican-mj4lr
@alican-mj4lr 4 жыл бұрын
Why do you prefer to create your recipes in the build directory?
@TheYoctoProject
@TheYoctoProject 4 жыл бұрын
The recipe is not actually created in the build directory, but in the staging area of devtool (which just happens to live in the build). Once finished, one would commit the recipe to a layer outside the build directory, but I think that didn't get covered in the video.
@DynoosHD
@DynoosHD 4 жыл бұрын
Where can I find all the options that i can use inside the recipe? Edit: found it. Chapter 14.1 in the reference manual
@abdallahrashed1947
@abdallahrashed1947 4 жыл бұрын
how did you get the right answer in the first trail meanwhile you didn't link the recipe to the image , you only build the recipe itself ?
@TheYoctoProject
@TheYoctoProject 4 жыл бұрын
It was a leftover image from the preparations for the video. I had built the image already to see if it works, then forgot to rebuild it without libanswer again.
@DynoosHD
@DynoosHD 4 жыл бұрын
How do I know the missing runtime dependencies before I run it in the build.
@TheYoctoProject
@TheYoctoProject 4 жыл бұрын
Often you actually don't know before and only find out the hard way. Unless it's your own code, then you hopefully know what it needs to work properly.
@abdallahrashed1947
@abdallahrashed1947 4 жыл бұрын
a very great explanation and recapping
@TheYoctoProject
@TheYoctoProject 4 жыл бұрын
Thanks a lot!
@asadboro1568
@asadboro1568 4 жыл бұрын
the man is starving for errors! everytime when when it builds with no errors he says he wasn't expecting that :D
@andysdroning
@andysdroning 5 жыл бұрын
Add a new package > devtool add libanswer github.com/LetoThe2nd/libanswer # Under build dir > bitbake libanswer > runqemu qemuarm example-image nographic Inside qemu > ask # Should add new package into image first # Actually an error is expected because image was not rebuilt > poweroff Reproduce expected error > vim example-image.bb # Under meta-live/recipes-example/images # Make update of IMAGE_INSTALL += “libanswer” > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # The expected error appears, a runtime dependency the answer is sh: bc: not found > poweroff Fix dependency > devtool edit-recipe libanswer # Under build dir # Right after line of DEPENDS = “boost” # Add RDEPENDS_${PN} = “bc” # Note that DEPENDS are prepared per recipe and RDEPENDS are per package > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # Should work now > poweroff Create a build dependency error > devtool edit-recipe libanswer # Comment out DEPENDS = “boost” > bitbake -c cleansstate libanswer && bitbake libanswer # Raise a dependency error in configure step Fix the error and add a new package > devtool edit-recipe libanswer # Uncomment out DEPENDS = “boost” > devtool edit-recipe libanswer # Right after inherit “cmake” # Add line PACKAGES =+ “${PN}-example” > bitbake libanswer > bitbake -e libanswer | less # Check variable PACKAGES should contain libanswer-example in addition to canonical packges > less conf/local.conf # Check what package format is used e.g. rpm > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # Still work, not as expected > poweroff Move binary file to newly created package > devtool edit-recipe libanswer # Right after PACKAGES =+ “${PN}-example” # Add line FILES_${PN}-example = “/usr/bin/ask” # I flattened 3 lines in the video into 1 above > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # See expected error -sh: ask: not found > ls /usr/lib # Confirm libanswer.so.0.0.1 is still there > poweroff Fix the error > vim example-image.bb # Under dir meta-live/recipes-example/images # Make an update IMAGE_INSTALL += “libanswer libanswer-example” > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # Work again > poweroff Show recipe and variables > devtool edit-recipe libanswer # Show the recipe > bitbake -e libanswer | less # Check variables FILES_libanswer, FILES_libanswer-dev, FILES_libanswer-example, etc
@alexsong4433
@alexsong4433 3 жыл бұрын
Just found that "PACKAGES +=" is not equal to "PACKAGES =+". This difference made me suffer a lot. Crying laugh face.
Live Coding with Yocto Project #4: SDKs
1:03:56
Yocto Project
Рет қаралды 10 М.
The Lost World: Living Room Edition
0:46
Daniel LaBelle
Рет қаралды 27 МЛН
Война Семей - ВСЕ СЕРИИ, 1 сезон (серии 1-20)
7:40:31
Семейные Сериалы
Рет қаралды 1,6 МЛН
Getting started with Yocto Project - Chris Simmons - NDC TechTown 2022
1:03:27
“Introduction to Layers, Images and more, Part 1” by Tom King
1:24:44
How to Do 90% of What Plugins Do (With Just Vim)
1:14:03
thoughtbot
Рет қаралды 912 М.
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 157 М.
Live Coding with Yocto Project #1: download and first build
52:37
Yocto Project
Рет қаралды 41 М.
Simple Code, High Performance
2:50:14
Molly Rocket
Рет қаралды 269 М.
Building a Custom Embedded Linux Distribution with the Yocto Project
50:20