Hi! I need help.
I’ve been working on upgrading my Yocto image for RPi4 from dunfell to kirkstone, and I’ve encountered some problems regarding mender-client.
When I try to build the image, I get this error:
mender-client-3.5.0-r0 do_package: Didn't find service unit 'mender-client.service', specified in SYSTEMD_SERVICE:mender-client.
I’ve tried using versions of mender-client from 3.3.0 to 3.5.0, and I’ve tried kikrstone and master branches of meta-mender, but the same thing happens each time.
I’ve investigated kirkstone branch of meta-mender a bit, and I’ve noticed that in mender-client recipe, the mender-client.service is, indeed, missing. There are some other recipes like mender-client-data-dir.service, or mender-client-systemd-machine-id.service, but no mender-client.service.
In mender-client.inc file I can see that mender-client.service is used multiple times, but it can’t be installed because it seems to be missing from files directory in the recipe.
Can you help me with this? What am I missing?
Best regards,
Jana Peric
Hi @janaperic,
The kirkstone
build is regularly tested, so I’m a bit surprised. Is it a fresh build set up, or did you bump the layer versions up? If so, which layers are involved at which hashes so I can cross-check that.
Any other specialities that might be relevant?
Greetz,
Josef
Hi!
it’s a fresh build for kirkstone. I’ve just started working on it, and after dealing with syntax errors, mender-client is the first issue I’ve come across. The reason why we are upgrading to kirkstone is because of TPM, we need tpm2-openssl and some other TPM packages which are better integrated on kirkstone compared to dunfell.
These are the layers we use with hashes (all repos are on kirkstone branch):
meta-mender: dd226ab714fe309503d7690c0ea60a9842028bdd
meta-openembedded: 9cf4ebeb3de524009a73f49722489dc4aa183adb
meta-raspberry-pi: dacad9302a92b0b7edf8546cdcad1f8ef753e462
meta-security: cc20e2af2ae1c74e306f6c039c4963457c4cbd0f
poky: 407c3e0237d947ec003bdd1af89a226121c7939c
Besides these layers, we also have 2 of our own layers, but they don’t add any functionalities to mender (besides one state script which worked fine on dunfell).
I think it’s important to note that we haven’t made any changes in configuration of our layers when we switched to kirkstone, besides the mandatory syntax changes and LAYERSERIES_COMPAT flag.
Another error that I got previously was this:
build/tmp/work/cortexa72-poky-linux/mender-client/3.5.0-r0/image/var/lib/mender/' is not a directory: No such file or directory
But I’ve managed to solve that one by adding this code to mender-client_%.bbappend:
do_install() {
install -d ${D}/var/lib/mender
install -d ${D}${systemd_unitdir}/system/
install -d ${D}${sysconfdir}/mender
}
FILES_${PN} += "\
/var/lib/mender \
${systemd_unitdir}/system/ \
${sysconfdir}/mender \
"
Thanks for looking into this!
Best regards,
Jana
Hi @janaperic,
gave it a spin with the layers and revisions that you defined, build manifest is
Build Configuration:
BB_VERSION = "2.0.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-22.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "raspberrypi4"
DISTRO = "poky"
DISTRO_VERSION = "4.0.8"
TUNE_FEATURES = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU = "hard"
meta
meta-poky
meta-yocto-bsp = "kirkstone:407c3e0237d947ec003bdd1af89a226121c7939c"
meta-oe = "HEAD:9cf4ebeb3de524009a73f49722489dc4aa183adb"
meta-mender-core = "kirkstone:dd226ab714fe309503d7690c0ea60a9842028bdd"
meta-raspberrypi = "kirkstone:dacad9302a92b0b7edf8546cdcad1f8ef753e462"
meta-mender-raspberrypi = "kirkstone:dd226ab714fe309503d7690c0ea60a9842028bdd"
meta-python
meta-perl
meta-networking = "HEAD:9cf4ebeb3de524009a73f49722489dc4aa183adb"
meta-security = "kirkstone:cc20e2af2ae1c74e306f6c039c4963457c4cbd0f"
and it build with only a patch warning on u-boot
. So at least at the moment I have to guess that either something in your TMPDIR
or additional metadata causes the problem. Can you try to remove tmp
and build again? If this does not solve the problem, I’d suggest to start from the generic build without your custom layers/distro, and then proceed from there.
Greetz,
Josef
Thank you! It worked. Sorry for the trouble.
Best regards,
Jana
1 Like