We put recipe's git sources in a layer such as foo, e.g.: $ ls foo/git/ linux-yocto-4.12.git yocto-kernel-cache.git And set PREMIRRORS in foo/conf/layer.conf: PREMIRRORS_prepend = " \ git://git.yoctoproject.org/linux-yocto-4.12.git git://${LAYERDIR}/git/linux-yocto-4.12.git;protocol=file \n \ git://git.yoctoproject.org/yocto-kernel-cache git://${LAYERDIR}/git/yocto-kernel-cache.git;protocol=file \n \ " The local sources can be used after add foo layer to conf/bblayers.conf (Note, only foo layer is added to con/bblayers.conf, not foo/git/linux-yocto-4.12.git since the later one is not a layer). But copy_bitbake_and_layers() doesn't support copy subgits, so foo/git/ is not in eSDK after bitbake <image> -cpopulate_sdk_ext. We can enhance it.
I just found that copy_bitbake_and_layers() is OK, it does copy all files under layer, something should be wrong with other parts, maybe oe-publish-sdk.