Variscite DART-6UL: U-boot integration succeeds with Yocto Sumo, but fails with Thud

I have tried building an image with your settings (except for MENDER_STORAGE_TOTAL_SIZE_MB, as my device is different). First, bitbake was complaining because it couldn’t find u-boot.imx. To overcome that, I applied your solution from this thread - a bbappend file to the u-boot recipe:

do_compile_append() {
    if [ -n "${UBOOT_CONFIG}" ]
    then
        unset i j
        for config in ${UBOOT_MACHINE}; do
            i=$(expr $i + 1);
            for type in ${UBOOT_CONFIG}; do
                j=$(expr $j + 1);
                if [ $j -eq $i ]
                then
                    dd if="${B}/${config}/SPL" of="${B}/${config}/u-boot-${type}.imx"
                    dd if="${B}/${config}/u-boot.img" of="${B}/${config}/u-boot-${type}.imx" obs=1K seek=68
                fi
            done
            unset  j
        done
        unset  i
    else
        dd if="${B}/SPL" of="${B}/u-boot.imx"
        dd if="${B}/u-boot.img" of="${B}/u-boot.imx" obs=1K seek=68
    fi

}

do_deploy_append () {
    if [ -n "${UBOOT_CONFIG}" ]
    then
        for config in ${UBOOT_MACHINE}; do
            i=$(expr $i + 1);
            for type in ${UBOOT_CONFIG}; do
                j=$(expr $j + 1);
                if [ $j -eq $i ]
                then
                    install -d ${DEPLOYDIR}
                    install -m 644 ${B}/${config}/u-boot-${type}.imx ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.imx
                    cd ${DEPLOYDIR}
                    ln -sf u-boot-${type}-${PV}-${PR}.imx u-boot-${type}.imx
                    ln -sf u-boot-${type}-${PV}-${PR}.imx u-boot.imx
                fi
            done
            unset  j
        done
        unset  i
    else
        install -d ${DEPLOYDIR}
        install -m 644 ${B}/u-boot.imx ${DEPLOYDIR}/u-boot-${PV}-${PR}.imx
        cd ${DEPLOYDIR}
        rm -f u-boot*.imx
        ln -sf u-boot-${PV}-${PR}.imx u-boot.imx

   fi

}

After that, I could generate an image. Unfortunately, it still doesn’t boot, and gets stuck at the same point as in the previous case:

U-Boot SPL 2017.03-mx6ul+ga7869c2cde (Aug 17 2020 - 07:41:25)

Part number: VSM-6UL-706B
Assembly: AS1812142595
Date of production: 2019 Feb 18
DART-6UL configuration: eMMC WiFi
Trying to boot from MMC1
MMC Boot Device: mmc1 (eMMC)


U-Boot 2017.03-mx6ul+ga7869c2cde (Aug 17 2020 - 07:41:25 +0000)

CPU:   Freescale i.MX6ULL rev1.1 900 MHz (running at 396 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 48C
Reset cause: POR
Board: Variscite DART-6UL
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

Display: VAR-WVGA-LCD (800x480)
Video: 800x480x24
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Error: could not access storage.
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc1(part 0) is current device
eMMC:  7.3 GiB
Net:   got MAC0 address from fuse: f8:dc:7a:26:f6:9c
FEC0 [PRIME], usb_ether
Error: usb_ether address not set.

Normal Boot
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1(part 0) is current device
switch to partitions #0, OK
mmc1(part 0) is current device

This is my custom distro.conf file. Maybe it works for you

> #@--------------------------------------------------------------------
> #@TYPE: Distribution
> #@NAME: Robust Edge Distro
> #@DESCRIPTION: The Linux Distribution for Robust Project with Mender.io
> #@MAINTAINER: Emre Karaaslan  <memrekaraaslan@gmail.com>
> #@--------------------------------------------------------------------
> 
> require conf/distro/include/robust-base.inc
> include conf/machine/imx6ul-var-dart-extra.conf
> 
> DISTRO = "robust-distro"
> DISTRO_NAME = "Robust Edge Distro"
> 
> INHERIT += "mender-full"
> 
> # Systemd as a System Manager
> DISTRO_FEATURES_append = "systemd"
> VIRTUAL_RUNTIME_init_manager = "systemd"
> DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
> VIRTUAL_RUNTIME_initscripts = ""
> 
> # Build for Mender production setup (on-prem)
> #
> # https://docs.mender.io/2.2/artifacts/yocto-project/building-for-production
> #
> MENDER_SERVER_URL = "https://mender.robust.com"
> 
> # 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 = "7456"
> # MENDER_BOOT_PART_SIZE_MB = "16"
> # MENDER_DATA_PART_SIZE_MB = "1024"
> MENDER_STORAGE_DEVICE = "/dev/mmcblk1"
> # 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"
> 
> # This will make sure that our SPL + u-boot.img is embedded in the sdimg at
> # a 1kb offset.
> MENDER_IMAGE_BOOTLOADER_FILE = "u-boot-spl.img"
> MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET = "2"
> 
> # Remove the unneeded VFAT boot partition
> IMAGE_BOOT_FILES = ""
> MENDER_BOOT_PART_SIZE_MB = "0"
> 
> # Standard partition alignment from upstream wks file
> MENDER_PARTITION_ALIGNMENT = "4194304"
> 
> # Cleanup image types generated
> IMAGE_FSTYPES_remove = "tar.gz ext4 wic.gz wic.bmap multiubi mender.bmap"
> 
> 
> MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"
> 
> # eMMC Settings
> MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd "
> MENDER_STORAGE_TOTAL_SIZE_MB_imx6ul-var-dart = "7456"
> MENDER_STORAGE_DEVICE_imx6ul-var-dart = "/dev/mmcblk1"
> 
> PREFERRED_VERSION_pn-mender = "2.%"
> PREFERRED_VERSION_pn-mender-artifact = "3.%"
> PREFERRED_VERSION_pn-mender-artifact-native = "3.%"
> 
> PREFERRED_PROVIDER_u-boot = "u-boot-variscite"
> 
> #LICENSE_FLAGS_WHITELIST = "commercial_mender-binary-delta"
> #FILESEXTRAPATHS_prepend_pn-mender-binary-delta := "/home/hie/mender-binary-delta-1.0.0/:"

I made a fresh start according to DART-6UL’s board integration page. I have set up an initial build environment for SD-card boot (export MEDIA="sdcard"). Then I applied dellgreen’s local.conf settings with the MENDER_STORAGE_TOTAL_SIZE fit for my eMMC, and it worked! I can boot from eMMC and update the system from the Mender backend. I guess there must have been some residual files in my previous build environment that messed up my images.

Thank you very much for your help!

Hi,

Sorry, I’m confused. Are we supposed to use export MEDIA=“emmc” so that we can append the settings for emmc?

cat …/sources/meta-mender-hero-secc/templates/local-emmc.conf.append >> conf/local.conf

Yes, that’s the general idea. The difference between emmc and sdcard are minimal but they are important.

Drew