Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yocto Bitbake - Git Fetch always stuck

I am using YOCTO to build an image but the Bitbake process always get stuck at any task including fetch from git

Ex:

Currently 2 running tasks (1373 of 2477):
0: rpi-mkimage-native-git-r0 do_fetch (pid 2372)
1: linux-raspberrypi-1_4.1.21+gitAUTOINC+ff45bc0e89-r0 do_fetch (pid 2371)

These Tasks never End , I checked the Git on my machine and i can clone these repos with no problems.

like image 796
Islam Wahdan Avatar asked Apr 25 '16 21:04

Islam Wahdan


People also ask

How to fix do_fetch error in Yocto?

Usually "do_fetch" error or stuck is caused by network issue. Please check your network or change a new network and try in different time. If you have used yocto to compile successfully before, you can directly copy the relevant files downloaded before to the current project.

What is the fetcher issue in BitBake?

This fetcher issue comes during the bitbake running to build the image. When bitbake tried to fetch the source package from the URL and that time package host server is down then this fetcher issue occurs.

What is the fetch module in BitBake?

BitBake's fetch module is a standalone piece of library code that deals with the intricacies of downloading source code and files from remote systems. Fetching source code is one of the cornerstones of building software. As such, this module forms an important part of BitBake.

What happens if I do not specify a task in BitBake?

If you do not specify a task, BitBake executes the default task, which is "build”. BitBake obeys inter-task dependencies when doing so. The following command runs the build task, which is the default task, on the foo_1.0.bbrecipe file:


1 Answers

I can tell you that do_fetch for a kernel repository can take a very long time, depending on your 'net connection. How long did you wait? Also, you say you can clone on your machine...what source did you clone from? Did you look at the recipe's SRC_URI to determine where these recipes are actually cloning from? Something like:

$ bitbake -e virtual/kernel | grep ^SRC_URI=

should yield the correct source URL for your linux-raspberrypi kernel recipe. Don't assume you know where it was coming from.

Same for the rpi-mkimage recipe:

$ bitbake -e rpi-mkimage | grep ^SRC_URI=

will give you the source URL for that recipe.

If you can clone both, using the correct URL from the recipe as reported by bitbake -e, then you need to do some deeper troubleshooting. ps can be your friend, to see what processes are running and potentially waiting for something. Usually the logs for do_fetch aren't too exciting, but do check them. Look in ${WORKDIR}/temp for each recipe. Again, bitbake -e will give you the WORKDIR for each recipe:

$ bitbake -e virtual/kernel | grep ^WORKDIR=

or

$ bitbake -e rpi-mkimage | grep ^WORKDIR=

Happy hunting.

like image 155
challinan Avatar answered Sep 27 '22 22:09

challinan