Both sides previous revisionPrevious revisionNext revision | Previous revision |
ccgx:root_access [2024-01-09 14:09] – consmetic jhofstee | ccgx:root_access [2024-02-09 17:06] (current) – [4.1 Hooks to install/run own code at boot] dfaber |
---|
If the files ''/data/rcS.local'' or ''/data/rc.local'' exists, they will be called early (rcS) and late (rc) during startup. These scripts will survive upgrades and can be used by customers to start their own custom software. Implementation details in [[https://github.com/victronenergy/meta-victronenergy/commit/2dbd16c560ff7cdf70b1d676c0616013169c7484|this commit]]. | If the files ''/data/rcS.local'' or ''/data/rc.local'' exists, they will be called early (rcS) and late (rc) during startup. These scripts will survive upgrades and can be used by customers to start their own custom software. Implementation details in [[https://github.com/victronenergy/meta-victronenergy/commit/2dbd16c560ff7cdf70b1d676c0616013169c7484|this commit]]. |
| |
Also if ''venus-data.{tar.gz,tgz,zip}'' is found on removable storage (usb stick, sd-card) when booting, it will be unpacked into /data. Implementation details in [[https://github.com/victronenergy/meta-victronenergy/commit/469760fef4ed2ee977f482c997ac24c2678222c5|this commit]]. Added per Venus v2.30~28. Use this to for example make a USB stick that installs the modifications. | Also if ''venus-data.*.{tar.gz,tgz,zip}'' is found on removable storage (usb stick, sd-card) when booting, it will be unpacked into /data. Implementation details in [[https://github.com/victronenergy/meta-victronenergy/commit/469760fef4ed2ee977f482c997ac24c2678222c5|this commit]]. Added per Venus v2.30~28. Use this to for example make a USB stick that installs the modifications. You can combine multiple files on the device; they will be run in alphabetical order. |
| |
That venus-data file has one extra feature: if the archive contains ''rc/*'' files, it will extract those first. And if there is a file called ''rc/pre-hook.sh'' it will run this before unpacking the rest of the archive. Similarly, if there is a file called ''rc/post-hook.sh'', then that file will run this after the unpacking of the archive. For details, read the code in the ''/etc/rc5.d/S30update-data.sh'' file. | That venus-data file has one extra feature: if the archive contains ''rc/*'' files, it will extract those first. And if there is a file called ''rc/pre-hook.sh'' it will run this before unpacking the rest of the archive. Similarly, if there is a file called ''rc/post-hook.sh'', then that file will run this after the unpacking of the archive. For details, read the code in the ''/etc/rc5.d/S30update-data.sh'' file. |
| |
| You can draw further inspiration from [[https://github.com/victronenergy/meta-victronenergy/tree/master/meta-venus/scripts|here]], where the code resides to generate files for making backups of the ''/data'' partition, resetting Node-RED and SignalK and more scripts. |
| |
You can test the 'update' with | You can test the 'update' with |
Getting to console on the Ekrano GX is not that easy. The pins are located between the network and USB connector on the back of the device. | Getting to console on the Ekrano GX is not that easy. The pins are located between the network and USB connector on the back of the device. |
| |
- 1: Black: ground | - Black: ground |
- 2: NC | - NC |
- 3: NC | - NC |
- 4: Green: RX of the Ekrano GX - connect to TX on your cable | - Green: RX of the Ekrano GX - connect to TX on your cable |
- 5: White: TX of the Ekrano GX - connect to RX on your cable | - White: TX of the Ekrano GX - connect to RX on your cable |
- 6: NC | - NC |
| |
{{ :ccgx:ekrano-console.jpg?300 |}} | {{ :ccgx:ekrano-console.jpg?300 |}} |