Skip to content
Advertisement

which utility produces “Poky (Yocto Project Reference Distro) 2.6.1 (none) /dev/console”

I am playing with Yocto Thud 2.6.1.

I want to know which utility / program / library is responsible for producing following line:

‘Poky (Yocto Project Reference Distro) 2.6.1 (none) /dev/console’

Yocto Login Prompt Thanks

Advertisement

Answer

The lines before the login are from the /etc/issue and /etc/issue.net files. You can modify them by creating a bbappend file with your own issue and issue.net files.

Note that Yocto will still append the Poky (Yocto Project Reference Distro) 2.6.1 lines.

Taking a look at the base_file_3.0.14.bb (my current version):

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 \ln" >> ${D}${sysconfdir}/issue
        echo >> ${D}${sysconfdir}/issue
        echo "%h"    >> ${D}${sysconfdir}/issue.net
        echo >> ${D}${sysconfdir}/issue.net
    fi
}

Yo need to disable this do_install_basefileissue and set your own install instead:

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}
}
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement