Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
Adding prepare.sh and wrapup.sh Scripts to TorizonCore Builder
Based on the available TorizonCore Builder documentation, there isn’t a direct configuration option in tcbuild.yaml to include custom prepare.sh and wrapup.sh scripts in the build artifact(1)(2).
However, you can achieve this using the filesystem customization feature, which allows you to add files and directories to your custom Torizon OS image.
Solution: Using Filesystem Customization
You can include your scripts by placing them in a directory structure and referencing it in your tcbuild.yaml configuration file(2)(3):
# Sample configuration file
input:
easy-installer:
local: images/your-torizon-image.tar
customization:
filesystem:
- custom-scripts/
output:
easy-installer:
local: your-custom-image
(1)(2)
Directory Structure
Create a directory structure that mirrors where you want the scripts to be placed on the target system(3):
.
├── custom-scripts/
│ └── var/
│ └── sota/
│ ├── prepare.sh
│ └── wrapup.sh
└── tcbuild.yaml
The filesystem property accepts a list of directories to be merged with the input image, and the corresponding directory trees will be applied on top of the ones present in the input image(1).
Alternative: Capture Changes from Live Device
If you’ve already manually adjusted the scripts on a running device, you can capture these changes using the isolate command and then apply them to your build(3):
- Make your changes on a live Torizon device
- Use
torizoncore-builder isolate to capture the changes
- Reference the captured changes directory in your
tcbuild.yaml
This approach is particularly useful for preserving file permissions and ownership that might be important for your provisioning scripts(3).
The filesystem customization feature is the standard way to include custom files and scripts in your Torizon OS image build process.
Best regards, Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.