I am working with a Colibri IMX6ULL-512MB and Yocto-Project BSP 6.
I would like to add my custom image hosted on an Apache server (where both image_list.json and image.json are located) to the feed list of Toradex Easy Installer. I have been following the procedure described here, but it’s not working for me. I am using a Linux virtual machine (VM) hosted on Windows. In this VM, I installed dnsmasq, and my dnsmasq.conf looks like this:
interface=eth0
dhcp-range=172.10.10.50,172.10.10.150,12h
address=/tezi.toradex.com/[IP of my Apache server]
The IP of the Apache server is outside the DHCP range, and when I try to access the Apache server from either the VM or the Windows CMD (via HTTP), I can successfully reach the image_list.json. However, after running recovery-windows.bat, the feed for this URL does not appear in the Toradex Easy Installer feed list.
Additional questions:
Should I set autoinstall to true or false in the image.json?
Is using a VM on Windows a potential issue here? Would it be better to run everything directly on a Linux machine?
Is there a preferred method for testing the connection between the board and the custom image server to ensure the URL is being correctly resolved by the board?
Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!
Did you like my answer?
To add your custom image to the Toradex Easy Installer feed list, let’s address your setup and questions step-by-step:
DNS Configuration:
Your dnsmasq.conf looks correct. Ensure that dnsmasq is running and properly configured to serve DNS requests from the Colibri module.
Apache Server:
Verify that your Apache server is accessible from the Colibri module. You can do this by connecting to the module via serial console or SSH and using tools like curl or wget to fetch the image_list.json from your Apache server.
Toradex Easy Installer:
Ensure that the image_list.json on your Apache server is correctly formatted and accessible. The URL should be reachable from the Colibri module.
Recovery Mode:
When you run recovery-windows.bat, ensure that the module is in recovery mode and that the script completes successfully. This script should reset the module and start the Toradex Easy Installer.
Addressing Your Additional Questions:
autoinstall Property:
The autoinstall property in image.json should be set to true if you want the image to be automatically installed without user intervention. If you want to manually select the image from the feed list, set it to false.
Using a VM on Windows:
Running dnsmasq and Apache on a VM should generally work, but there could be network configuration issues. Ensure that the VM’s network settings allow proper communication between the VM, the host, and the Colibri module. Bridged networking mode is often more reliable than NAT for this purpose.
Testing the Connection:
To test the connection between the board and the custom image server, you can use the serial console or SSH to access the Colibri module and run:
curl http://tezi.toradex.com/image_list.json
This will help you verify if the DNS resolution and HTTP access are working correctly.
Troubleshooting Steps:
Check Network Configuration:
Ensure that the Colibri module is getting an IP address from dnsmasq and that it can resolve tezi.toradex.com to the IP of your Apache server.
I’ve also developed a custom Yocto image and deploy it via HTTP through the Toradex Easy Installer. My approach was to use a zeroconf service which autopublishes its image_list.json. Here is my python script which hosts also the webserver and serves the image_list.json which must be located in the working directory. Maybe that’s helpful for you:
If you want to continue using the Apache webserver, you must enter the IP address of the Apache webserver as server in the ServiceInfo. You can then delete the lines of code that start the httpd service within the thread thread.
Edit: For the sake of completeness, here is the link to the documentation of the zeroconf functionality of the Toradex Easy Installer: Detailed Manual | Toradex Developer Center
Just out of curiosity, the images serve command uses ZeroConf to start the local server. It is basically the same as what you sent, but you don’t need to configure it, just install TorizonCore Builder.
Thank you both for your help. Unfortunately, I think my main issue is understanding where the changes should be made. Should I be making changes in TEZI?
So far, all my work has been within my Yocto environment. I have set up Apache and created a server that contains the image_list.json, but I’ve tried both alternatives and neither seems to be working. I set up TorizonCore in the environment, but the image server doesn’t seem to be doing anything.
Is there a detailed guide available somewhere?
Additionally, when I tried to use Andi’s script, it wasn’t connecting to Apache, even though the server works fine when I access it through a browser or use the curl command.
Thanks again for your help. I am now trying to follow something similar to this detailed manual.
The TorizonCore Builder should not be installed within your Yocto environment. It is a tool used to customize TorizonOS images, but it has the command images serve which adds a list of images to all the TEZI connected to the same network as your host machine.
In this case, the VM must be on the same network as the Colibri. Once they are in the same network, and you’ve installed TorizonCore Builder, you need to use the following commands in the same directory which you installed the tool to be able to see the images in TEZI list.
I was wondering how to execute this in an automated way. I created a setup_and_serve.sh script that looks like this:
#!/bin/bash
# Set up the environment
source /home/yocto-project/tcbdir/tcb-env-setup.sh
# Change to the tcbdir directory
cd /home/yocto-project/tcbdir && torizoncore-builder images serve /home/yocto-project/tcbdir/images/colibri-imx6ull
# Check if the command executed successfully
if [ $? -eq 0 ]; then
echo "The image is being served correctly."
else
echo "Error serving the image."
exit 2
fi
The issue is that while the torizoncore-builder commands work fine when I run them manually in the console, they fail when executed through this .sh script. I’ve also tried using Docker, but my requests get denied, even though I’ve already logged in successfully.
I get this:
/home/yocto-project/tcbdir/setup_and_serve.sh
You may have an outdated version installed. Would you like to check for updates online? [y/n] y
Setting up TorizonCore Builder with version 3.
Pulling TorizonCore Builder...
3: Pulling from torizon/torizoncore-builder
Digest: sha256:789105f3394c5d422a26395e356b2f30a33f6de68305bc5831d8394b85b0cbec
Status: Image is up to date for torizon/torizoncore-builder:3
docker.io/torizon/torizoncore-builder:3
Done!
Setup complete! TorizonCore Builder is now ready to use.
TorizonCore Builder internal status and image customizations will be stored in Docker volume named 'storage'.
********************
Important: When you run TorizonCore Builder, the tool can only access the files inside the current working directory. Files and directories outside of the current working directory, or links to files and directories outside of the current working directory, won't be visible to TorizonCore Builder. So please make sure that, when running TorizonCore Builder, all files and directories passed as parameters are within the current working directory.
Your current working directory is: /home/yocto-project/tcbdir
********************
For more information, run 'torizoncore-builder -h' or go to https://developer.toradex.com/knowledge-base/torizoncore-builder-tool
/home/yocto-project/tcbdir/setup_and_serve.sh: line 8: torizoncore-builder: command not found
Error serving the image.
Is there another way to automate this besides creating a .sh file? I also tried using Python scripts to throw the commands, but I get the same response. Any advice would be appreciated!