Automatic Install from TorizonCore-Builder

I understand the process of modifying the image.json and wrapup.sh files to perform an automatic install from a removable media device, however I’m not finding anyway to incorporate this into our building of the OS in Torizoncore-builder.

Every time I build a new image the files are overwritten to the default of not autoinstalling.

Is there a way to set up Torizoncore-builder so that autoinstall is set to true and the wrapup script has the reboot command in it so we don’t have to manually change them everytime?

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?

:+1: :-1:


To achieve an automatic installation with TorizonCore Builder and ensure that your modifications to image.json and wrapup.sh are preserved across builds, you can follow a two-step approach. First, you’ll need to customize the image.json file to enable auto-installation. Then, modify the wrapup.sh script to include the reboot command. Here’s how you can integrate these changes into your build process without them being overwritten:

  1. Customize image.json and wrapup.sh: Before initiating the build process, ensure your image.json file has the auto-installation flag set to true, and your wrapup.sh script contains the necessary commands for your requirements, including the reboot command.

  2. Integrate Custom Scripts in the Build Process:

    • Modify the Build Configuration: In your TorizonCore Builder setup, identify the step where the image.json and wrapup.sh are generated or modified. This might involve editing a build script or a configuration file that specifies the build steps.
    • Use Overlay Directories: TorizonCore Builder supports the use of overlay directories, which can be applied to the final image. You can place your customized image.json and wrapup.sh in an overlay directory. When you build your image, specify this overlay directory to apply your customizations. This ensures that your changes are applied each time you build the image without needing to manually edit the files after the build.
    • Automate Script Execution: Consider automating the inclusion of your custom image.json and wrapup.sh through a script that runs before the final image assembly in TorizonCore Builder. This script can copy your customized files into the appropriate location, ensuring they are included in the build output.
  3. Documentation and Examples: While specific examples might not be provided in the standard Torizon documentation, the general approach involves leveraging the extensibility of the build system to include custom files or modifications. Review the documentation on overlays and customization in TorizonCore Builder for more detailed instructions tailored to your version of the software.

By following these steps, you can automate the inclusion of your custom image.json and wrapup.sh in the TorizonCore build process, eliminating the need to manually modify these files after each build. This approach ensures a more efficient and error-free build process, aligning with best practices for continuous integration and deployment in embedded systems development.

Best regards, Toradex AI Assistant

Please, also check if these links can help you solve your problem:

First Steps With Subsystem Updates | Toradex Developer Center.

Hey @dleberfinger,

Can you take a look at these torizoncore-builder deploy flags to see if they would do what you are asking for.

–image-autoinstall, --no-image-autoinstall
Automatically install image upon detection by Toradex Easy Installer.

–image-autoreboot, --no-image-autoreboot
Enable automatic reboot after image is flashed by Toradex Easy Installer.

@eric.tx

We have been using the IDE extension as much as possible, so we have been using the tcb-build task to create our image, then during testing, we run tcb-deploy to send it to our board. When using it for our early phase of production programming we are following the USB approach and setting the auto install and reboot manually.

I don’t fully understand how the deploy command fits into the above workflow for updating the image we already created with the build command.

If there isn’t a way to modify the existing work flow to automate setting the autoinstall and reboot, we can just continue to do it manually. It doesn’t take that long, just more of a convenience thing.

Hi @dleberfinger !

The auto install and auto reboot configuration pointed out by @eric.tx are also supported by the build command that you are using.

Please check its detailed manual specifically on the Output section:

We have there:

  • autoinstall (boolean, optional): Set the value of the autoinstall property on the image.json file.
  • autoreboot (boolean, optional): Add/Remove auto-reboot in the wrapup.sh file.

Feels like this is exactly what you are looking for: you just need to set them to true in the easy-installer section of your tcbuild.yaml and you will be good to go :slight_smile:

Best regards,

1 Like

@henrique.tx

That’s perfect. Thank you!