If we need to include an extra configuration file, we should use FILESEXTRAPATHS, as explained in the previous example and shown in the following lines of code:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
SRC_URI += "file://newconfigfile.conf"
do_install_append() {
install -m 644 ${WORKDIR}/newconfig.conf ${D}${sysconfdir}
}
The do_install_append function appends the provided block below the metadata already available in the original do_install function. It includes the command needed to copy our new configuration file into the package's filesystem. The file is copied from ${WORKDIR} to ${D} as these are the directories used by Poky to build the package and the destination directory used by Poky to create the package. The ${sysconfdir} directory is the system configuration directory (usually with /etc...