I’m trying to build Mender under Yocto gatesgarth for a Variscite board. I realize that gatesgarth is not supported, but Variscite is not supporting dunfell. So, I’m attempting to build the dunfell meta-mender under gatesgarth.
I have everything configured (I believe properly) and am able to successfully build if I remove a certain line of code from the meta-mender script. I’m looking for clarification on what things are doing to better understand if what I’m seeing is an isolated issue, or something that will be appearing as an issue in future releases of Yocto.
I should also point out that I’m building au-boot bases build without grub.
I will try and explain what I’m observing and hopefully someone has seen this previously and can provide guidance on how to navigate around this issue.
When attempting to build mender with uboot I’m encountering a build issue that I have tracked down to the following. I get the following error when building:
ed/version_autogenerated.h.tmp include/generated/version_autogenerated.h; fi
| .. is not clean, please run 'make mrproper'
| in the '..' directory.
| make[1]: *** [/home/user/bsp-platform/build/tmp/work/imx8mp-fslc-linux/u-boot-variscite/1.0-r4/git/Makefile:1764: prepare3] Error 1
This issue looks to be caused by the following line in Mender recipe function
do_configure_prepend_mender-uboot():
# Calling this here is slightly evil, but we need its results, and we cannot
# wait until after the do_configure stage is done. The reason is a bug in
# poky. At the time of writing, the cml1_do_configure() is called from the
# uboot build, and contains the following: `yes '' | oe_runmake
# oldconfig`. The problem with this statement is that if the configuration
# fails to converge, which can happen if a configuration option doesn't have
# a default (CONFIG_ENV_OFFSET), then this will loop forever, filling up the
# log, and all the memory of the build host. Therefore this check, which
# detects such options being missing, needs to run before do_configure.
if [ ! -e ${B}/.config ]; then
bbwarn "U-Boot configuration ****(I added this line for debugging **********************"
oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
fi
If I comment out the “oe_runmake” line Yocto will build, a bootable image is created and Mender appears to work as expected. I tested an image update and it worked as expected.
So, my question is given the ominous comment provided in the Mender script I’m wondering if this section needs renewed scrutiny? I looked at poky and did see that changes were made to do_configure() in u-boot.inc
My questions are:
- Has anyone seen this error before?
- Is it OK to remove the oe_runmake line?
- What would be the best way to patch around this issue??
I don’t know if this is an issue that should be corrected in the mender git repo, or if this is an isolated issue that I should just patch locally.
Any insight or help would be greatly appreciated.Preformatted text