HOWTO: tweak pantavisor configuration through u-boot localargs

Pantavisor has quite a few configuration toggles, which usually have very readsonable defaults and might not need touching, but if you are a device maker you usually will have to do tweaks to those toggles in order to make pantavisor work in the way you want for your product vision.

This tutorial will show how you can change Pantavisor configuration flags on an installed system through the uboot env variable “localargs”.

How you can change that variable might depend a bit on your bootloader, but in most cases you can use a serial to get to your bootloader prompt and then use setenv to change the value of localargs in a one time or persistent manner.

For example to change the logserver output format in a persistence manner, you can set the log.server.outputs pantavisor configuration as follows:

u-boot=> setenv localargs $localargs pv_log.server.outputs=singlefile
u-boot=> saveenv
u-boot=> reset

This will make these arguments get appended to the kernel commandline (as you can find /proc/cmdline) and which pantavisor uses to allow overloading its buit in default configurations. The key/value syntax to do that is

pv_${configkey}=${configvalue}

For pantahub configuration flags you can use the same format, but with prefix ph_. Example:

u-boot=> setenv localargs $localargs ph_updater.interval=120
u-boot=> saveenv
u-boot=> reset

For those who tried the instructions you might have noticed that our Raspberry Pi baselines do not support saving configargs properly. Reason is that those get overloaded through OEM config that we inject by hub.pantacor.com download wizards to allow for on-the-fly customizations.

We took a look and decided to rather make this a feature for “localargs”:

Going forward, configargs is reserved for OEM configs, but user can save localargs to disable that OEM config behavior and inject their own bootargs.

We landed this new behavior in most uboot board configs and the build is spinning here: Pipeline · Pantacor / pv-manifest · GitLab

I also will update the original post to refer to localargs rather than configargs to match this new behavior.