答案 0 :(得分:1)
登录前的行来自/ etc / issue和/etc/issue.net文件。 您可以通过使用自己的issue和issue.net文件创建bbappend文件来修改它们。
请注意,Yocto仍将附加Poky (Yocto Project Reference Distro) 2.6.1
行。
看看base_file_3.0.14.bb
(我的当前版本):
BASEFILESISSUEINSTALL ?= "do_install_basefilesissue"
[...]
do_install_basefilesissue () {
if [ "${hostname}" ]; then
echo ${hostname} > ${D}${sysconfdir}/hostname
fi
install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
if [ -n "${DISTRO_NAME}" ]; then
printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
if [ -n "${DISTRO_VERSION}" ]; then
distro_version_nodate=${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot').replace('${DATE}','')}
printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue
printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue.net
fi
printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
echo >> ${D}${sysconfdir}/issue
echo "%h" >> ${D}${sysconfdir}/issue.net
echo >> ${D}${sysconfdir}/issue.net
fi
}
您需要禁用此do_install_basefileissue
并设置自己的安装:
base-file _%。bbappend:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_prepend = " file://issue \
file://issue.net "
BASEFILESISSUEINSTALL = "do_install_basefilesissuecustom"
do_install_basefilesissuecustom () {
install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
}