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.
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.
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.
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.
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With