Torizon Core Builder deploy permanent data to EasyInstaller Image

Hello everyone,

If some customizations need to be added in a TorizonCoreBuilder project,

Example: To add an M4 binary, the U-Boot variables should be edited to automatically load this binary, run this firmware before Linux starts.

And example:

Add a fan.sh shell script and do a chmod +x that controls a fan.service

I captured the service configuration using the torizoncore-builder isolate command. This works well.

But what is the recommended way to mount a file and run a command after the first boot?

Greetings
Gerald

Greetings @gerko,

But what is the recommended way to mount a file and run a command after the first boot?

If you just want to execute some actions on boot, sounds like you could just create a simple systemd service like what is shown here: Basic Linux Commands | Toradex Developer Center

Then you can capture this service using the isolate command as before.

Best Regards,
Jeremias

Thank you @jeremias.tx ,

OK, that works fine.

Now I need help to deploy my custom M4 Firmware to e.g. /var/fw_m4_1.bin so that I can include it to a custom BSP, that I can use to update other modules / devices.

The U-Boot variables could also be adjusted using a ‘first boot script’ (Is this intended or are there better options?)

Best
Gerald

Now I need help to deploy my custom M4 Firmware to e.g. /var/fw_m4_1.bin so that I can include it to a custom BSP, that I can use to update other modules / devices.

You could add your binary file and use isolate to capture it. That said /var is not a suitable location since it’s not managed by OSTree and therefore will not be “seen” by the TorizonCore Builder tool. Could you put it in another location like /etc?

The U-Boot variables could also be adjusted using a ‘first boot script’ (Is this intended or are there better options?)

This is certainly an option. Unfortunatley, TorizonCore Builder has no capability to affect anything U-Boot related. You could do a Yocto Build to customize U-Boot and the variables though I assume you’re trying to avoid such a thing. We also have the capability to deploy a bootloader update: Bootloader Updates in Torizon OS | Toradex Developer Center

Though this is only relevant if you’re using our Torizon Cloud platform. Also it still requires you to build a custom U-Boot to upload as a package in the first place.

Best Regards,
Jeremias