Recommended way to set kernel parameters on BalenaOS

My USB camera provider recommends increasing the usbfs_memory_mb parameter:

This can be done with:
echo 32 > /sys/module/usbcore/parameters/usbfs_memory_mb
on the host os command line.

What is the recommended way to do this automatically on each boot?

Hello.

One possible way of doing it is to install systemd (service manager) into a container and leverage its capabilities to run the required command.

See this thread for a very much relevant discussion, including the systemd example instructions.

Thanks for the answer. The container which is accessing the camera is running privileged, so I ended up just doing echo 32 > /sys/module/usbcore/parameters/usbfs_memory_mb in the start.sh. Seem to work ok.