简体   繁体   中英

How to add libgif as a package in yocto build

I am building yocto linux for embedded linux platform. The build is successful and root file system is generated.

however libgif.so library is missing in the root filesystem.

I want libgif to be compiled and copied in my generated root filesystem (in /usr/lib/)

I tried adding giflib in local.conf

DISTRO_FEATURES_append = " giflib "

I expect the giflib to be compiled and copied in the /usr/lib in root filesystem. but it isn't.

If i add EXTRA_IMAGEDEPENDS += " giflib " and just build giflib with "bitbake giflib" then the giflib is compiled and generated at path

Build/tmp/work/aarch64-poky-linux/giflib/5.1.4-r0/build/lib/.libs/giflib.so

Thats not how it works, sorry.

  1. Just building the package will not automagically install it into any rootfs
  2. You have to tell bitbake that you want giflib to be included in your image. This is done by adding it to IMAGE_INSTALL of your custom image.
  3. Adding it to DISTRO_FEATURES will probably have no effect at all, because that is only parsed for specific keywords.

This describes how to add something to a custom image: Custom images in Yocto . You can technically also go the local.conf routes mentioned in the paragraphs above the linked one, but that only hinders proper reproductibility. A bit more extensively, I explain it here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM