Automate BalenaOS build using balena-build.sh

Hello Support,

We are exploring building BalenaOS with some customization via local.conf. It seems ‘balena-yocto-scripts/build/balena-build.sh’ has the ability to automate some of the setup. However I am unable to inject additional-variable for barys which are not strictly key=value format. Please see below variable that we like to inject into local.conf. is there any way we can inject below variables via command-line?

BALENA_CONFIGS_append = " myvar"
BALENA_CONFIGS[myvar] = " \
    CONFIG_ATH10K=m \
    CONFIG_ATH10K_PCI=m \
    "
CORE_IMAGE_EXTRA_INSTALL += "linux-firmware-ath10k"

Regards,
-Niranjan

just wanted to check if there are any updates on this? balena-build.sh will greatly help us simplify build process if it allows injecting variable which are not strict key=value format.

Also seems balena-build.sh just quits after printing below line. I tried restarting my vm but it fails the same way.

### ~/repos/balena-iot-gate-imx8/balena-yocto-scripts$ ./build/balena-build.sh -d iot-gate-imx8
[balena_lib_environment]: Defaulting to balena-cloud.com

Hi, there are different ways to apply the customizations you mention, and using balena-build.sh is not the right choice.

  1. Ideally, the ath10k firmware should be included in balenaOS by default. We would like to include as many networking modules and firmware by default, but the partition sizes are limiting this effort. We are working on mechanism that would allow to do this. Anyway, it’s always a good idea to request for the networking drivers to be included if they are used as we do include them when customers request them.

  2. Until the firmware is included in balenaOS, the beast approach would be to include the firmware in an application and install it into the rootfs at launch, then load the module. There are instructions to doing this in How to mount /lib/firmware RW - #4 by chrischabot.

  3. Another approach if you are doing a custom build would be to use barys to initialize the project, then copy a custom local.conf file to it, and then launch the build. Of course, custom builds cannot be used with balenaCloud, but it may be an option if you are using openBalena or balenaMachine.

Hello Alexgg,

Thank you for the info. Latest iot-gate-imx8 Balena release should resolve our issue of missing ath10k driver. So we may not need to build our own yocto with customization.

Regards,
-Niranjan