Mkfs.fat "No directory slots" during Yocto image build

I’m working on getting Mender running on Yocto (Kirkstone) on an IMX8.

During the “do_image_bootimg” step, I’m seeing this failure:

ERROR: xxx-image-xxx-4.0.0-r0 do_image_bootimg: ExecutionError(‘/build/tmp/work/xxx-linux/xxx-image-xxx/4.0.0-r0/temp/run.do_image_bootimg.83961’, 1, None, None)
ERROR: Logfile of failure stored in: /build/tmp/work/xxx/xxx-image-xxx/4.0.0-r0/temp/log.do_image_bootimg.83961
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [‘/work/sources/meta-imx.git/meta-bsp/recipes-bsp/imx-mkimage/imx-boot_1.0.bb:do_populate_sysroot’, ‘/work/sources/meta-imx.git/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2022.04.bb:do_populate_sysroot’, ‘/work/sources/yocto.git/meta/recipes-core/glibc/cross-localedef-native_2.35.bb:do_populate_sysroot’, ‘/work/sources/yocto.git/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot’, ‘/work/sources/yocto.git/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot’, ‘/work/sources/yocto.git/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-devtools/apt/apt_2.4.5.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-devtools/dpkg/dpkg_1.21.4.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-devtools/mtools/mtools_4.0.38.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-extended/pigz/pigz_2.7.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-extended/zstd/zstd_1.5.2.bb:do_populate_sysroot’, ‘virtual:native:/work/sources/yocto.git/meta/recipes-support/bmap-tools/bmap-tools_git.bb:do_populate_sysroot’]
| NOTE: Installed into sysroot:
| NOTE: Skipping as already exists in sysroot: [‘imx-boot’, ‘u-boot-imx’, ‘cross-localedef-native’, ‘ldconfig-native’, ‘qemuwrapper-cross’, ‘depmodwrapper-cross’, ‘update-rc.d-native’, ‘apt-native’, ‘dosfstools-native’, ‘dpkg-native’, ‘e2fsprogs-native’, ‘makedevs-native’, ‘mtools-native’, ‘opkg-utils-native’, ‘pseudo-native’, ‘pbzip2-native’, ‘pigz-native’, ‘zstd-native’, ‘bmap-tools-native’, ‘desktop-file-utils-native’, ‘shadow-native’, ‘systemd-systemctl-native’, ‘shared-mime-info-native’, ‘gettext-minimal-native’, ‘zlib-native’, ‘libtool-native’, ‘perl-native’, ‘bzip2-native’, ‘xz-native’, ‘gettext-native’, ‘glibc’, ‘imx-atf’, ‘scfw-binaries’, ‘firmware-imx-8’, ‘gcc-runtime’, ‘imx-seco’, ‘qemu-native’, ‘texinfo-dummy-native’, ‘openssl-native’, ‘debianutils-native’, ‘kmod-native’, ‘libgcrypt-native’, ‘cmake-native’, ‘xxhash-native’, ‘gnutls-native’, ‘db-native’, ‘lz4-native’, ‘util-linux-native’, ‘attr-native’, ‘python3-six-native’, ‘python3-native’, ‘python3-setuptools-native’, ‘coreutils-native’, ‘python3-installer-native’, ‘python3-wheel-native’, ‘glib-2.0-native’, ‘itstool-native’, ‘libxml2-native’, ‘gdbm-native’, ‘make-native’, ‘linux-libc-headers’, ‘libgcc’, ‘libsdl2-native’, ‘libcap-native’, ‘libgpg-error-native’, ‘curl-native’, ‘ncurses-native’, ‘libunistring-native’, ‘libidn2-native’, ‘gmp-native’, ‘p11-kit-native’, ‘nettle-native’, ‘libcap-ng-native’, ‘util-linux-libuuid-native’, ‘libpcre2-native’, ‘libtirpc-native’, ‘libnsl2-native’, ‘libffi-native’, ‘sqlite3-native’, ‘readline-native’, ‘unzip-native’, ‘python3-flit-core-native’, ‘libpcre-native’, ‘libxrender-native’, ‘libxrandr-native’, ‘libx11-native’, ‘libxext-native’, ‘mesa-native’, ‘libtasn1-native’, ‘util-macros-native’, ‘xorgproto-native’, ‘libxcb-native’, ‘xtrans-native’, ‘libdrm-native’, ‘wayland-protocols-native’, ‘libxxf86vm-native’, ‘python3-mako-native’, ‘libxfixes-native’, ‘expat-native’, ‘xrandr-native’, ‘wayland-native’, ‘libxdamage-native’, ‘makedepend-native’, ‘chrpath-native’, ‘flex-native’, ‘libxshmfence-native’, ‘libpthread-stubs-native’, ‘xcb-proto-native’, ‘libxau-native’, ‘libxdmcp-native’, ‘libpciaccess-native’, ‘m4-native’, ‘gnu-config-native’]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function set_image_size
| DEBUG: 1278399.200000 = 983384 * 1.300000
| DEBUG: 7602176.000000 = max(1278399.200000, 7602176)[7602176.000000] + 0
| DEBUG: 7602176.000000 = int(7602176.000000)
| DEBUG: 7602176 = aligned(7602176)
| DEBUG: returning 7602176
| 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, 8.4799e-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)
| No directory slots
| WARNING: exit code 1 from a shell command.
ERROR: Task (/work/meta-xxx-xxx-xxx/recipes-core/images/xxx-image-xxx.bb:do_image_bootimg) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 8128 tasks of which 8012 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/work/meta-xxx-xxx-xxx/recipes-core/images/xxx-image-xxx.bb:do_image_bootimg
Summary: There were 3 WARNING messages.
Summary: There was 1 ERROR message, returning a non-zero exit code.
2024-08-16 16:31:53 - ERROR - Command returned non-zero exit status 1

Some directory names were redacted with “xxx”.

I’m not a guru on Mender or Yocto by any means…this is my first project working on them, so this could be something very obvious.

Thank you for your help!

Hi @zapados,

The first thing to check is the size of the boot partition, e.g. MENDER_BOOT_PART_SIZE_MB. The default is 16MB, which might be tight in some cases.

Hope this helps,
Josef

1 Like

@TheYoctoJester, I should have included the variables I’ve added in the original post! Currently I have these in local.conf for testing, and may break them into more logical machine.conf(s) in the future.

    INHERIT += "mender-full"
    MENDER_BOOT_PART_SIZE_MB = "128"
    MENDER_STORAGE_DEVICE = "/dev/mmcblk0"
    MENDER_STORAGE_TOTAL_SIZE_MB = "15028"
    MENDER_FEATURES_ENABLE:append = " mender-uboot"

Should I try going bigger than 128?

@TheYoctoJester, well, I think the MENDER_BOOT_PART_SIZE_MB is not being respected!

ll  build/tmp/work/xxx-linux/xxx-image-xxx/4.0.0-r0/boot.vfat
-rw-r--r-- 1 xxx xxx 16M Aug 16 12:30 build/tmp/work/xxx-linux/xxx-image-xxx/4.0.0-r0/boot.vfat

16MB, just as you suspected!

@zapados that’s more like coincidence, I’d guess - the Mender boot partition file should have a .bootimg suffix, if I remember correctly.

Is this a somehow unconventional build host? Like, running which Linux distribution? And additionally, have you tried deleting your builds tmp directory? Maybe there is something locked up and a clean re-creating might fix it. Note, do not delete the downloads or sstate-cache directories, that would give you a time-intensive rebuild.

Greets,
Josef

1 Like

@TheYoctoJester thank you for your help! It ended up being exactly what you said - the image filling up. I increased it a few times to get it working, and then had to set MENDER_ARTIFACT_NAME, and now it’s building! I ended up increasing it to 512 MB.

Now to see what this produces and how I can get it integrated into our existing stuff. Thank you again sir!

1 Like