Error running repo init while building Yocto for Colibri iMX6ULL on external SSD

Hi,

I’ve already successfully built the Yocto image for the Verdin AM62 module following Toradex’s Yocto build documentation.
Now I want to build the Yocto image for Colibri iMX6ULL, but due to limited internal storage on my PC, I am building it inside an external SSD mounted at /mnt/yocto_build.

I’m following this guide:
Host machine setup for yocto

However, when I run the following command:

repo init -u https://git.toradex.com/toradex-bsp-platform/tdx-bsp-platform.git -b scarthgap-7.x.y --depth=1

I get this error:

Downloading Repo source from https://gerrit.googlesource.com/git-repo
repo: error: "git" failed with exit status 128
  cwd: /mnt/yocto_build/colibri-imx6ull-build/.repo/repo.tmp
  cmd: ['git', 'config', 'remote.origin.url', 'https://gerrit.googlesource.com/git-repo']
  stderr:
  >> fatal: not in a git directory
fatal: double check your --repo-rev setting.
fatal: cloning the git-repo repository failed, will remove '.repo/repo'

I’ve already verified:

  • git and python3 are installed.
  • repo is available in ~/bin/repo.
  • My global Git config is set:

Can this issue be related to the external SSD mount point (/mnt/yocto_build) or permissions?
Any suggestions or steps to fix this would be appreciated.

Thanks,
raju

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Yocto Build Setup Issue on External SSD

The error you’re encountering is related to the repo initialization process failing to properly set up the Git repository structure. This can indeed be related to the external SSD mount point and permissions.

Repository Setup for BSP 7.x.y

According to the Toradex documentation, the correct repository setup process involves using the toradex-manifest repository (1). For BSP 7.x.y builds, you should use:

$ mkdir ${HOME}/oe-core

(1)

The documentation indicates that Toradex provides repo manifests which define which repositories and branches repo must clone for each version to be built (1). These manifests are available at the toradex-manifest repository (2).

Potential Solutions

1. Check Mount Permissions

Ensure your external SSD mount has proper permissions for Git operations. The mount point /mnt/yocto_build may have restrictions that prevent Git from creating the necessary repository structure.

2. Use Home Directory Structure

The documentation suggests creating the build environment in ${HOME}/oe-core (1). Consider creating a symbolic link from your home directory to the external SSD:

$ ln -s /mnt/yocto_build/oe-core ${HOME}/oe-core

3. Verify Repo Installation

Make sure the repo tool is properly installed and accessible. The documentation shows the installation process:

$  mkdir ~/bin  
$  export PATH=~/bin:$PATH  
$  curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo  
$  chmod a+x ~/bin/repo

(1)

4. Clean and Retry

Remove the .repo directory from your build location and try the initialization again:

$ rm -rf .repo
$ repo init -u https://git.toradex.com/toradex-bsp-platform/tdx-bsp-platform.git -b scarthgap-7.x.y --depth=1

Manifest Selection

The Toradex documentation explains that there are different manifest groups available (2):

  • tdxref: Manifests for building Reference Images with BSP
  • torizon: Manifest for building Torizon and Torizon Reference Images

Each manifest directory contains default.xml (recommended for monthly/quarterly releases), integration.xml (for nightly releases), and next.xml (internal use only) (2).

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hey @raju3003,

What probably happened is that Git failed to init a repository inside your SSD for some reason (required to clone directories inside .repo), and then it fails to configure it since it’s not a git repository. This could be due to the access permissions to the SSD, or it could be due to the SSD having a different filesystem format.

Since repo is not maintained by us, and your use case is very specific, we are not able to offer much help in this situation. I suggest looking for people in a similar situation in a support channel better suited for repo related issues.

Best regards,