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
_myfolder
is representing inFILESEXTRAPATHS_prepend_myfolder
? Ifmyfolder
is not part of theOVERRIDES
variable (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_prepend
in your bbappend will be expanded to:The paths that will be searched by Yocto for files in
SRC_URI
will 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
dropbear
directory fordropbear.default
first 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.default
file will be taken fromdropbear
,${MACHINE}
orfiles
directory 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_prepend
or put it after the directory in which you have placed the file you want to override,${MACHINE}
) directly in./dropbear
since directories specified inFILESPATH
(and thus,FILESEXTRAPATHS
) are automatically extended withFILESOVERRIDES
which contains the machine name. Basically, let's sayFILESPATH
is set todirA:dirB
,dirA/poky
(if poky is your distro) will be searched first, thendirB/poky
, thendirA/machine
,dirB/machine
,dirA
and finallydirB
. So by having a subdirectory named after your machine in./dropbear
it'll be searched before./dropbear
by 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_fetch
log 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 toless
ormore
, redirect it to a file or pipe it togrep -e "^VARTOCHECK="
.