Thank you very much for sharing this!
I could generate an .sdimg with the settings you’ve listed. I booted the DART-6UL from an sd card, then copied the eMMC .sdimg onto the eMMC, by running
dd if=core-image-base-imx6ul-var-dart.sdimg of=/dev/mmcblk1 status=progress conv=fdatasync
When I boot from the eMMC, U-boot itself starts successfully (I can interact with it), but it fails when it comes to mounting the filesystem and gets stuck there. Judging from the boot environment variables, the Mender patch seems to be applied, so I guess I must be missing some minor setting now.
The log output:
U-Boot SPL 2017.03-mx6ul+ga7869c2cde (Aug 14 2020 - 09:11:41)
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 14 2020 - 09:11:41 +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
** File not found /uEnv.txt **
## Error: "loadbootscript" not defined
## Error: "loadimage" not defined
## Error: "netboot" not defined
U-boot environment variables:
baudrate=115200
board_name=MX6UL_VAR_DART
boot_dev=emmc
boot_fdt=try
bootcmd=run ramsize_check; mmc dev ${mmcdev};mmc dev ${mmcdev}; if mmc rescan; then if run loadbootenv; then run importbootenv; fi; if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi
bootdelay=1
bootenv=uEnv.txt
console=ttymxc0
ethact=FEC0
ethaddr=f8:dc:7a:26:f6:9c
ethprime=FEC0
fdt_addr=0x83000000
fdt_file=undefined
fdt_high=0xffffffff
findfdt=if test $fdt_file = undefined; then if test $boot_dev = sd; then if test $som_storage = emmc || test $som_storage = none; then if test $soc_type = imx6ull; then setenv fdt_file imx6ull-var-dart-sd_emmc.dtb; else setenv fdt_file imx6ul-var-dart-sd_emmc.dtb; fi; fi; if test $som_storage = nand; then if test $soc_type = imx6ull; then setenv fdt_file imx6ull-var-dart-sd_nand.dtb; else setenv fdt_file imx6ul-var-dart-sd_nand.dtb; fi; fi; fi; if test $boot_dev = emmc; then if test $wifi = yes; then if test $soc_type = imx6ull; then if test $som_rev = 5G; then setenv fdt_file imx6ull-var-dart-5g-emmc_wifi.dtb; else setenv fdt_file imx6ull-var-dart-emmc_wifi.dtb; fi; else if test $som_rev = 5G; then setenv fdt_file imx6ul-var-dart-5g-emmc_wifi.dtb; else setenv fdt_file imx6ul-var-dart-emmc_wifi.dtb; fi; fi; else if test $soc_type = imx6ull; then setenv fdt_file imx6ull-var-dart-sd_emmc.dtb; else setenv fdt_file imx6ul-var-dart-sd_emmc.dtb; fi; fi; fi; if test $boot_dev = nand; then if test $wifi = yes; then if test $soc_type = imx6ull; then if test $som_rev = 5G; then setenv fdt_file imx6ull-var-dart-5g-nand_wifi.dtb; else setenv fdt_file imx6ull-var-dart-nand_wifi.dtb; fi; else if test $som_rev = 5G; then setenv fdt_file imx6ul-var-dart-5g-nand_wifi.dtb; else setenv fdt_file imx6ul-var-dart-nand_wifi.dtb; fi; fi; else if test $soc_type = imx6ull; then setenv fdt_file imx6ull-var-dart-sd_nand.dtb; else setenv fdt_file imx6ul-var-dart-sd_nand.dtb; fi; fi; fi; if test $fdt_file = undefined; then echo WARNING: Could not determine dtb to use; fi; fi;
image=zImage
importbootenv=echo Importing bootenv from mmc ...; env import -t ${loadaddr} ${filesize}
initrd_high=0xffffffff
loadaddr=0x82000000
loadbootenv=load mmc ${mmcdev}:${mender_boot_part} ${loadaddr} ${bootdir}/${bootenv}
mmcautodetect=yes
mmcblk=1
mmcdev=1
optargs=setenv bootargs ${bootargs} ${kernelargs};
panel=VAR-WVGA-LCD
ramsize_check=if test $sdram_size -lt 256; then setenv cma_size cma=32MB; setenv fdt_addr 0x84000000; setenv loadaddr 0x84600000; else if test $sdram_size -lt 512; then setenv cma_size cma=64MB; fi; fi;
script=boot.scr
sdram_size=512
soc_type=imx6ull
som_rev=2.4G
som_storage=emmc
splashdisable=setenv splashfile; setenv splashimage
splashenable=setenv splashfile /boot/splash.bmp; setenv splashimage 0x83100000
splashfile=/boot/splash.bmp
splashimage=0x83100000
splashsource=emmc
splashsourceauto=yes
usbnet_devaddr=f8:dc:7a:00:00:02
usbnet_hostaddr=f8:dc:7a:00:00:01
wifi=yes
My current local.conf:
MACHINE ??= 'imx6ul-var-dart'
DISTRO ?= 'fslc-framebuffer'
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-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"
DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"
# This really saves a lot of disk space!
INHERIT += "rm_work"
MENDER_ARTIFACT_NAME = "emmc_test_1"
INHERIT += "mender-full"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "<my token>"
# Remove unneded vfat boot partition
IMAGE_BOOT_FILES = ""
MENDER_BOOT_PART_SIZE_MB = "0"
# Set up eMMC storage
MENDER_STORAGE_TOTAL_SIZE_MB = "7456"
MENDER_STORAGE_TOTAL_SIZE_MB_imx6ul-var-dart = "7456"
MENDER_STORAGE_DEVICE = "/dev/mmcblk1"
MENDER_STORAGE_DEVICE_imx6ul_var_dart = "/dev/mmcblk1"
MENDER_IMAGE_BOOTLOADER_FILE = "u-boot-spl.img"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET = "2"
# Standard partition alignment from upstream wks file
#MENDER_PARTITION_ALIGNMENT = "4194304"
# Cleanup image types generated
IMAGE_FSTYPES_remove = "tar.gz wic.gz wic.bmap multiubi mender.bmap"
# Disable uefi, enable U-boot and .sdimg generation
MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"
# Make sure that we use the Variscite-supplied u-boot for patching!
PREFERRED_PROVIDER_u-boot = "u-boot-variscite"
I don’t apply any custom U-boot .bbappends, and the automatic u-boot configuration is enabled. I can also mount and see the contents of eMMC card partitions, so I assume that dd itself ran without problems.
Could you point out what I am still missing?