哪个实用程序生成“ Poky(Yocto项目参考发行版)2.6.1(无)/ dev / console”

时间:2019-05-02 17:09:46

标签: linux embedded embedded-linux yocto

我正在玩Yocto Thud 2.6.1。

我想知道哪个实用程序/程序/库负责产生以下行:

“ Poky(Yocto项目参考发行版)2.6.1(无)/ dev / console”

Yocto Login Prompt 谢谢

1 个答案:

答案 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}
}