Kernel is not within downloads/*tar.gz but within dynamic folder build/tmp-glibc/workshared/...?

we are building apalis tk1 images on a off-network build machine. Therefore we have to fetch all tarballs first and checkin on a local svn/git repository. This works successfully with all the tar.gz files within the downloads folder.
BUT where is the kernel? ERROR: linux-toradex-3.10.40+gitrAUTOINC+e9636255d1-2.7.4 do_fetch.
It seems that the kernel sources are fetched onthefly into the dynamically created folder build/tmp-glibc/workshared/apalis-tk1/kernel-source. Is there any defined tar.gz or other static downloads location for this which can be found by the recipe?
Best regards

Yes, it should just clone off the bare git repo it previously cloned into your downloads folder when it did have a proper Internet connection.

But how can I get

  1. the cloned toradex kernel e.g.“downloads/git2/”
  2. prefetched completely
  3. and with the correct branch/version (toradex_tk1_l4t_r21.5)
  4. to a valid download folder (“downloads/git2/linux-toradex”?)
  5. to prevent fetching from the internet again during the offnetwork build?

“bitbake angstrom-lxde-image -c fetchall” apparently doesn’t fetch all the needed kernel files

Well it works here.

mkdir fetch_test; cd fetch_test
repo init -u -b LinuxImageV2.7
repo sync
. export
MACHINE=apalis-tk1 bitbake angstrom-lxde-image -c fetchall
cd downloads/git2/
git log --decorate toradex_tk1_l4t_r21.5

The branch/commit has been fetched.

Then disconnecting the network and starting the kernel build succeeds.

cd -
MACHINE=apalis-tk1 bitbake virtual/kernel

Fetch just fills /tmp-glibc/work and /tmp-glibc/work-shared with /temp folders containing log files, but where are all the “arch”, “lib”, “net”, “drivers”, “block”,… sources of the kernel?

The fetch task fetches the sources into the directory defined with DL_DIR.
(local.conf, ‘DL_DIR ?= “${TOPDIR}/downloads”’) e.g. default build/downloads.

Populating the sources in /tmp-glibc/work and /tmp-glibc/work-shared from the downloaded sources in DL_DIR is then later done with the unpack and patch tasks.

See also the relevant chapter in the Yocto documentation.

~/fetch_test$ repo init -u -b LinuxImageV2.7
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
curl: (22) The requested URL returned error: 404 Not Found

Well, of course one can not repo init anything without a proper Internet connection! That part (e.g. all layers and such) would need to be copied from the good known already populated (aka repo initted) machine.

No! “MACHINE=apalis-tk1 bitbake angstrom-lxde-image -c fetchall”
populates build/tmp-glibc/work and work-shared and sstate-control and stamps and sysroots and…
Btw I have read the relevant chapter w/i yocto doc: "This variation of the BitBake command guarantees that you have all the sources for that BitBake target should you disconnect from the Internet and want to do the build later offline."´
That’s what I expected, but apparently doesn’t solely populate “build/downloads”.
However, offline build started. So let’s see if this time really everything has been fetched in which folder whatever…

MACHINE=apalis-tk1 bitbake angstrom-lxde-image -c fetchall → ok

MACHINE=apalis-tk1 bitbake virtual/kernel → ok

MACHINE=apalis-tk1 bitbake angstrom-lxde-image → nok fatal: unable to access ‘’: Received HTTP code 502 from proxy after CONNECT


repo sync → ok, new (previously not fetched objects)

MACHINE=apalis-tk1 bitbake angstrom-lxde-image -c fetchall → ok, no access errors

MACHINE=apalis-tk1 bitbake angstrom-lxde-image → nok fatal: unable to access ‘’: Received HTTP code 502 from proxy after CONNECT

As I mentioned before: There are packages that are NOT fetched before the unpack, configure, compile…

cd downloads/git2/

git log --decorate toradex_tk1_l4t_r21.5

fatal: ambiguous argument ‘toradex_tk1_l4t_r21.5’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
‘git […] – […]’

ERROR: Task (/home/user/fetch_test/build/…/layers/meta-toradex-bsp-common/recipes-kernel/backports/ failed with exit code ‘1’

Kernel build succeeded, but recipes-kernel fails???

I believe an error within that has no reference to downloads folder:

SUMMARY = “Backported kernel drivers”
SECTION = “kernel/modules”
LIC_FILES_CHKSUM = “file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7”
INC_PR = “r1”

SRCREV = “toradex-${PV}”

S = “${WORKDIR}/git”

inherit module

MAKE_TARGETS = “modules”
MODULES_INSTALL_TARGET = “modules_install”



do_configure() {

make CC="${BUILD_CC}" LD="${BUILD_LD}" AR="${BUILD_AR}" \
     -C ${S}/kconf  O=${S}/kconf conf

cp ${WORKDIR}/config ${S}/.config
oe_runmake oldconfig


MACHINE=apalis-tk1 bitbake backports → nok missing backports-toradex

MACHINE=apalis-tk1 bitbake backports -c fetchall → ok, nothing to fetch?

MACHINE=apalis-tk1 bitbake backports → nok, tries to fetch something


I see. I so far only checked the kernel sources. The backports recipe has a bug for your use case.
As it does not define a specific git hash but only the git branch in SRCREV the fetcher needs to access the network on each build to check what is latest and greatest.

By fixing that you should be able to build backports without network access.

I pushed the following change to meta-toradex-bsp-common, morty-next:

diff --git a/recipes-kernel/backports/ b/recipes-kernel/backports/
index b84f378..c6523b1 100644
--- a/recipes-kernel/backports/
+++ b/recipes-kernel/backports/
@@ -5,9 +5,9 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 INC_PR = "r1"
-SRCREV = "toradex-${PV}"
+SRCREV = "ad615b7c1f2bfdb766f225805569f0a1495edc69"
 SRC_URI = " \
-    git://;protocol=git;branch=${SRCREV} \
+    git://;protocol=git;branch=toradex-${PV} \
     file://makefile.patch \
     file://config \

thank you very much for your help. How can I access your changes within morty-next?
My repo is initted to the branch LinuxImageV2.7.

We updated the repo manifest to include the fix so you may just repo sync it now.

The manifest worked fine until Friday.
Now even with online network connection:

1 repo init -u -b LinuxImageV2.7

2 repo sync

3 . export

4 MACHINE=apalis-tk1 bitbake angstrom-lxde-image -c fetchall

leads to multiple errors:RROR: u-boot-toradex-2016.11-2.7.5+gitrAUTOINC+52259cf22a do_fetch: Fetcher failure for URL: ‘git://;protocol=git;branch=2016.11-toradex’. Unable to fetch URL from any source.