Toradexcore-builder Tool image download issue

I’m trying to get started with the toradexcore-builder tool according to this article: TorizonCore Builder Tool - Customizing TorizonCore Images | Toradex Developer Center. I’m trying to download the image from the target device using " torizoncore-builder images download --remote-host --remote-username --remote-password ", but I get the following error:

An unexpected Exception occured. Please provide the following stack trace to
the Toradex TorizonCore support team:

Traceback (most recent call last):
  File "/builder/torizoncore-builder", line 173, in <module>
  File "/builder/tcbuilder/cli/", line 41, in do_images_download
    images.download_tezi(r_ip, args.remote_username, args.remote_password,
  File "/builder/tcbuilder/backend/", line 91, in download_tezi
    prod, yocto, build_type, build_number, module_name, kernel_type, rt,
UnboundLocalError: local variable 'build_type' referenced before assignment

I tried doing it manually, but then I get another error when I’m at the step that asks me to use the command “isolate” which is: “Unable to get user changes”. So I’m thinking that there may be an issue with torizoncore-builder being able to access the imx6, but I’m not sure.

Greetings @SterlingA,

On the iMX6 device itself can you give me the output of cat /etc/os-release. The tool parses this file to figure out what version of TorizonCore is running on your device, so it can download the correct image. Based on the error it seems the file is not being parsed correctly. So please return the contents of this file on the device so I can review it manually.

Best Regards,

alt text

Sorry for the late reply.


The reason it didn’t work is because you’re not running a TorizonCore OS. You’re running our non-Torizon OS. The TorizonCore Builder tool is only meant to work with the TorizonCore OS.

Best Regards,

Ohh okay, thank you.

Glad I could clarify that.

Not sure if I should revive this thread or start another… but here we go:

torizon@apalis-imx6-10924932:~$ cat /etc/os-release
NAME="TorizonCore Upstream"
VERSION="6.1.0+build.1 (kirkstone)"
PRETTY_NAME="TorizonCore Upstream 6.1.0+build.1 (kirkstone)"

I just flashed the 6.1.0 Torizoncore image on to an apalis-imx6 and then ran torizoncore-builder images --remove-storage download --remote.... against it and got this UnboundLocalError: local variable ‘yocto’ referenced before assignment error.

version 3.6.0

Hi @ed-bear,

That is a different issue entirely. We are still in the process of updating TorizonCore Builder to have compatibility with TorizonCore 6.X.Y version images. Some commands and features are expected not to work properly until then.

Some of these issues have been worked out but the changes have not yet been officially released. If you want access to these changes you can use the early access version of TorzionCore Builder: GitHub - toradex/tcb-env-setup: TorizonCore Builder Environment Setup Script

Or, build TorizonCore Builder with the latest changes from scratch: GitHub - toradex/torizoncore-builder: TorizonCore Builder is a tool that allows the customization of TorizonCore images.

If you have further issues/questions on this topic please open a new thread.

Best Regards,

Thanks works with 5.7.0