BalenaOS build for iot-gate-imx8plus fails

After building balenaOS successfully just a few weeks ago, I tried building it again with a clean build directory and I got this error:

ERROR: u-boot-compulab-2021.04-r0 do_patch: Applying patch '0003-integrate-with-balenaOS.patch' on target directory '/home/usernameYocto/balena-iot-gate-imx8plus/build/tmp/work/iot_gate_imx8plus-poky-linux/u-boot-compulab/2021.04-r0/git'
CmdError('quilt --quiltrc /home/username/Yocto/balena-iot-gate-imx8plus/build/tmp/work/iot_gate_imx8plus-poky-linux/u-boot-compulab/2021.04-r0/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch 0003-integrate-with-balenaOS.patch
patching file configs/iot-gate-imx8plus_defconfig
Hunk #1 succeeded at 152 (offset -2 lines).
patching file include/configs/compulab-imx8m-plus.h
Hunk #1 succeeded at 83 (offset 4 lines).
Hunk #2 succeeded at 99 (offset 4 lines).
Hunk #3 FAILED at 138.
Hunk #4 FAILED at 157.
2 out of 4 hunks FAILED -- rejects in file include/configs/compulab-imx8m-plus.h
Patch 0003-integrate-with-balenaOS.patch does not apply (enforce with -f)

I noticed the u-boot-compulab repository has been updated recently and that SRCREV was set to ${AUTOREV} in u-boot-compulab_2021.04.inc in the meta-bsp-imx8mp layer.

After changing AUTOREV to a commit from a few weeks ago, the error was gone.

Perhaps you could create a patch for that file to use a fixed commit from when the balenaOS.patch was created?

1 Like

Hey @niuslar! We ran into the same issue and recently pinned to a known working commit like you did.

If there are changes we need from the upstream we will pin to a new version and update our patches accordingly, but for now this re-enables our build pipeline.

1 Like