【发布时间】:2022-09-23 16:23:27
【问题描述】:
我需要用新的 hosts 文件替换 Yocto 图像的默认文件 /etc/hosts。
允许这样做的 Yocto 食谱是什么?
谢谢
标签: yocto-recipe
我需要用新的 hosts 文件替换 Yocto 图像的默认文件 /etc/hosts。
允许这样做的 Yocto 食谱是什么?
谢谢
标签: yocto-recipe
我找到了食谱,那就是:meta/recipes-core/base-fles/base-files_<recipe_version>.bb
所以我可以添加一个base_files_%.bbappend 文件(在mylayer/recipes-core/base-files 中)并用我的新hosts 文件替换默认的hosts 文件。
文件base_files_%.bbappend 的内容是:
FILESEXTRAPATHS_prepend := "${THISDIR}/base-files:"
SRC_URI = "file://rotation \
file://nsswitch.conf \
file://motd \
file://hosts \
file://host.conf \
file://profile \
file://shells \
file://fstab \
file://issue.net \
file://issue \
file://share/dot.bashrc \
file://share/dot.profile \
file://licenses/GPL-2 \
"
此外,我在文件夹中插入了新的 hosts 文件:meta/recipes-core/base-fles/base-files
【讨论】: