question

jerrybicker avatar image
jerrybicker asked

Create Venus OS SWU from modified image

I've added and updated quite a few things in the Venus OS image on a Cerbo GX. Is there an easy way to create an swu image of my modified Cerbo to easily distribute. I am aware that some changes outside of /data will be lost on any firmware updates, but would like an easy way to distribute this modified version. Any suggestions or help is greatly appreciated.

cerbo gxVenus OS
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
Louis van der Walt avatar image
Louis van der Walt answered ·

This is not a changed swu method, but you could package your changes into a venus-data.tar.gz archive for distribution.

When venusos see a new mount that contain this file it will be extracted to the GX device, so you just have to put it on a USB drive and plug it into your GX device.

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jerrybicker avatar image jerrybicker commented ·

So this utility just unpacks the tar file to /data? Would I need to create an rcS.local that gets copied in the /data directory and reboot it again to get it to run and do all the configurations needed? Or is there another way to get a script to automatically run after getting unpacked to the data directory?

0 Likes 0 ·
Louis van der Walt avatar image Louis van der Walt jerrybicker commented ·
correct. rc.local gets run on boot if it exist and you can use it to set up configuration.
0 Likes 0 ·
Kevin Windrem avatar image
Kevin Windrem answered ·

The venus-data.tgz "blind install" mechanism only copies an archive to /data and would not change the root partition which is what you do want to change. You would need to have an rc.local that does the ALTERNATE root partition update. Venus OS uses a dual root FS mechanism that protects against a failed firmware update. So you need to replace the other root partition then signal the system to swap partitions. It's possible but not simple.

I have a number of Venus OS modifications and have a mechanism that reinstalls the modifications when a firmware update occurs. It's probably safer to have scripts that reinstall the mods as I do.

My SetupHelper package provides the mechanisms for the reinstall and also provides a GUI-based install mechanism.

https://github.com/kwindrem/SetupHelper

It would be possible to create your own packages compatible with SetupHelper. But you can also use it to help you write your own install/reinstall mechanism.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mr-manuel avatar image
mr-manuel answered ·

If someone is searching which script is executed, here is it: https://github.com/victronenergy/meta-victronenergy/blob/master/meta-venus/recipes-core/initscripts/files/update-data.sh

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.