linux - Yocto 减少 libicudata 大小

标签 linux yocto bitbake icu

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

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

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

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

bbappend:

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

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

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

问题是生成的二进制文件始终为 27 MB,并且不会因 filter.json 而缩小。

如何减少 Yocto 中的 libicu 共享对象文件以删除不需要的语言环境?谢谢。

最佳答案

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

关于linux - Yocto 减少 libicudata 大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76326556/

相关文章:

c - 编译 SVGA 源代码时出错

android - 如何提取 tar (ed) Android 存储库?

linux-kernel - 尝试将 Linux menuconfig 与 yocto/morty 一起使用

git - 如何使用SRC_URI获取浅拷贝?

linux - 在使用 Yocto 构建 Linux 镜像时,pathspec 'gnulib' 与 git 已知的任何文件都不匹配

Yocto:oe_runmake 失败,bitbake 镜像的 do_configure 中出现错误

c - 用户输入到 C 中的 linux 命令

linux - 尝试在bash中使用变量将stderr重定向到/dev/null

linux - 在 yocto 中创建一个只读文件

c++ - .h : No such file or directory YOCTO/Openembedded