Torizoncore Builder under windows 10 host

Is it possible to install torizoncore builder under a windows host ?
the setup script in the article links to a bash script only.

Greetings @nkj,

We haven’t documented yet the use of TorizonCore Builder on a Windows machine. However the plan is to use the tool within a WSL 2 Linux distro. In this way things like the setup script and the tool itself should work like it does on a standard Linux host. Unfortunately this is probably the easiest way since there’s aspects of the tool that can’t be easily done in Windows.

Best Regards,
Jeremias

I guess you mean using the wsl-integration in docker ?

Get the following error when running torizcore-builder dt checkout

Traceback (most recent call last):                                                                                        File "/builder/torizoncore-builder", line 169, in <module>                                                                mainargs.func(mainargs)                                                                                               File "/builder/tcbuilder/cli/dt.py", line 36, in do_dt_checkout                                                           checkout_git_repo(storage_dir, None, None)                                                                            File "/builder/tcbuilder/backend/common.py", line 246, in checkout_git_repo                                               git_branch = get_branch_from_metadata(storage_dir)                                                                    File "/builder/tcbuilder/backend/common.py", line 231, in get_branch_from_metadata                                        src_sysroot = ostree.load_sysroot(src_sysroot_dir)                                                                    File "/builder/tcbuilder/backend/ostree.py", line 40, in load_sysroot                                                     sysroot.load()                                                                                                      gi.repository.GLib.GError: g-io-error-quark: loading sysroot: opendir(/storage/sysroot): No such file or directory (1)

Hi @nkj,

I’m using WSL2 with Ubuntu 18.04 on Windows 10 Pro, and I can execute TorizonCore Builder smoothly.

So, in other words, I have a fully working Ubuntu 18.04 environment within Windows 10 through WSL2.

Can you describe precisely which environment are you using?

Best regards,
André Curvello

i installed Ubuntu 20.04 LTS
Windows 10 Enterprise build 1909.
i will try ubuntu 18.04 as well and get back

i tried as well under ubuntu 18.04 under wsl2 and as well under native linux under ubuntu 20.04 lts and i get the same error when running torizoncore-builder dt checkout.

i installed it using the setup script which is on github in all cases.

Error screenshot

thanks jeremias. that seems to be the issue.
i was following this article Pin Multiplexing - Changing Pin Functionalities in the Linux Device Tree | Toradex Developer Center to change change the pin function. would be helpful to add the initial steps of download the torizoncore image and extracting it to that article as well.

Ok! I’ll be waiting for your feedback.

Good catch @jeremias.tx.

I’ll make a note on TorizonCore Builder article.

So it’s working for your now, right @nkj?

yes that worked.

I believe I know what the issue is, you need to run the unpack command first. Take note of the workflow example here: Device Tree Overlays on Torizon | Toradex Developer Center

The unpack command must be run before some of the other commands like dt checkout will work properly. Running this command should populate the missing files and directories that the tool is complaining about. Perhaps we can work on making this more clear.

Best Regards,
Jeremias

Glad we were able to work things out and solve this issue.

Best Regards,
Jeremias

Hi,

I am having this same issue when attempting to run a torizoncore-builder dt checkout command.

I have tried unpacking various versions of the easy Installer using torizoncore-builder images unpack but have failed with the following error messages:

Unzipping Toradex Easy Installer
image. Copying Toradex Easy Installer
image. Unpacking TorizonCore Toradex
Easy Installer image. 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 204, in
mainargs.func(mainargs) File “/builder/tcbuilder/cli/images.py”,
line 71, in do_images_unpack
images_unpack(args.image_directory,
File
“/builder/tcbuilder/cli/images.py”,
line 65, in images_unpack
images.import_local_image(image_dir,
dir_list[0], dir_list[1], dir_list[2])
File
“/builder/tcbuilder/backend/images.py”,
line 180, in import_local_image
unpack_local_image(tezi_dir, src_sysroot_dir) File
“/builder/tcbuilder/backend/images.py”,
line 112, in unpack_local_image
tarfile = get_rootfs_tarball(image_dir) File
“/builder/tcbuilder/backend/common.py”,
line 50, in get_rootfs_tarball
raise FileNotFoundError(“No image.json file found in image
directory”) FileNotFoundError: No
image.json file found in image
directory

Or…

Unzipping Toradex Easy Installer
image. Copying Toradex Easy Installer
image. Unpacking TorizonCore Toradex
Easy Installer image. No root file
system content section found in
<_io.TextIOWrapper
name=‘/storage/tezi/image.json’
mode=‘r’ encoding=‘UTF-8’>

Am I using the unpack command wrong?

Kind regards,

Dan

What’s the exact command you’re running?

Looking at the error messages here it appears you’re not running unpack on a Toradex Easy Installer image for Torizon.

Best Regards,
Jeremias

Hi, thank you for your quick reply,

Where abouts can I find the easy installer image?

So I’ve copied the Easy Installer Zip/tar file into the working directory and then run the following commands:

torizoncore-builder images unpack Apalis-iMX8_ToradexEasyInstaller_2.0b7-20210415.zip

torizoncore-builder images unpack apalis-imx8_toradexeasyinstaller_2.0b6-20201102.zip

torizoncore-builder images unpack Apalis-iMX8_ToradexEasyInstaller_5.3.0-devel-20210705+build.54.zip

these three commands gave the following error message:

Traceback (most recent call last):
File “/builder/torizoncore-builder”,
line 204, in
mainargs.func(mainargs) File “/builder/tcbuilder/cli/images.py”,
line 71, in do_images_unpack
images_unpack(args.image_directory,
File
“/builder/tcbuilder/cli/images.py”,
line 65, in images_unpack
images.import_local_image(image_dir,
dir_list[0], dir_list[1], dir_list[2])
File
“/builder/tcbuilder/backend/images.py”,
line 180, in import_local_image
unpack_local_image(tezi_dir, src_sysroot_dir) File
“/builder/tcbuilder/backend/images.py”,
line 112, in unpack_local_image
tarfile = get_rootfs_tarball(image_dir) File
“/builder/tcbuilder/backend/common.py”,
line 50, in get_rootfs_tarball
raise FileNotFoundError(“No image.json file found in image
directory”) FileNotFoundError: No
image.json file found in image
directory

I then tried this package hosted on jfrog:

torizoncore-builder images unpack tezi-run.tar

which gave the following error message:

Unpacking Toradex Easy Installer
image. Unknown naming pattern for file
/workdir/tezi-run.tar

And finally I tried this subdirectory of the previous package:

torizoncore-builder images unpack teziimage.zip

which gave the following error message:

Unzipping Toradex Easy Installer
image. Copying Toradex Easy Installer
image. Unpacking TorizonCore Toradex
Easy Installer image. No root file
system content section found in
<_io.TextIOWrapper
name=‘/storage/tezi/image.json’
mode=‘r’ encoding=‘UTF-8’>

Kind regards,

Dan

Just to say I tried to download the image I currently have running on my device, but it gave me the error:

The requested image could not be found in the toradex artifactory

I then used the link in the the debug messaging to download a tezi image, and it is now working. This is link:

https://artifacts.toradex.com/artifactory/torizoncore-oe-prerelease-frankfurt/dunfell-5.x.y/nightly/336/apalis-imx8/torizon/torizon-core-docker/oedeploy/

Thanks,

Dan

Well the first set of images you were running unpack on are not Torizon images those are Easy Installer images to flash Easy Installer. You need Easy Installer images for Torizon. For example notice the name of the file: torizon-core-docker-evaluation-apalis-imx8-Tezi_5.3.0-devel-202106+build.14.container.tar

This contains an image for Torizon.

For your other two cases it’s hard to tell what images tezi-run.tar and teziimage.zip contain but perhaps these were also Easy Installer packages containing Easy Installer images.

Best Regards,
Jeremias

Hmm this is strange that error only appears if the download fails. However the link is valid. Perhaps there was a connection issue/hiccup at the moment you tried to download from the tool?