Re: [yocto] puzzle: simple recipe gets image dependencies
> Possible that attr dependencies traverse down to kernel So it's attr.. I wonder how it gets those dependencies "attr.do_build" -> "linux-yocto.do_deploy" "attr.do_build" -> "linux-yocto.do_package_write_ipk" Recipe .inc summary says "Utilities for manipulating filesystem extended attributes" And no visible deps on kernel.. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] puzzle: simple recipe gets image dependencies
On Wed, Nov 13, 2019 at 3:42 PM Vladimir Molokov wrote: > thank you for your answer! > > when I comment out DEPENDS = "attr" line in "example" recipe > then there is no "bad-example" dependency: > https://gitlab.com/morokov/build/raw/master/task-depends-without-attr.dot > > > Alright, so you have initramfs enabled it seems. Which means kernel > > will first try to build designated > > initramfs image which in your case is > > > > "linux-yocto.do_bundle_initramfs" -> > "core-image-minimal.do_image_complete" > > > > and then core-image-minimal includes bad-example > > > > "core-image-minimal.do_image_complete" -> > "bad-example.do_populate_sysroot" > > > > and example does ask kernel to be deployed > > > > "example.do_build" -> "linux-yocto.do_deploy" > > > > > > so that completes the chain. > > "example" is just a simple recipe, it doesn't inherit image class > it doesn't even belong to any image, just standalone recipe. > I don't quite get the logic around initramfs Initramfs is an image that is bundled into kernel binary so you are essentially building an image before you can create kernel binary thereafter you build full image and your build is choking on this small image which infact is a regular image and will respect image depends > > why does it add those dependencies to "example" recipe? > it doesn't if "attr" is commented out. Possible that attr dependencies traverse down to kernel > > -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] puzzle: simple recipe gets image dependencies
thank you for your answer! when I comment out DEPENDS = "attr" line in "example" recipe then there is no "bad-example" dependency: https://gitlab.com/morokov/build/raw/master/task-depends-without-attr.dot > Alright, so you have initramfs enabled it seems. Which means kernel > will first try to build designated > initramfs image which in your case is > > "linux-yocto.do_bundle_initramfs" -> "core-image-minimal.do_image_complete" > > and then core-image-minimal includes bad-example > > "core-image-minimal.do_image_complete" -> "bad-example.do_populate_sysroot" > > and example does ask kernel to be deployed > > "example.do_build" -> "linux-yocto.do_deploy" > > > so that completes the chain. "example" is just a simple recipe, it doesn't inherit image class it doesn't even belong to any image, just standalone recipe. I don't quite get the logic around initramfs why does it add those dependencies to "example" recipe? it doesn't if "attr" is commented out. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] puzzle: simple recipe gets image dependencies
On Wed, Nov 13, 2019 at 12:45 PM Vladimir Molokov wrote: > > > can you share this dot file ? > sure: > http://gitlab.com/morokov/build/raw/master/task-depends.dot > Alright, so you have initramfs enabled it seems. Which means kernel will first try to build designated initramfs image which in your case is "linux-yocto.do_bundle_initramfs" -> "core-image-minimal.do_image_complete" and then core-image-minimal includes bad-example "core-image-minimal.do_image_complete" -> "bad-example.do_populate_sysroot" and example does ask kernel to be deployed "example.do_build" -> "linux-yocto.do_deploy" so that completes the chain. Hope that helps. > also here are more files from the build directory, just in case: > https://gitlab.com/morokov/build/ -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] puzzle: simple recipe gets image dependencies
> can you share this dot file ? sure: http://gitlab.com/morokov/build/raw/master/task-depends.dot also here are more files from the build directory, just in case: https://gitlab.com/morokov/build/ -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] puzzle: simple recipe gets image dependencies
On Wed, 2019-11-13 at 12:33 +0100, Vladimir Molokov wrote: > Hi all, > > > > Here is a strange dependency puzzle: > > simple recipe which doesn't inherit image class > > gets EXTRA-IMAGEDENDS, kernel, initramfs and so on. > > > > It's reproducible on latest poky, > > I've made a minimal example, all lines are important, > > if you remove something, like systemd or attr > > it drops all the dependencies > > though I didn't find anything wrong in systemd nor in attr recipes. > > > > Steps to reproduce: > > > > 1. mkdir puzzle && cd puzzle > > 1. git clone git://git.yoctoproject.org/poky > > 2. source poky/oe-init-build-env > > 3. bitbake-layers create-layer meta-puzzle > > 4. bitbake-layers add-layer meta-puzzle > > 5. cp meta-puzzle/recipes-example/example/example_0.1.bb \ > >meta-puzzle/recipes-example/example/bad-example_0.1.bb > > > > 6. mkdir -p meta-puzzle/conf/distro > > > > 7. printf "require conf/distro/poky.conf\n\n\ > > DISTRO = \"extra-img-dep-test\" \n\ > > DISTRO_NAME = \"Extra image dependency test\"\n\ > > DISTRO_VERSION = \"0.1\"\n\n\ > > DISTRO_FEATURES_append = \"systemd\"\n"\ > > > meta-puzzle/conf/distro/extra-img-dep-test.conf > > > > 7. printf "MACHINE ?= \"qemux86\"\n\ > > DISTRO ?= \"extra-img-dep-test\"\n\n\ > > EXTRA_IMAGEDEPENDS += \"bad-example\"\n\n\ > > INITRAMFS_IMAGE = \"core-image-minimal\"\n"\ > > > conf/local.conf > > > > 8. echo 'DEPENDS = "attr"' >> \ > >meta-puzzle/recipes-example/example/example_0.1.bb > > > > 9. bitbake -g example && grep bad-example task-depends.dot can you share this dot file ? > > 10. see dependencies on 'bad-example'.. > > > > Will be very grateful if anybody point out > > what is wrong with this setup. > > > > I've talked with people struggling with similar problem > > and nobody was able to solve it so far > > and I myself stumbled in it in a couple of projects. > > > > BR, > > Vladimir. > > -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] puzzle: simple recipe gets image dependencies
Hi all, Here is a strange dependency puzzle: simple recipe which doesn't inherit image class gets EXTRA-IMAGEDENDS, kernel, initramfs and so on. It's reproducible on latest poky, I've made a minimal example, all lines are important, if you remove something, like systemd or attr it drops all the dependencies though I didn't find anything wrong in systemd nor in attr recipes. Steps to reproduce: 1. mkdir puzzle && cd puzzle 1. git clone git://git.yoctoproject.org/poky 2. source poky/oe-init-build-env 3. bitbake-layers create-layer meta-puzzle 4. bitbake-layers add-layer meta-puzzle 5. cp meta-puzzle/recipes-example/example/example_0.1.bb \ meta-puzzle/recipes-example/example/bad-example_0.1.bb 6. mkdir -p meta-puzzle/conf/distro 7. printf "require conf/distro/poky.conf\n\n\ DISTRO = \"extra-img-dep-test\" \n\ DISTRO_NAME = \"Extra image dependency test\"\n\ DISTRO_VERSION = \"0.1\"\n\n\ DISTRO_FEATURES_append = \"systemd\"\n"\ > meta-puzzle/conf/distro/extra-img-dep-test.conf 7. printf "MACHINE ?= \"qemux86\"\n\ DISTRO ?= \"extra-img-dep-test\"\n\n\ EXTRA_IMAGEDEPENDS += \"bad-example\"\n\n\ INITRAMFS_IMAGE = \"core-image-minimal\"\n"\ > conf/local.conf 8. echo 'DEPENDS = "attr"' >> \ meta-puzzle/recipes-example/example/example_0.1.bb 9. bitbake -g example && grep bad-example task-depends.dot 10. see dependencies on 'bad-example'.. Will be very grateful if anybody point out what is wrong with this setup. I've talked with people struggling with similar problem and nobody was able to solve it so far and I myself stumbled in it in a couple of projects. BR, Vladimir. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto