VAR-SOM-MX8M-MINI with B2Qt not booting

Hi,

I have been for a while trying to integrate Mender with a Variscite VAR-SOM-MX8M-MINI running B2Qt based on : Poky 2.5.3, BSP: NXP Sumo, Linux: NXP [imx_4.14.98_2.0.0_ga].

Link:
https://variwiki.com/index.php?title=B2QT_Build_Release&release=RELEASE_SUMO_B2QT_V1.2_DART-MX8M-MINI

Before trying to integrate Mender, I was able to produce a bootable B2Qt image. Then, I added meta-mender-community and meta-mender layers both from the Sumo branches and followed the regular integration approach (updating local.conf and bblayers.conf for sdcard image).

Right now, the image compiles with 4 partitions; boot, primary, secondary and data. The boot partition is probably not needed, but it contains the kernel as an ‘Image’ type (also running bitbake -e u-boot | grep ‘^KERNEL_IMAGETYPE=’ gives KERNEL_IMAGETYPE=“Image”). However, the board doesn’t boot. Can you please kindly help me find a solution to this problem. Thank you.

local.conf: (mender section only)

INHERIT += “rm_work”
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 = “”
MENDER_STORAGE_TOTAL_SIZE_MB_imx8mm-var-dart = “13312”
MENDER_IMAGE_BOOTLOADER_FILE_imx8mm-var-dart = “imx-boot-imx8mm-var-dart-sd.bin”
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET_imx8mm-var-dart = “66”
MENDER_BOOT_PART_SIZE_MB_imx8mm-var-dart = “16”
IMAGE_FSTYPES_remove = “tar.gz wic.gz wic.bmap mender.bmap sdimg.bmap sdcard.gz”
MENDER_FEATURES_ENABLE_append = " mender-image-sd"
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"
MENDER_STORAGE_DEVICE_imx8mm-var-dart = “/dev/mmcblk1”
MENDER_UBOOT_STORAGE_DEVICE_imx8mm-var-dart= “1”
UBOOT_CONFIG_imx8mm-var-dart = “sd”
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = “kernel-image kernel-devicetree”
IMAGE_POSTPROCESS_COMMAND_remove = “do_qbsp_image;”
KERNEL_IMAGETYPE_mender-uboot = “Image”
#MACHINE_EXTRA_RDEPENDS = “u-boot-fw-utils”
#MENDER_BOOT_PART_SIZE_MB_mender-uboot = “16”

u-boot-variscite.bbappend:

require recipes-bsp/u-boot/u-boot-variscite-mender-common.inc
require recipes-bsp/u-boot/u-boot-mender.inc

DEPENDS_append = " bc-native "
KERNEL_DEVICETREE = " freescale/imx8mm-var-dart.dtb"

make_u_boot_spl_image() {
install -m 644 {B}/{config}/{SPL_BINARY} {DEPLOYDIR}/u-boot-spl-{PV}-{PR}.img
rm -f {DEPLOYDIR}/u-boot-spl.img ln -sf u-boot-spl-{PV}-{PR}.img {DEPLOYDIR}/u-boot-spl.img
dd if={DEPLOYDIR}/u-boot.img of={DEPLOYDIR}/u-boot-spl-{PV}-{PR}.img bs=1K seek=68 conv=notrunc
}

do_deploy_append_var-som-mx6() {
make_u_boot_spl_image
}

do_deploy_append_imx6ul-var-dart() {
make_u_boot_spl_image
}

bitbake u-boot -e | grep ^MENDER_UBOOT_STORAGE_DEVICE gives:

MENDER_UBOOT_STORAGE_DEVICE=“1”
MENDER_UBOOT_STORAGE_DEVICE_DEFAULT=""
MENDER_UBOOT_STORAGE_DEVICE_DEFAULT_mender-ubi=“dummy”
MENDER_UBOOT_STORAGE_DEVICE_imx8mm-var-dart=“1”

Can you clarify what you mean when you say the board doesn’t boot? Do you have any U-Boot output at all on the serial board?

Is there a reason you are using sumo? We never integrated this platform on that version. We are on warrior.

Drew

Hi Drew

Sorry I was not clear. Yes I do see U-Boot output, but it hangs at “Starting kernel …” here is the serial output:

U-Boot SPL 2018.03-imx_v2018.03_4.14.98_2.0.0_ga_var01+g42342c4846 (Mar 31 2021 - 07:53:57 +0000)
Normal Boot
Trying to boot from MMC1

U-Boot 2018.03-imx_v2018.03_4.14.98_2.0.0_ga_var01+g42342c4846 (Mar 31 2021 - 07:53:57 +0000)

CPU: Freescale i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 49C
Reset cause: POR
Model: Variscite VAR-SOM-MX8MM board
I2C: ready
DRAM: 2 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC… OK
In: serial
Out: serial
Err: serial

BuildInfo:

  • ATF 1cb68fa
  • U-Boot 2018.03-imx_v2018.03_4.14.98_2.0.0_ga_var01+g42342c4846

Part number: VSM-MX8MM-101
Assembly: AS2002150192
Production date: 2020 Apr 06
Serial Number: f8:dc:7a:3e:81:ba
switch to partitions #0, OK
mmc0 is current device
flash target is MMC:0
Net: eth0: ethernet@30be0000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
43401 bytes read in 128 ms (331.1 KiB/s)
12541960 bytes read in 11164 ms (1.1 MiB/s)

Flattened Device Tree blob at 43000000

Booting using the fdt blob at 0x43000000
Using Device Tree in place at 0000000043000000, end 000000004300d988

Starting kernel …

I noticed though that after some “long time”, the boot image (customized one) appears and then B2Qt default GUI appears, then It gets stuck.

As for using sumo, its because Variscite is providing B2Qt only with sumo and they are maintaining it so the choice was made a while ago to initially go for this distribution to start with a working and tested distribution.

Hi Drew,

I managed to get it to work. The problem was in the u-boot-variscite.bbappend. I was using the wrong device tree. Thank you

That’s great to hear. Thanks for reporting back.