We’re trying to spin up a Yocto Kirkstone build with Mender for a customer. Currently using master-next of meta-mender In trying to follow along with the instructions, they seem to be incomplete or incorrect and I would love some direction here.
I’m not sure if the disconnect is due to changes between latest meta-mender stable (which I think is Dunfell) vs master-next and the instructions havn’t yet caught up. However, I don’t see any significant differences between key files that would cause these to just not work.
We’ve done an integration like this before with Buildroot, where a lot of the configuration and files were manually controlled. The documentation for Mender seems to hint that Yocto should automatically take care of a lot of things but does not appear to.
EDIT: Most of what is below is invalid, see my next post for the current sticking point. The documentation does not take in to account changes in master-next so I’m off in the weeds.
e.g. server.crt
As outlined in the instructions here: Building for production | Mender documentation
cat recipes-mender/mender-client/mender-client_%.bbappend
MENDER_SERVER_URL = "https://..."
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " file://server.crt"
The file server.crt ends up not existing anywhere in the output rootfs.
Based on a few things I’ve found while searching around the internet, it may be necessary to manually install files. And, in digging through the meta-mender layers, nothing seems to actually set ServerCertificate automatically in the final mender.conf Okay, maybe I need to manually install the server.crt
As seen in: Customize Mender | Mender documentation
" It is possible to put your own mender.conf configuration file in the image. The file will be merged with settings from Yocto variables."
So I’ve changed the .bbappend file accordingly to try and get ServerCertificate in the final image:
cat recipes-mender/mender-client/mender-client_%.bbappend
MENDER_SERVER_URL = "https://..."
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = "file://server.crt \
file://mender.conf"
cat recipes-mender/mender-client/files/mender.conf
{
"ServerCertificate": "/etc/mender/server.crt"
}
The installed mender.conf files on the target are unchanged.
Am I missing something in the .bbappend file? If the server.crt file gets installed to the filesystem, does that automatically update ServerCertificate? Is the manual incorrect? Is this an issue trying to work with master-next for Kirkstone support?