Skip to content

Updating the firmware on the CerboGX

Bea Lam edited this page Dec 14, 2022 · 18 revisions

Updating via the device

Update the firmware version

cerbogx # /opt/victronenergy/swupdate-scripts/check-updates.sh -offline             # check for updates
cerbogx # /opt/victronenergy/swupdate-scripts/check-updates.sh -offline -update     # install the update

Or, via the GUI: Settings > Firmware > Online updates > Check for updates: 'Press to check'. If update is available, another settings list item appears below with 'Press to install '.

After the new update is installed, the device will reboot.

Install the Qt6 libraries

The new version probably won't have the Qt6 libaries, which we need for running gui-v2.

cerbogx # /opt/victronenergy/swupdate-scripts/set-feed.sh candidate
cerbogx # opkg update
cerbogx # opkg install qtbase qtbase-plugins qtbase-qmlplugins qtdeclarative qtdeclarative-dev  qtdeclarative-plugins qtdeclarative-qmlplugins qtsvg qtsvg-plugins qtsvg-qmlplugins libqt6core5compat6 libqt6core5compat-plugins libqt6core5compat-qmlplugins libqt6mqtt6 libqt6mqtt-plugins libqt6mqtt-qmlplugins libqt6serialport6 libqt6serialport-plugins libqt6serialport-qmlplugins libqt6shadertools6 libqt6shadertools-plugins libqt6shadertools-qmlplugins libqt6virtualkeyboard6 libqt6virtualkeyboard-plugins libqt6virtualkeyboard-qmlplugins
cerbogx # opkg install mosquitto-clients            # install the mosquitto_sub and mosquitto_pub tools

Installing a fresh image

desktop $ scp venus-swu-einstein-20211207113338-v2.80_31.swu root@cerbogx:/data/swu/
cerbogx # ln -s /data/swu /media/dataswu
cerbogx # /opt/victronenergy/swupdate-scripts/check-updates.sh -offline
cerbogx # /opt/victronenergy/swupdate-scripts/check-updates.sh -offline -update
... after reboot:
cerbogx # /opt/victronenergy/swupdate-scripts/set-feed.sh testing
cerbogx # opkg update
cerbogx # opkg list | grep qt6
cerbogx # opkg install libqt6core5compat-qmlplugins libqt6mqtt6 qtsvg-qmlplugins libqt6virtualkeyboard-qmlplugins

--

note: swu_base = swu_name-machine
where swu_name = einstein, and machine = venus-swu
so swu_base = einstein-venus-swu
the check script does:
ls -r $dev/${swu_base}-*.swu $dev/${swu_base}.swu 2>/dev/null | head -n1
So, in short, make sure the .swu filename is like: venus-swu-einstein-20211207113338-v2.80_31.swu

root@einstein:~# /opt/victronenergy/swupdate-scripts/check-updates.sh -offline
*** Checking for updates ***
arguments: -offline
Searching for update on SD/USB...
Update found on /media/dataswu
Retrieving latest version... (from /media/dataswu/venus-swu-einstein-20211207113338-v2.80_31.swu)
installed: 20210705122736 v2.72
available: 20211207113338 v2.80~31

root@einstein:/opt/victronenergy/swupdate-scripts# /opt/victronenergy/swupdate-scripts/check-updates.sh -offline -update
*** Checking for updates ***
arguments: -offline -update
Searching for update on SD/USB...
Update found on /media/dataswu
Retrieving latest version... (from /media/dataswu/venus-swu-einstein-20211207113338-v2.80_31.swu)
installed: 20210705122736 v2.72
available: 20211207113338 v2.80~31
Starting swupdate to install version 20211207113338 v2.80~31 ...
software set: stable mode: copy2
Swupdate v2016.10.0

Licensed under GPLv2. See source distribution for detailed copyright notices.

Registered handlers:
	raw
	rawfile
	uboot
[NOTIFY] : SWUPDATE running :  [extract_sw_description] : Found file:
	filename sw-description
	size 927
	checksum 0xe8aa VERIFIED

Version 0.1.0
[NOTIFY] : SWUPDATE running :  [parse_images] : Found compressed Image  : venus-image-einstein.ext4.gz in device : /dev/mmcblk1p3 for handler raw (installed from stream) 

[NOTIFY] : SWUPDATE running :  [parse_uboot] : U-Boot var: video-mode = none:1024x768-24@60,monitor=none

[NOTIFY] : SWUPDATE running :  [parse_uboot] : U-Boot var: version = 2

[NOTIFY] : SWUPDATE running :  [cpio_scan] : Found file:
	filename venus-image-einstein.ext4.gz
	size 125981425
	REQUIRED

Main loop Daemon
[NOTIFY] : SWUPDATE running :  [cpio_scan] : Found file:
	filename u-boot-sunxi-with-spl.bin
	size 313462
	not required

[NOTIFY] : SWUPDATE running :  [install_single_image] : Found installer for stream venus-image-einstein.ext4.gz raw
[NOTIFY] : SWUPDATE running :  [update_uboot_env] : Updating U-boot environment
Software updated successfully
Please reboot the device to start the new software
[NOTIFY] : SWUPDATE successful ! 
do_swupdate completed OK. Rebooting

Broadcast message from root@einstein (pts/1) (Fri Dec 10 04:46:46 2021):

The system is going down for reboot NOW!

Resetting the root password

After flash / software update, the root password will be lost (but root ssh keys will remain).

To set a password: https://www.victronenergy.com/live/ccgx:root_access

1) Go to settings/general
2) Set access level to "User and installer" password ZZZ
3) Highlight Access Level )but don't open the selected page, i.e. make sure you are on General page, not Access Level page)
4) Drag the menu down and hold for 5 seconds
5) Options to become superuser and/or set password is shown.
Clone this wiki locally