I am trying to override the dropbear.default
The layer looks like this : meta/recipes-core/dropbear
├── dropbear
│ ├── 0001-urandom-xauth-changes-to-options.h.patch
│ ├── 0005-dropbear-enable-pam.patch
│ ├── 0006-dropbear-configuration-file.patch
│ ├── dropbear
│ ├── dropbear.default
│ ├── dropbear-disable-weak-ciphers.patch
│ ├── dropbearkey.service
│ ├── [email protected]
│ ├── dropbear.socket
│ └── init
├── dropbear_2020.81.bb
├── dropbear_%.bbappend
├── dropbear.inc
└── files
├── 0007-patch1.patch
└── 0008-patch2.patch
└──$MACHINE folder name
├──dropbear.default -------> this one I want to use to replace the old one from the /dropbear/dropbear.default above
I created a dropbear_%.bbappend
and in that dropbear_%.bbappend file I have
FILESEXTRAPATHS_prepend_myfolder := "${THISDIR}/${PN}:${THISDIR}/${MACHINE}:${THISDIR}/files:" -----> this should be
${THISDIR}/${MACHINE}:${THISDIR}/files:"
Still I got the same error
It is pretty unusual to have a bbappend in the same directory as the bb recipe it'll append to, but whatever floats your boat :) In that case, this unusual scenario is actually part of the issue.
I'm unsure what
_myfolderis representing inFILESEXTRAPATHS_prepend_myfolder? Ifmyfolderis not part of theOVERRIDESvariable (or other implicit values, such asclass-target,virtclass-, etc..) then it'll not work. I'm pretty sure you should actually just strip it fromFILESEXTRAPATHS_prepend. c.f. https://docs.yoctoproject.org/ref-manual/variables.html#term-OVERRIDESConsidering the current directory layout, the
FILESEXTRAPATHS_prependin your bbappend will be expanded to:The paths that will be searched by Yocto for files in
SRC_URIwill be searched from leftmost to rightmost, c.f. https://docs.yoctoproject.org/ref-manual/variables.html#term-FILESPATH (it is not phrased clearly though IMO I can give you that).So technically, you're telling Yocto to search within the
dropbeardirectory fordropbear.defaultfirst and then${MACHINE}directory and thenfiles. Which is already what's used by the original recipe, so all in all, your bbappend is a no-op for files you want to override.To fix this, either:
dropbear.defaultfile will be taken fromdropbear,${MACHINE}orfilesdirectory at the same level as your bbappend. (and since the paths inFILESEXTRAPATHS(andFILESPATH) are absolute, it'll find the file you want),${THISDIR}/${PN}(which is./dropbear) from yourFILESEXTRAPATHS_prependor put it after the directory in which you have placed the file you want to override,${MACHINE}) directly in./dropbearsince directories specified inFILESPATH(and thus,FILESEXTRAPATHS) are automatically extended withFILESOVERRIDESwhich contains the machine name. Basically, let's sayFILESPATHis set todirA:dirB,dirA/poky(if poky is your distro) will be searched first, thendirB/poky, thendirA/machine,dirB/machine,dirAand finallydirB. So by having a subdirectory named after your machine in./dropbearit'll be searched before./dropbearby Yocto automatically. c.f. https://docs.yoctoproject.org/ref-manual/variables.html#term-FILESPATHYou can check which directories are searched and in which order by reading the
log.do_fetchlog file from${WORKDIR}/temp, with${WORKDIR}probably going to end with being something liketmp/work/<target_arch>/dropbear/2020.81-r0/.You can check the values of variables and the history of how the values were built by running
bitbake dropbear -e. Since it can output several millions of lines, you usually either pipe it tolessormore, redirect it to a file or pipe it togrep -e "^VARTOCHECK=".