6

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.

iwahdan
  • 429
  • 1
  • 5
  • 14

3 Answers3

5

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.

challinan
  • 2,584
  • 18
  • 13
0

Problem Solved

It was a Firewall Problem as @Marcus Muller suggested.

iwahdan
  • 429
  • 1
  • 5
  • 14
0

The problem is your firewall. It blocks the port 9418 which is used for the git protocol. Some bitbake recipes are using this protocol for cloning repos.

You can force bitbake to use https instead of the git protocol by running

git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://

after sourcing your build environment.

GeorgUr
  • 61
  • 6