Yocto repo init throwing error

I have built previous versions of linux image for Toradex apalis iMX8 modules multiple times following the instruction from this Toradex’s High performance, low power Embedded Computing Systems | Toradex Developer Center. The last successful build I did was earlier this year. Today I tried to do a few more yocto builds and I have been facing some problems. Given below is the error…

toradex-yocto$ repo init -u Index of /toradex-bsp-platform.git -b LinuxImage3.0 -m default.xml
Traceback (most recent call last):
File “/media/HD1/yocto_builds/.repo/repo/main.py”, line 628, in
File “/media/HD1/yocto_builds/.repo/repo/main.py”, line 602, in _Main
result = run()
File “/media/HD1/yocto_builds/.repo/repo/main.py”, line 595, in
run = lambda: repo._Run(name, gopts, argv) or 0
File “/media/HD1/yocto_builds/.repo/repo/main.py”, line 264, in _Run
result = cmd.Execute(copts, cargs)
File “/media/HD1/yocto_builds/.repo/repo/subcmds/init.py”, line 517, in Execute
File “/media/HD1/yocto_builds/.repo/repo/subcmds/init.py”, line 324, in _SyncManifest
File “/media/HD1/yocto_builds/.repo/repo/project.py”, line 3588, in MetaBranchSwitch
self.Sync_LocalHalf(syncbuf, submodules=submodules)
File “/media/HD1/yocto_builds/.repo/repo/project.py”, line 1662, in Sync_LocalHalf
lost = self._revlist(not_rev(revid), HEAD)
File “/media/HD1/yocto_builds/.repo/repo/project.py”, line 3156, in _revlist
return self.work_git.rev_list(*a, **kw)
File “/media/HD1/yocto_builds/.repo/repo/project.py”, line 3367, in rev_list
(self._project.name, str(args), p.stderr))
error.GitError: manifests rev-list (‘^117f6e28677b1582bcd1be6b2710c83fbd978708’, ‘HEAD’, ‘–’): fatal: bad revision ‘HEAD’

Before that, i had permission issues with ‘. export’ and ‘bitbake’ command. Therefore i switched to a different disk and started with a fresh envrionment and new ~/repo folder.


Do you have Python 2 on your dev machine? Which Linux distro/version you are using?