Yocto 减小 libicudata 大小

huangapple go评论77阅读模式
英文:

Yocto Reducing libicudata size

问题

我正在为小型嵌入式Linux设备构建一个Yocto镜像。文件系统中最大的文件之一是libicudata.so,大小为27MB。

我想通过使用此技术来从此库中删除不需要的区域设置来减小镜像的大小,具体描述在这里:
https://lists.openembedded.org/g/openembedded-core/topic/72740450#

我为icu配方创建了一个bbappend(https://git.yoctoproject.org/poky/plain/meta/recipes-support/icu/icu_72-1.bb)并添加了以下filter.json:

{
   "localeFilter": {
      "filterType": "locale",
      "whitelist": [
         "en"
      ]
   }
}

bbappend:

FILESEXTRAPATHS:prepend := "${THISDIR}/icu:"
SRC_URI += "file://filter.json"

我已经验证了我的修改后的filter.json存在于~/poky/build目录中。

问题是,生成的二进制文件始终为27MB,并且由于filter.json而没有缩小。

如何通过在Yocto中删除不需要的区域设置来减小libicu共享对象文件的大小?谢谢。

英文:

I am building a Yocto image for small embedded Linux device. One of the largest files on the filesystem is libicudata.so at 27MB.

I want to decrease the size of the image by removing unneeded locales from this library using the technique described here:
https://lists.openembedded.org/g/openembedded-core/topic/72740450#

I created a bbappend for the icu recipe ( https://git.yoctoproject.org/poky/plain/meta/recipes-support/icu/icu_72-1.bb ) and added the following filter.json:

{
  "localeFilter": {
    "filterType": "locale",
    "whitelist": [
      "en"
    ]
}

bbappend:

FILESEXTRAPATHS:prepend := "${THISDIR}/icu:"

SRC_URI += "file://filter.json"

I have verified that my modified filter.json is present in the ~/poky/build directory.

The problem is that the resulting binary is always 27 MB, and is not shrinking due to the filter.json.

How can I reduce the libicu shared object file in Yocto be removing unneeded locales? Thanks.

答案1

得分: 2

根据您的bb文件: ${@bb.utils.contains('PACKAGECONFIG', 'make-icudata', '', 'exit 0', d)},您应该设置 PACKAGECONFIG += "make-icudata"

英文:

According to your bb file : ${@bb.utils.contains('PACKAGECONFIG', 'make-icudata', '', 'exit 0', d)} you should set PACKAGECONFIG += "make-icudata"

huangapple
  • 本文由 发表于 2023年5月25日 02:45:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76326556.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定