Addind mender to CM4 but do_image_bootimg error

Hi,

I am struggling to implement mender in my yocto build. I am using CM4 with eMMC.

The error occurs when I am adding mender-image-sd in the features.

I have got this error:

ubuntu@ubuntu:~/Documents/Dev/yocto/kirkstone/builds/rpi$ bitbake core-image-minimal -k
NOTE: Reconnecting to bitbake server...
Loading cache: 100% |#######################################################################################################################################################################| Time: 0:00:09
Loaded 4027 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "raspberrypi4-64"
DISTRO               = "poky"
DISTRO_VERSION       = "4.0.5"
TUNE_FEATURES        = "aarch64 armv8a crc cortexa72"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "kirkstone:f98db02718944865811d3daf6404ab23bbb655b8"
meta-raspberrypi     = "kirkstone:dacad9302a92b0b7edf8546cdcad1f8ef753e462"
meta-oe              
meta-networking      
meta-python          
meta-filesystems     
meta-multimedia      = "kirkstone:50d4a8d2a983a68383ef1ffec2c8e21adf0c1a79"
meta-mender-core     
meta-mender-raspberrypi = "kirkstone:bd64bbc28517d1ab07bfa225f8cad16beda167aa"

Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:03
Sstate summary: Wanted 13 Local 11 Mirrors 0 Missed 2 Current 1273 (84% match, 99% complete)
NOTE: Executing Tasks
ERROR: core-image-minimal-1.0-r0 do_image_bootimg: ExecutionError('/home/ubuntu/Documents/Dev/yocto/kirkstone/builds/rpi/tmp/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/temp/run.do_image_bootimg.143083', 1, None, None)
ERROR: Logfile of failure stored in: /home/ubuntu/Documents/Dev/yocto/kirkstone/builds/rpi/tmp/work/raspberrypi4_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_bootimg.143083
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-core/glibc/cross-localedef-native_2.35.bb:do_populate_sysroot', '/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot', '/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/binutils/binutils-cross_2.38.bb:do_populate_sysroot', '/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb:do_populate_sysroot', '/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot', '/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.2.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/createrepo-c/createrepo-c_0.19.0.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/dnf/dnf_4.11.1.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/mtools/mtools_4.0.38.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/opkg/opkg_0.5.0.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/rpm/rpm_4.17.1.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-extended/pigz/pigz_2.7.bb:do_populate_sysroot', 'virtual:native:/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-support/bmap-tools/bmap-tools_git.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['cross-localedef-native', 'ldconfig-native', 'binutils-cross-aarch64', 'cdrtools-native', 'qemuwrapper-cross', 'depmodwrapper-cross', 'update-rc.d-native', 'btrfs-tools-native', 'createrepo-c-native', 'dnf-native', 'dosfstools-native', 'e2fsprogs-native', 'makedevs-native', 'mtools-native', 'opkg-utils-native', 'opkg-native', 'pseudo-native', 'rpm-native', 'squashfs-tools-native', 'syslinux-native', 'pbzip2-native', 'pigz-native', 'bmap-tools-native', 'gettext-minimal-native', 'libtool-native', 'libdnf-native', 'cmake-native', 'libcomps-native', 'librepo-native', 'systemd-systemctl-native', 'python3-iniparse-native', 'python3-native', 'shared-mime-info-native', 'kmod-native', 'shadow-native', 'debianutils-native', 'openssl-native', 'zlib-native', 'bzip2-native', 'flex-native', 'texinfo-dummy-native', 'gnu-config-native', 'zstd-native', 'lzo-native', 'lz4-native', 'attr-native', 'xz-native', 'libarchive-native', 'libsolv-native', 'util-linux-native', 'python3-installer-native', 'python3-setuptools-native', 'python3-wheel-native', 'coreutils-native', 'python3-six-native', 'qemu-native', 'lua-native', 'libgcrypt-native', 'elfutils-native', 'popt-native', 'sqlite3-native', 'file-native', 'curl-native', 'expat-native', 'glib-2.0-native', 'libxml2-native', 'perl-native', 'nasm-native', 'swig-native', 'json-c-native', 'libmodulemd-native', 'libcheck-native', 'gobject-introspection-native', 'ncurses-native', 'gpgme-native', 'libtirpc-native', 'gdbm-native', 'util-linux-libuuid-native', 'readline-native', 'libffi-native', 'libnsl2-native', 'itstool-native', 'm4-native', 'libcap-ng-native', 'libpcre2-native', 'python3-flit-core-native', 'unzip-native', 'libcap-native', 'libgpg-error-native', 'libmicrohttpd-native', 'gettext-native', 'libpcre-native', 'make-native', 'groff-native', 'libyaml-native', 'libassuan-native', 'gnutls-native', 'gmp-native', 'libunistring-native', 'libidn2-native', 'nettle-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function set_image_size
| DEBUG: 132033.200000 = 101564 * 1.300000
| DEBUG: 3670016.000000 = max(132033.200000, 3665920)[3665920.000000] + 4096
| DEBUG: 3670016.000000 = int(3670016.000000)
| DEBUG: 3670016 = aligned(3670016)
| DEBUG: returning 3670016
| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_bootimg
| 0+0 records in
| 0+0 records out
| 0 bytes copied, 9.8189e-05 s, 0.0 kB/s
| mkfs.fat: Warning: lowercase labels might not work properly on some systems
| mkfs.fat 4.2 (2021-01-31)
| Disk full
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/ubuntu/Documents/Dev/yocto/kirkstone/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_bootimg) failed with exit code '1'

Hi @plpento,

The usual reason is that the boot. partition is too small. By adding MENDER_BOOT_PART_SIZE_MB = "64"(or any reasonable size you choose) to a config file (local.conf technically works, but should actually go into your MACHINE.conf) you can extend it.

Greetz,
Josef