[yocto] Remove libjpeg.so (default built even in core-image-minimal) from the rootfs when build yocto

Petter Mabäcker petter at technux.se
Mon Jan 15 22:40:24 PST 2018


 

2018-01-16 05:28 skrev Nguyễn Thanh Vũ: 

> I have statically linked
the libjpeg of my own to the exe file, so I do not need the libjpeg.so
default built in the /lib of rootfs. How can I modify or specify in the
local.conf file so that I can remove that component? It takes quite a
lot of space. 
> 
> Thank you.

Hi Nguyễn, 

If you want (and no
dependencies dissallow it), you can remove the entire package providing
libjpeg.so from being installed with PACKAGE_EXCLUDE
(http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_EXCLUDE).


If that`s not working you can for example use
ROOTFS_POSTPROCESS_COMMAND
(http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-ROOTFS_POSTPROCESS_COMMAND).
However that will require more work then just update a line in
local.conf. 

If you want to try it out you can simply append the image
recipe in a custom layer with below. 

 my_postprocess_function() {
 rm
-f ${IMAGE_ROOTFS}/path/to/libjpeg.so
 }
 ROOTFS_POSTPROCESS_COMMAND +=
"my_postprocess_function; "

BR Petter 

Petter Mabäcker

Technux
<petter at technux.se>
www.technux.se
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180116/4698a6d7/attachment.html>


More information about the yocto mailing list