从 Yocto 生成的图像中完全删除 busybox [英] Removing busybox completely from a Yocto generated image

查看:58
本文介绍了从 Yocto 生成的图像中完全删除 busybox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个没有 busybox 和任何 busybox 的 yocto 图像已部署小程序.

I'm trying to build a yocto image without busybox and without any busybox applet deployed.

我试过以这种方式配置我的 distro.conf 文件:

I have tried that configuring my distro.conf file in this way:

DISTRO_FEATURES_remove = " busybox"
VIRTUAL-RUNTIME_base-utils = ""
PREFERRED_PROVIDER_virtual/base-utils = ""

尽管如此,busybox 二进制文件和两个相关的小程序(syslog 和 udhcpc)是安装在生成的镜像中:

Nonetheless, busybox binary and two related applets (syslog and udhcpc) are installed in the generated image:

$ rpm -qa | grep busybox
busybox-syslog-1.24.1-r0.corei7_64
busybox-1.24.1-r0.corei7_64
busybox-udhcpc-1.24.1-r0.corei7_64

我尝试禁用附加到我的 distro.conf 文件的系统日志小程序:

I have tried disabling syslog applet appending to my distro.conf file:

VIRTUAL-RUNTIME_syslog ?= ""

但 syslogd 小程序仍然安装:

But syslogd applet is still installed:

# ls -l /sbin/syslogd
lrwxrwxrwx 1 root root 19 Feb 15 14:03 /sbin/syslogd -> /bin/busybox.nosuid

有没有办法从生成的图像中完全删除busybox?

Is there some way to remove busybox completely from the generated image?

推荐答案

我终于找到了问题的正确答案.完全禁用 busybox 的技巧是在 distro.conf 文件中定义这些变量:

Finally I found the right answer to my question. The trick to disable busybox completely is defining these variables in the distro.conf file:

VIRTUAL-RUNTIME_base-utils = ""
VIRTUAL-RUNTIME_login_manager = "shadow"

仅当您在自定义映像中安装packagegroup-core-boot"时才需要最后一个变量 (login_manager),例如在我的情况下.

Last variable (login_manager) is only needed if you install "packagegroup-core-boot" in your custom image, such as in my case.

这样,这个问题就解决了.非常感谢您的支持!:-)

So, this question is solved. Thank you so much for all your support! :-)

这篇关于从 Yocto 生成的图像中完全删除 busybox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆