i tried kirkstone branch, renamed it as honister, and changed the ‘kirkstone’ name in configs to honister. it looks like kirkstone is much much closer to honister, than dunfell. it required no syntactic changes so far in mender sources.
then i am again trying to adapt it:
in project-spec/meta-user/conf/bblayers.conf (before i was adding the lines to build/conf/bblayers.conf):
BBLAYERS += "/some/absolute/path/layers/meta-mender/meta-mender-core"
BBLAYERS += "/some/absolute/path/layers/meta-mender/meta-mender-demo"
in the same directory i have created mender.conf (previously was including these lines in build/conf/local.conf):
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "some test token of my account"
MENDER_FEATURES_ENABLE:append = " mender-uboot mender-client-install"
MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi mender-image-gpt mender-image-sd mender-partuuid"
MENDER_STORAGE_DEVICE = "/dev/mtd4"
MENDER_MTDPARTS = "40000000.flash:2m(boot),512k(bootenv),512k(bootscr),24m(kernel),-(rootfs)"
MENDER_MTDIDS = "nor0=40000000.flash"
MENDER_STORAGE_PEB_SIZE = "262144"
# Erase block size from mtdinfo -a
MENDER_STORAGE_TOTAL_SIZE_MB = "64"
MENDER_IMAGE_BOOTLOADER_FILE = "BOOT.BIN"
MENDER_ARTIFACT_NAME = "release-1"
ARTIFACTIMG_FSTYPE = "jffs2"
MENDER_UBOOT_STORAGE_INTERFACE = "spi"
MENDER_UBOOT_STORAGE_DEVICE = "0"
PREFERRED_PROVIDER_u-boot = "u-boot-xlnx"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-xlnx"
some comments. our board has 64mb of QSPI storage. it has only one rootfs as jffs2, all partitions are /dev/mtdX, and it would be very painful to change the partition layout again, but we have no specific partition for mender data like logs.
so first of all, i am not sure i correctly disabled features for having only one rootfs.
i also created meta-user/recipes-core/images directory and added ‘petalinux-custom-image.bb’ file there with the following content:
SUMMARY = "Our PetaLinux Image with Mender"
DESCRIPTION = "This is a custom image recipe for PetaLinux that includes Mender support."
LICENSE = "MIT"
IMAGE_INSTALL = "\
base-files \
packagegroup-core-boot \
${ROOTFS_PKGS} \
mender-client \
mtd-utils \
"
IMAGE_FSTYPES = "jffs2"
when the file contains errors, the project doesn’t build, so the file gets picked up.
in build/conf/local.conf i added:
include ${TOPDIR}/../project-spec/meta-user/conf/mender.conf
so even petalinux-build -x cleanall
now results in:
ERROR: Nothing RPROVIDES 'mender' (but /opt/data/norayr/MA-ZX2-20-2I-D9_ST3_QSPI/components/yocto/layers/meta-petalinux/recipes-core/images/petalinux-image-minimal.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'mender' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['mender']
NOTE: Runtime target 'kernel-modules' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['kernel-modules', 'petalinux-image-minimal', 'mender']
ERROR: Required build target 'petalinux-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['petalinux-image-minimal', 'mender']
so we’ve tried with:
IMAGE_INSTALL:append += " mender-client"
and
IMAGE_INSTALL:append += " mender"
it is not clear which recipe should be enabled for our setup.
when i was working on dunfell branch, eventually i reached the same state.
when i tried in layers directory: find . name "*.bb" | grep mender
, i can see that there are no file named exactly ‘mender-client.bb’, but there are several recipes related to the mender client that are defined within the meta-mender
repository.
the main recipe file for the mender client seems to be named mender_*.bb
(e.g., mender_4.0.4.bb
), not mender-client.bb
.
more general questions are: so there is a userspace mender binary. at some point i managed to crosscompile it for arm, and add to petalinux as binary in /usr/bin. it didn’t start because it required systemd. was there a way to build it by disabling systemd dependency?
and if so, did it make sense?
would having only mender binary in rootfs allow to download an update image and flush to mtd partition?
why exactly should it be integrated with u-boot? in order to download and flash update on boot?
thank you.