How to add packages to populate SDK as a host tool?

I have created my own recipe for building my SW, which requires native perl during building (eg invoking perl script for generating code). There is no problem if I add my recipe to an image and use bitbake to build my recipe with the image.

Now I also want to build SW with a populate SDK, but I found that when I generate the populate SDK, the native perl only contains a few modules without what is necessary to build my SW. I have found two ways to generate the populate SDK with additional perl modules:

  • Add TOOLCHAIN_HOST_TASK += "nativesdk-perl-modules" to my image .bb file before I generate the populate SDK
  • Add a bbappend file for nativesdk-packagegroup-sdk-host which includes "nativesdk-perl-modules" in RDEPENDS
  • For 1, it is an image-specific solution. For 2, it is a global solution.

    Now I am looking for a recipe-specific solution. Is there a solution where I could add some configuration in my recipe .bb file, and then I build populate SDK for any image which include my recipe will contains these additional native perl modules?


    I'm afraid there isn't really a way for a specific recipe to hint at adding specific dependencies to an SDK. The closest thing I can think of would be to code something into anonymous python in something like an extra global class, where it checks the included target packages and then adds dependencies to TOOLCHAIN_HOST_TASK if the right target packages are being installed. Even this wouldn't detect non direct dependencies of your specific recipe.

    链接地址: http://www.djcxy.com/p/31944.html

    上一篇: Django开发IDE

    下一篇: 如何添加包作为主机工具填充SDK?