I just tried to cherry pick the previous commit and still ends up with the size error. See log below.
Would it be a good strategy to take the rootfs folder that was stripped from /data and create a {IMGDEPLOYDIR}/<NEW_ROOTFS_WITHOUT_DATA>.{ARTIFACTIMG_FSTYPE} and use that rootfs to check the size?
ERROR: installer-image-1.0-r0 do_image_mender: Size of rootfs is greater than the calculated partition space (10357413888 > 3489660928). This image won't fit on a device with the current storage configuration. Try reducing IMAGE_OVERHEAD_FACTOR if it is higher than 1.0, or raise MENDER_STORAGE_TOTAL_SIZE_MB if the device in fact has more storage.ERROR: installer-image-1.0-r0 do_image_mender: Function failed: do_image_mender (log file is located at /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/temp/log.do_image_mender.205)
ERROR: Logfile of failure stored in: /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/temp/log.do_image_mender.205
NOTE: recipe installer-image-1.0-r0: task do_image_mender: Failed
ERROR: Task (/workdir/build/../sources/meta-/images/installer-image.bb:do_image_mender) failed with exit code '1'
ERROR: installer-image-1.0-r0 do_image_sdimg: Function failed: do_image_sdimg (log file is located at /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/temp/log.do_image_sdimg.206)
ERROR: Logfile of failure stored in: /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/temp/log.do_image_sdimg.206
Log data follows:
| DEBUG: Executing python function prepare_excluded_directories
| DEBUG: 'IMAGE_ROOTFS_EXCLUDE_PATH' is set but 'respect_exclude_path' variable flag is 0 for this image type, so ignoring it
| DEBUG: Python function prepare_excluded_directories finished
| DEBUG: Executing python function set_image_size
| DEBUG: 10012262.000000 = 7701740 * 1.300000
| DEBUG: 10114662.000000 = max(10012262.000000, 3305472)[10012262.000000] + 1
| DEBUG: 10114662.000000 = int(10114662.000000)
| DEBUG: 10114662 = aligned(10114662)
| DEBUG: returning 10114662
| DEBUG: Python function set_image_size finished
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/workdir/build/../sources/poky/meta/recipes-core/glibc/glibc_2.28.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-extended/pigz/pigz_2.4.bb:do_populate_sysroot', '/workdir/build/../sources/poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot', '/workdir/build/../sources/poky/meta/recipes-devtools/python/python-native_2.7.15.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/opkg/opkg_0.3.6.bb:do_populate_sysroot', '/workdir/build/../sources/poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-extended/parted/parted_3.2.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/dnf/dnf_2.7.5.bb:do_populate_sysroot', '/workdir/build/../sources/poky/meta/recipes-devtools/gcc/gcc-cross_8.2.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.3.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/dosfstools/dosfstools_4.1.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/swig/swig_3.0.12.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.4.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb:do_populate_sysroot', '/workdir/build/../sources/poky/meta/recipes-core/meta/wic-tools.bb:do_populate_sysroot', '/workdir/build/../sources/poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot', '/workdir/build/../sources/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/prelink/prelink_git.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-extended/bc/bc_1.07.1.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb:do_populate_sysroot', '/workdir/build/../sources/poky/meta/recipes-devtools/gcc/gcc-runtime_8.2.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot',
'/workdir/build/../sources/poky/meta/recipes-core/glibc/cross-localedef-native_2.28.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-core/coreutils/coreutils_8.30.bb:do_populate_sysroot', '/workdir/build/../sources/poky/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/workdir/build/../sources/poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['glibc', 'pigz-native', 'depmodwrapper-cross', 'python-native', 'opkg-native', 'mklibs-native', 'mtools-native', 'parted-native', 'dnf-native', 'gcc-cross-arm', 'update-rc.d-native', 'e2fsprogs-native', 'dosfstools-native', 'swig-native', 'opkg-utils-native', 'gptfdisk-native', 'createrepo-c-native', 'wic-tools', 'qemuwrapper-cross', 'quilt-native', 'prelink-native', 'bc-native', 'openssl-native', 'gcc-runtime', 'makedevs-native', 'cross-localedef-native', 'coreutils-native', 'ldconfig-native', 'rpm-native', 'pseudo-native', 'bmap-tools-native', 'linux-libc-headers', 'zlib-native', 'systemd-systemctl-native', 'automake-native', 'gnu-config-native', 'libtool-native', 'sqlite3-native', 'db-native', 'expat-native', 'autoconf-native', 'bzip2-native', 'xz-native', 'gdbm-native', 'pkgconfig-native', 'readline-native', 'libsolv-native', 'libarchive-native', 'qemu-native', 'texinfo-dummy-native', 'python3-iniparse-native', 'ninja-native', 'libdnf-native', 'librepo-native', 'cmake-native',
'libcomps-native', 'gettext-minimal-native', 'python3-native', 'shadow-native', 'libpcre-native', 'libgcc', 'attr-native', 'nss-native', 'dbus-native', 'popt-native', 'elfutils-native', 'file-native', 'python3-setuptools-native', 'kmod-native', 'util-linux-native', 'ncurses-native', 'debianutils-native', 'binutils-cross-arm', 'flex-native', 'mpfr-native', 'libmpc-native', 'gmp-native', 'glib-2.0-native', 'libxml2-native', 'curl-native', 'binutils-native', 'm4-native', 'lzo-native', 'alsa-lib-native', 'pixman-native', 'dtc-native', 'python3-six-native', 're2c-native', 'libcheck-native', 'gtk-doc-native', 'gobject-introspection-native', 'gpgme-native', 'nspr-native', 'unzip-native', 'gettext-native', 'libffi-native', 'libpng-native', 'util-macros-native', 'libgpg-error-native', 'libassuan-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_sdimg
| + mkdir -p /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0
| + true
| + install -m 0644 /workdir/build/tmp/deploy/images/mmwe/uboot.env /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/
| + basename /dev/mmcblk1
| + ondisk_dev=mmcblk1
| + wks=/workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/mender-sdimg.wks
| + rm -f /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/mender-sdimg.wks
| + [ -n u-boot-spl.img ]
| + install -m 0644 /workdir/build/tmp/deploy/images/mmwe/u-boot-spl.img /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/
| + expr 2 % 2
| + [ 0 -ne 0 ]
| + bootloader_sector=2
| + bootloader_file=/workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/u-boot-spl.img
| + expr 2 * 512
| + expr 1024 / 1024
| + bootloader_align_kb=1
| + stat -c %s /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/u-boot-spl.img
| + bootloader_size=443584
| + expr 1 * 1024 + 443584
| + bootloader_end=444608
| + [ 444608 -gt 4194304 ]
| + cat
| + true
| + [ -n 4194304 ]
| + expr 4194304 / 1024
| + boot_env_align_kb=4096
| + cat
| + expr 4194304 % 1024
| + true
| + [ 0 -ne 0 ]
| + expr 4194304 / 1024
| + alignment_kb=4096
| + echo
| + sed -r s/(^\s*)|(\s*$)//g
| + IMAGE_BOOT_FILES_STRIPPED=
| + [ 0 -ne 0 ]
| + [ -n ]
| + cat
| + [ -ne 0 ]
| /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/temp/run.do_image_sdimg.206: 205: [: Illegal number:
| + cat
| + echo ### Contents of wks file ###
| ### Contents of wks file ###
| + cat /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/mender-sdimg.wks
| # embed bootloader
| part --source rawcopy --sourceparams="file=/workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/u-boot-spl.img" --ondisk "mmcblk1" --align 1 --no-table| part --source rawcopy --sourceparams="file=/workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/uboot.env" --ondisk "mmcblk1" --align 4096 --no-table
| part --source rawcopy --sourceparams="file=/workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/deploy-installer-image-image-complete/installer-image-mmwe.ext4" --ondisk "mmcblk1" --align 4096 --fixed-size 3407872k
| part --source rawcopy --sourceparams="file=/workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/deploy-installer-image-image-complete/installer-image-mmwe.ext4" --ondisk "mmcblk1" --align 4096 --fixed-size 3407872k
| part --source rawcopy --sourceparams="file=/workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/deploy-installer-image-image-complete/installer-image-mmwe.dataimg" --ondisk "mmcblk1" --align 4096 --fixed-size 7629 --mkfs-extraopts=''
| bootloader --ptable msdos
| + echo ### End of contents of wks file ###
| ### End of contents of wks file ###
| + outimgname=/workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/deploy-installer-image-image-complete/installer-image-mmwe--20190904120005.sdimg
| + wicout=/workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/deploy-installer-image-image-complete/installer-image-mmwe--20190904120005-sdimg
| + BUILDDIR=/workdir/build wic create /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/mender-sdimg.wks --vars /workdir/build/tmp/sysroots/mmwe/imgdata/ -e installer-image -o /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/deploy-installer-image-image-complete/installer-image-mmwe--20190904120005-sdimg/ --no-fstab-update
| INFO: Creating image(s)...
|
| ERROR: File system image of partition None is larger (10114662 kB) than its allowed size 3407872 kB
|
| + bb_exit_handler
| + ret=1
| + echo WARNING: exit code 1 from a shell command.
| WARNING: exit code 1 from a shell command.
| + exit 1
| ERROR: Function failed: do_image_sdimg (log file is located at /workdir/build/tmp/work/linux-gnueabi/installer-image/1.0-r0/temp/log.do_image_sdimg.206)
NOTE: recipe installer-image-1.0-r0: task do_image_sdimg: Failed
ERROR: Task (/workdir/build/../sources/meta-/images/installer-image.bb:do_image_sdimg) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3748 tasks of which 3742 didn't need to be rerun and 2 failed.