Error when following Variscite DART-6UL page

Hi,
i followed this page to the letter:

I built for yocto zeus and for the sdcard.
I did not add any meta layers to the project or do anything that wasnt stated on the page.
However, when i try to build core-image-base i get the following error:

ERROR: Failed to spawn fakeroot worker to run /home/seccdev/mender-variscite/sources/poky/meta/recipes-core/images/core-image-base.bb:do_image_create_sdcard_symlink: [Errno 2] No such file or directory: ‘/home/seccdev/mender-variscite/build/tmp/sysroots-components/x86_64/pseudo-native/usr/bin/pseudo’: ‘/home/seccdev/mender-variscite/build/tmp/sysroots-components/x86_64/pseudo-native/usr/bin/pseudo’

Does anyone know what the issue is?
Regards,
Kolya

Hi, it is always a little hard to debug without any ability to reproduce this.

Any change you could paste your local.conf file?
and the layers in bblayers?

Also, what distro are you running on your build system?

Drew

Hi @drewmoseley @oleorhagen ,
i am using Ubuntu 18.04 for the build system.

My local.conf:

MACHINE ??= 'imx6ul-var-dart'
DISTRO ?= 'fslc-x11'
PACKAGE_CLASSES ?= 'package_rpm'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
CONF_VERSION = "1"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

# Appended fragment from meta-mender-community/templates

# This really saves a lot of disk space!
INHERIT += "rm_work"

# The name of the disk image and Artifact that will be built.
# This is what the device will report that it is running, and different updates
# must have different names because Mender will skip installation of an Artifact
# if it is already installed.
MENDER_ARTIFACT_NAME = "release-1"

INHERIT += "mender-full"

DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

# Build for Hosted Mender
#
# To get your tenant token:
#    - log in to https://hosted.mender.io
#    - click your email at the top right and then "My organization"
#    - press the "COPY TO CLIPBOARD"
#    - assign content of clipboard to MENDER_TENANT_TOKEN
#
#MENDER_SERVER_URL = "https://hosted.mender.io"
#MENDER_TENANT_TOKEN = ""

# Build for Mender demo server
#
# https://docs.mender.io/getting-started/create-a-test-environment
#
# Uncomment below and update IP address to match the machine running the
# Mender demo server
#MENDER_DEMO_HOST_IP_ADDRESS = "192.168.0.100"

# Build for Mender production setup (on-prem)
#
# https://docs.mender.io/artifacts/building-for-production
#
# Uncomment below and update the URL to match your configured domain
# name and provide the path to the generated server.crt file.
#
# NOTE! It is recommend that you provide below information in your custom
# Yocto layer and this is only for demo purposes. See linked documentation
# for additional information.
#MENDER_SERVER_URL = "https://docker.mender.io"
#FILESEXTRAPATHS_prepend_pn-mender := "<DIRECTORY-CONTAINING-server.crt>:"
#SRC_URI_append_pn-mender = " file://server.crt"

# Mender storage configuration
#
# More details on these variables is available at
#    https://docs.mender.io/devices/yocto-project/partition-configuration#configuring-storage
#
# Also, please be sure to check other config files as other
# layers, config fragments, etc may attempt to set values
# for specific platforms.  Using "bitbake -e <image-name>"
# can help determine which files are setting these values
# in a given configuration.
#
# MENDER_STORAGE_TOTAL_SIZE_MB = "2048"
# MENDER_BOOT_PART_SIZE_MB = "16"
# MENDER_DATA_PART_SIZE_MB = "1024"
# MENDER_STORAGE_DEVICE = "/dev/mmcblk0"
# MENDER_BOOT_PART = "${MENDER_STORAGE_DEVICE_BASE}1"
# MENDER_DATA_PART = "${MENDER_STORAGE_DEVICE_BASE}4"
# MENDER_ROOTFS_PART_A = "${MENDER_STORAGE_DEVICE_BASE}2"
# MENDER_ROOTFS_PART_B = "${MENDER_STORAGE_DEVICE_BASE}3"

# Appended fragment from meta-mender-community/meta-mender-variscite/templates

# This will make sure that our SPL + u-boot.img is embedded in the sdimg at
# a 1kb offset.
MENDER_IMAGE_BOOTLOADER_FILE_imx6ul-var-dart = "u-boot-spl.img"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET_imx6ul-var-dart = "2"

MENDER_IMAGE_BOOTLOADER_FILE_imx8mm-var-dart = "imx-boot"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET_imx8mm-var-dart = "66"

MENDER_IMAGE_BOOTLOADER_FILE_imx8mn-var-som = "imx-boot"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET_imx8mn-var-som = "64"
do_image_sdimg[depends] += "${@bb.utils.contains('MACHINE', 'imx8mn-var-som', 'imx-boot:do_deploy', '', d)}"

# Configure the boot partition files
MENDER_BOOT_PART_SIZE_MB_imx6ul-var-dart = "16"
IMAGE_BOOT_FILES_remove_imx6ul-var-dart = "${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE}"

MENDER_BOOT_PART_SIZE_MB_imx8mm-var-dart = "16"
IMAGE_BOOT_FILES_remove_imx8mm-var-dart = "${KERNEL_IMAGETYPE} ${@make_dtb_boot_files(d)}"

MENDER_BOOT_PART_SIZE_MB_imx8mn-var-som = "16"
IMAGE_BOOT_FILES_remove_imx8mn-var-som = "${KERNEL_IMAGETYPE} ${@make_dtb_boot_files(d)}"

# Cleanup image types generated
IMAGE_FSTYPES_remove = "tar.gz ext4 wic.gz wic.bmap multiubi mender.bmap"

# Build sdimg file rather than uefiimg
MENDER_FEATURES_ENABLE_append = " mender-image-sd "
MENDER_FEATURES_DISABLE_append = " mender-image-uefi "

# Make sure we don't include u-boot-fw-utils; we are using grub-mender-grubenv instead
MACHINE_EXTRA_RDEPENDS_remove = "u-boot-fw-utils"

# Appended fragment from meta-mender-community/meta-mender-variscite/templates
# SDCard Settings
VARISCITE_UBOOT_ENV_IN_EMMC = "0"

MENDER_STORAGE_DEVICE_imx6ul-var-dart = "/dev/mmcblk0"
MENDER_UBOOT_STORAGE_DEVICE_imx6ul-var-dart = "0"
UBOOT_CONFIG_imx6ul-var-dart = "sd"

MENDER_STORAGE_DEVICE_imx8mm-var-dart = "/dev/mmcblk1"
MENDER_UBOOT_STORAGE_DEVICE_imx8mm-var-dart = "0"
UBOOT_CONFIG_imx8mm-var-dart = "sd"

MENDER_STORAGE_DEVICE_imx8mn-var-som = "/dev/mmcblk1"
MENDER_UBOOT_STORAGE_DEVICE_imx8mn-var-som = "1"
UBOOT_CONFIG_imx8mm-var-dart = "sd"

MENDER_BOOT_PART_SIZE_MB_mender-uboot = "0"
KERNEL_IMAGETYPE_mender-uboot = "Image"

My bblayers.conf:

LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"
BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"

BBFILES ?= ""
BBLAYERS = " \
  ${BSPDIR}/sources/poky/meta \
  ${BSPDIR}/sources/poky/meta-poky \
  \
  ${BSPDIR}/sources/meta-openembedded/meta-oe \
  ${BSPDIR}/sources/meta-openembedded/meta-multimedia \
  ${BSPDIR}/sources/meta-openembedded/meta-python \
  \
  ${BSPDIR}/sources/meta-freescale \
  ${BSPDIR}/sources/meta-freescale-3rdparty \
  ${BSPDIR}/sources/meta-freescale-distro \
"

# i.MX Yocto Project Release layers
BBLAYERS += " ${BSPDIR}/sources/meta-imx/meta-bsp "
BBLAYERS += " ${BSPDIR}/sources/meta-imx/meta-sdk "
BBLAYERS += " ${BSPDIR}/sources/meta-imx/meta-ml "

BBLAYERS += "${BSPDIR}/sources/meta-browser"
BBLAYERS += "${BSPDIR}/sources/meta-rust"
BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-gnome"
BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-networking"
BBLAYERS += "${BSPDIR}/sources/meta-openembedded/meta-filesystems"
BBLAYERS += "${BSPDIR}/sources/meta-qt5"
BBLAYERS += "${BSPDIR}/sources/meta-swupdate"
BBLAYERS += "${BSPDIR}/sources/meta-virtualization"
BBLAYERS += "${BSPDIR}/sources/meta-variscite-imx"
BBLAYERS += " \
  ${BSPDIR}/sources/meta-mender/meta-mender-core \
  ${BSPDIR}/sources/meta-mender/meta-mender-demo \
  ${BSPDIR}/sources/meta-mender-community/meta-mender-variscite \
"

Regards,
Kolya

What if you try just building pseudo-native?

Hi @oleorhagen ,
thanks for the tip, when i did

bitbake pseudo-native

, it build without errors. I then went back to

bitbake core-image-base

, and it didnt quickly fail as before, but i did get this error:

WARNING: expat-native-2.2.8-r0 do_fetch: Failed to fetch URL https://downloads.sourceforge.net/expat/expat-2.2.8.tar.bz2, attempting MIRRORS if available
WARNING: acl-2.2.52-r0 do_fetch: Failed to fetch URL https://download.savannah.gnu.org/releases/acl/acl-2.2.52.src.tar.gz, attempting MIRRORS if available
WARNING: icu-native-64.2-r0 do_fetch: Checksum mismatch for local file /home/herodev/mender-variscite/downloads/icu4c-64_2-src.tgz
Cleaning and trying again.
WARNING: icu-native-64.2-r0 do_fetch: Renaming /home/herodev/mender-variscite/downloads/icu4c-64_2-src.tgz to /home/herodev/mender-variscite/downloads/icu4c-64_2-src.tgz_bad-checksum_de8d85a7115c76f1437f70613a45ce75
WARNING: icu-native-64.2-r0 do_fetch: Checksum failure encountered with download of http://download.icu-project.org/files/icu4c/64.2/icu4c-64_2-src.tgz - will attempt other sources if available
WARNING: mdadm-4.1-r0 do_fetch: Failed to fetch URL https://cdn.kernel.org/pub/linux/utils/raid/mdadm/mdadm-4.1.tar.xz, attempting MIRRORS if available
WARNING: kbd-2.0.4-r0 do_fetch: Failed to fetch URL https://cdn.kernel.org/pub/linux/utils/kbd/kbd-2.0.4.tar.xz, attempting MIRRORS if available
WARNING: mender-client-2.6.0-r0 do_compile: You are building with the mender-demo layer, which is not intended for production use
WARNING: mender-client-2.6.0-r0 do_compile: You are building with the default server certificate, which is not intended for production use
ERROR: u-boot-variscite-1.0-r0 do_patch: Command Error: 'quilt --quiltrc /home/herodev/mender-variscite/build/tmp/work/imx6ul_var_dart-fslc-linux-gnueabi/u-boot-variscite/1.0-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0  Output:
Applying patch 0001-Switch-to-CONFIG_DISTRO_DEFAULTS-for-bootcmd.patch
patching file configs/mx6ul_var_dart_mmc_defconfig
patching file include/configs/mx6ul_var_dart.h
Hunk #3 FAILED at 123.
1 out of 4 hunks FAILED -- rejects in file include/configs/mx6ul_var_dart.h
Patch 0001-Switch-to-CONFIG_DISTRO_DEFAULTS-for-bootcmd.patch does not apply (enforce with -f)
ERROR: Logfile of failure stored in: /home/herodev/mender-variscite/build/tmp/work/imx6ul_var_dart-fslc-linux-gnueabi/u-boot-variscite/1.0-r0/temp/log.do_patch.22835
ERROR: Task (/home/herodev/mender-variscite/sources/meta-variscite-imx/recipes-bsp/u-boot/u-boot-variscite.bb:do_patch) failed with exit code '1'

Do you know how to solve this?
Regards,
Kolya

I cannot give you a simple algorithm for resolving it, but from just the error log, I’m guessing there are some issues applying both the variscite patches to U-Boot, along with the patches applied by Mender.

My recommendation is to have a look at the patches, and try and apply them in order, and then resolve the conflicts manually. :smiley:

It is not straight forward work usually, but with a bit of googling and grit it should work out in the end.

Ok thanks, i will try that!
One thing though, i am confused why this would happen to begin with. Is there another page i should follow in parallel to the Variscite DART-6UL page i linked above? I have not done any of the things in the mender docs, should i have? Or are there simply large differences in potential build environments which cause this to happen? Or another reason?
Thanks for all your help so far :slight_smile:
Regards,
Kolya

It can happen as multiple recipes are modifying the same source files.

Yes, have a look here and especially here where you see mentioned the U-Boot patching which is done by the Mender recipe.

It’s not necessarily the build environment, but a recipe collision of sorts I would think.

Hope this will help you work this out

Cheers

I got the same error. I am also building with “zeus”. I suggest removing yocto branch “zeus” in the supported yocto release if it hasn’t been verified compiling.

I will try to use other yocto release.

1 Like


Hi,

The boot can’t read the image files. I checked that the files are inside the /dev/sdb2/boot/
I just followed the steps:
sudo dd if=tmp/deploy/images/imx6ul-var-dart/core-image-base-imx6ul-var-dart.sdimg of=/dev/sdb conv=sync bs=8M → this steps partition /dev/sdb into /dev/sdb1, /dev/sdb2 and /dev/sdb3

Did I miss something?

Kind regards,
Marizonne

My guess is that the SDCard is not device 0. Your log indicates that mmc0 is the current device. You might need to tweak the values of the variables that specify the partition numbers if for some reason your board is different.
Drew