Tool/software:
Hey all,
I'm attempting to build Yocto for this devkit, and despite multiple `cleansstate` and burning repos/redownloading and rebuilding everything (taking hours) I always seem to have the same issue when attempting to build both 10.00 and 10.01.
For 10.00 I get the following error during build.
```
WARNING: ti-vision-apps-10.0.0-r0_edgeai_7 do_fetch: Failed to fetch URL repo://git.ti.com/git/processor-sdk/psdk_repo_manifests.git;protocol=https;branch=refs/tags/REL.PSDK.ANALYTICS.10.00.00.04;manifest=vision_apps_yocto.xml, attempting MIRRORS if available
ERROR: ti-vision-apps-10.0.0-r0_edgeai_7 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/home/tisdk/tisdk-yocto/sources/oe-core/scripts:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.0.0/recipe-sysroot-native/usr/bin/aarch64-oe-linux:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.0.0/recipe-sysroot/usr/bin/crossscripts:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.0.0/recipe-sysroot-native/usr/sbin:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.0.0/recipe-sysroot-native/usr/bin:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.0.0/recipe-sysroot-native/sbin:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.0.0/recipe-sysroot-native/bin:/home/tisdk/tisdk-yocto/sources/bitbake/bin:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/hosttools"; export HOME="/"; /usr/bin/env repo sync failed with exit code 1, output:
error: command 'sync' requires repo to be installed first.
Use "repo init" to install it here.
ERROR: ti-vision-apps-10.0.0-r0_edgeai_7 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'repo://git.ti.com/git/processor-sdk/psdk_repo_manifests.git;protocol=https;branch=refs/tags/REL.PSDK.ANALYTICS.10.00.00.04;manifest=vision_apps_yocto.xml')
ERROR: Logfile of failure stored in: /home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.0.0/temp/log.do_fetch.856701
ERROR: Task (/home/tisdk/tisdk-yocto/sources/meta-edgeai/recipes-tisdk/ti-psdk-rtos/ti-vision-apps.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1948 tasks of which 1894 didn't need to be rerun and 1 failed.
```
and for 10.01
```
WARNING: ti-vision-apps-10.1.0-r0_edgeai_10 do_fetch: Failed to fetch URL repo://git.ti.com/git/processor-sdk/psdk_repo_manifests.git;protocol=https;branch=refs/tags/REL.PSDK.ANALYTICS.10.01.00.04;manifest=vision_apps_yocto.xml, attempting MIRRORS if available
ERROR: ti-vision-apps-10.1.0-r0_edgeai_10 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/home/tisdk/tisdk-yocto/sources/oe-core/scripts:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.1.0/recipe-sysroot-native/usr/bin/aarch64-oe-linux:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.1.0/recipe-sysroot/usr/bin/crossscripts:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.1.0/recipe-sysroot-native/usr/sbin:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.1.0/recipe-sysroot-native/usr/bin:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.1.0/recipe-sysroot-native/sbin:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.1.0/recipe-sysroot-native/bin:/home/tisdk/tisdk-yocto/sources/bitbake/bin:/home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/hosttools"; export HOME="/"; /usr/bin/env repo sync failed with exit code 1, output:
error: command 'sync' requires repo to be installed first.
Use "repo init" to install it here.
ERROR: ti-vision-apps-10.1.0-r0_edgeai_10 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'repo://git.ti.com/git/processor-sdk/psdk_repo_manifests.git;protocol=https;branch=refs/tags/REL.PSDK.ANALYTICS.10.01.00.04;manifest=vision_apps_yocto.xml')
ERROR: Logfile of failure stored in: /home/tisdk/tisdk-yocto/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/10.1.0/temp/log.do_fetch.965032
ERROR: Task (/home/tisdk/tisdk-yocto/sources/meta-edgeai/recipes-tisdk/ti-psdk-rtos/ti-vision-apps.bb:do_fetch) failed with exit code '1'
```
I can browse these repos in a browser, and a recusive ripgrep for `ti-vision-apps` or `psdk_repo_manifests` return no results. I was hoping I could try to edit the download mode, but I can't find the correct file to even edit. Any help would be appreciated!
PS: how do I do code blocks? It would be awesome if this forum supported markdown...
Hi Noah,
error: command 'sync' requires repo to be installed first.
Use "repo init" to install it here.
Are you by any chance using this on something other than Ubuntu 22.04?
I remember seeing issues like this when trying to do builds on Ubuntu 24.04, which is not something we support for SDK v10.x at this time. The `repo` tool version changed, hence the errors.
Can you please try building on Ubuntu 22.04 in case you aren't doing this already.
Regards, Andreas
I'm using the TI container. Only modifications are forcing it to use UID 1000 so as not to run afoul of file permissions issues. So far this is the only error, other layers seem to pull/build just fine.
Separately I did try running a yocto build from the sdk installer, but encountered different issues there, namely a line in processor-sdk-analytics-10_01-config.txt which tries to download from an ssh repo, swapping this to https didn't seem to work either.
Hi Noah,
I'm using the TI container.
Can you point to the very specific container/version you are using?
Also (it should matter less since you are using the container build, but I still would like to know), what's your host OS?
Regards, Andreas
ghcr.io/texasinstruments/ubuntu-distro:latest, and I pulled it 3 days ago or so.
My host is Arch. I could try running this again on mac, but arm, emulating x86 to compile arm is a pretty cursed setup.
The relevant bits:
Bootstrap script elements:
```bootstrap.sh
export MY_UID="$(id -u)"
export MY_GID="$(id -g)"
if $(docker compose &>/dev/null); then
d_c="docker compose"
else
d_c="docker-compose"
fi
...
$d_c exec tisdk /bin/bash
...
```
```compose.yml
services:
tisdk:
image: ghcr.io/texasinstruments/ubuntu-distro:latest
user: ${MY_UID}:${MY_GID}
volumes:
- .:/home/tisdk
- /dev:/dev
- /media/:/media/
working_dir: /home/tisdk
privileged: true
stdin_open: true
tty: true
```
Commands run inside the container:
```
#!/usr/bin/env bash
export MACHINE=am62axx-evm
export TARGET=tisdk-edgeai-image
... (working in /home/tisdk which is shared with the host and owned by UID 1000)
git clone git.ti.com/.../oe-layersetup.git tisdk-yocto-git
cd tisdk-yocto-git
export CONFIG="configs/processor-sdk-analytics/processor-sdk-analytics-10.01.00-config.txt"
./oe-layertool-setup.sh -f "$CONFIG"
cd build
. conf/setenv
echo 'ARAGO_BRAND = "edgeai"' >> conf/local.conf
MACHINE=$MACHINE ARAGO_RT_ENABLE=1 bitbake $TARGET
```
I just setup a completely new Docker environment from scratch, to build AM62A SDK v10.1, as per
Will see if I can get a successful build with this and report back. It'll take a bit because it'll be a download/build completely from scratch.
Regards, Andreas
Thanks Andreas,
I think the cause may actually be hiding in that first log. I ran it again and encountered what appears to be a new error, but a lot of old ones too.
Why is this variable like this? HOME="/" I also got a: "fatal: cannot make /.repoconfig directory: Permission denied" this time. It seems something somewhere is trying to write stuff to the container root? That's pretty crazy...
Hey Andreas:
Do you know if an equivalent to run on Ubuntu 24.04.1 LTS is getting into that git repo? I how about a package to run AM64X SDK V10.1 ?
Thanks
Jim
Hi Noah,
Will see if I can get a successful build with this and report back. It'll take a bit because it'll be a download/build completely from scratch.
I was able to get to a successful Docker-based build of the AM62A edge AI image without any issues, using the instructions from the SDK.
My host OS was actually Ubuntu 24.04 (note that for this particular OS, you need to run $ sudo apparmor_parser -R /etc/apparmor.d/unprivileged_userns on the command line after booting the system, to work around network permission issues that otherwise would cause the build to fail)
My host is Arch. I could try running this again on mac, but arm, emulating x86 to compile arm is a pretty cursed setup.
You should first try re-creating a good build using a regular Ubuntu 22.04 or 24.04 host OS, like I did, and then look for differences why your setup might not work. We cannot provide much assistance debugging such non-standard setups like you have.
Regards, Andreas
Noted, thank you for confirming, I'll fiddle on my end and ideally report back what the root issue is when I find it. Building code in a shared container path with a UID that doesn't reflect the UID of the host user is generally bad practice, if there is a solution I discover it would be great if it could be evaluated for any upcoming SDK versions/docker recommended processes.
Hi Jim,
Do you know if an equivalent to run on Ubuntu 24.04.1 LTS is getting into that git repo?
Natively building the v10.1 Yocto SDK on both Ubuntu 22.04 as well as Ubuntu 24.04 (officially not supported!) have no issues accessing this repo. I've done both myself.
I how about a package to run AM64X SDK V10.1
I don't understand what you mean by this, can you please elaborate further.
Regards, Andreas
Hi Noah,
Building code in a shared container path with a UID that doesn't reflect the UID of the host user is generally bad pract
This seems to be a common/general problem. Doing some quick web search I found this here, which might be helpful: https://nickjanetakis.com/blog/running-docker-containers-as-a-non-root-user-with-a-custom-uid-and-gid
If you get something simple proven and working in the SDK context, feel free to share it here, I'm sure I'd be helpful for others.
Regards, Andreas
Hi Andreas:
I suspect Ubuntu 24.04 LTS support needs to happen officially on AM64x by SDK 12.0 (already CCS Theia 20 is supporting Ubuntu 24.04 LTS ).
I am quite interested in the $ sudo apparmor_parser -R /etc/apparmor.d/unprivileged_userns step you mentioned - is that due to chanes in file permissions?
When I looked at that github location, it seemed to just mention AM62x - so should the process be similar for AM64x
thanks,
Jim
Hey Andreas thank you for the help!
Solution for me was:
I missed the "-k" in the bitbake command.
Other stuff:
I downloaded the dockerfile and changed the uid and gid for the tisdk user to match my host user, this prevented the filesystem permission issues and let me skip the chown tisdk step.
I also noticed there's some leftover incorrect instructions in the doc when it says where the built images are found. The tmp-arago path could be completely removed from the docs. The next line in the docs is correct and conflicting.
As a separate note, it seems the yocto build for the installer version of the sdk is messed up. Numerous inaccessible ssh repos, different config files (and file names), etc. It would be cool if the installer instead was like the yocto git method, but just had the first step of compiling completed in advance. It would save us users a day of building layers we probably won't be modifying. Just a thought.
Thank you again for the help!