# Variscite VAR-SOM-MX8M-MINI : NXP i.MX 8M Mini

**URL:** <https://hub.mender.io/t/variscite-var-som-mx8m-mini-nxp-i-mx-8m-mini/1918>\
**Category:** Yocto Project\
**Created:** [May 14, 2020, 1:51pm UTC](https://hub.mender.io/t/variscite-var-som-mx8m-mini-nxp-i-mx-8m-mini/1918 "2020-05-14T13:51:16Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![ABTP](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@ABTP](https://hub.mender.io/u/ABTP)\
**Post date:** [April 28, 2021, 11:01am UTC](https://hub.mender.io/t/variscite-var-som-mx8m-mini-nxp-i-mx-8m-mini/1918/8 "2021-04-28T11:01:19Z")

</div>

Hi Drew

Thank you for the quick reply. Its really appreciated 🙂

I manged to build the image, though I didn’t have to make any changes to u-boot-imx.bbappend nor to u-boot-variscite.bbappend. I just enabled “mender-uboot” feature in the local.conf file (MENDER\_FEATURES\_ENABLE\_append = " mender-image-sd mender-uboot" ). For other Linux distributions (Sumo) I did not have to add this, and the integration was successful, so its a bit strange I had to do it this time.

Nevertheless, even though the image was built successfully, it is not booting. Serial boot messages show this error message: “Bad Linux ARM64 Image magic!”

Here are the full boot messages:

> U-Boot SPL 2019.04-lf-5.4.y\_v2019.04\_var01+gbcdb05a53e (Apr 28 2021 - 08:00:24 +0000)  
> Normal Boot  
> Trying to boot from MMC1
> 
> U-Boot 2019.04-lf-5.4.y\_v2019.04\_var01+gbcdb05a53e (Apr 28 2021 - 08:00:24 +0000)
> 
> CPU: Freescale i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)  
> CPU: Commercial temperature grade (0C to 95C) at 45C  
> Reset cause: POR  
> Model: Variscite VAR-SOM-MX8M-MINI  
> DRAM: 2 GiB  
> MMC: FSL\_SDHC: 1, FSL\_SDHC: 2  
> Loading Environment from MMC… OK  
> In: serial  
> Out: serial  
> Err: serial
> 
> BuildInfo:
> 
> - ATF 7b3389d
> - U-Boot 2019.04-lf-5.4.y\_v2019.04\_var01+gbcdb05a53e
> 
> Part number: VSM-MX8MM-101  
> Assembly: AS2002150192  
> Production date: 2020 Apr 06  
> Serial Number: f8:dc:7a:3e:81:ba  
> flash target is MMC:1  
> Net: eth0: ethernet@30be0000  
> Fastboot: Normal  
> Normal Boot  
> Hit any key to stop autoboot: 0  
> Bad Linux ARM64 Image magic!

This is the boot environment:

> u-boot=\> printenv  
> altbootcmd=run mender\_altbootcmd; run bootcmd  
> arch=arm  
> baudrate=115200  
> board=imx8mm\_var\_dart  
> board\_name=VAR-SOM-MX8M-MINI  
> boot\_a\_script=load ${devtype} ${devnum}:${distro\_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}  
> boot\_efi\_binary=if fdt addr ${fdt\_addr\_r}; then bootefi bootmgr ${fdt\_addr\_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro\_bootpart} ${kernel\_addr\_r} efi/boot/bootaa64.efi; if fdt addr ${fdt\_addr\_r}; then bootefi ${kernel\_addr\_r} ${fdt\_addr\_r};else bootefi ${kernel\_addr\_r} ${fdtcontroladdr};fi  
> boot\_extlinux=sysboot ${devtype} ${devnum}:${distro\_bootpart} any ${scriptaddr} ${prefix}${boot\_syslinux\_conf}  
> boot\_net\_usb\_start=usb start  
> boot\_prefixes=/ /boot/  
> boot\_script\_dhcp=boot.scr.uimg  
> boot\_scripts=boot.scr.uimg boot.scr  
> boot\_syslinux\_conf=extlinux/extlinux.conf  
> boot\_targets=mmc2 mmc1  
> bootargs=root=/dev/mmcblk1p1  
> bootcmd=run mender\_setup; setenv bootargs root=${mender\_kernel\_root} ${bootargs}; if test “${fdt\_addr\_r}” != “”; then load ${mender\_uboot\_root} ${fdt\_addr\_r} /boot/${mender\_dtb\_name}; fi; load ${mender\_uboot\_root} ${kernel\_addr\_r} /boot/${mender\_kernel\_name}; ${mender\_boot\_kernel\_type} ${kernel\_addr\_r} - ${fdt\_addr\_r}; run mender\_try\_to\_recover  
> bootcmd\_mfg=run mfgtool\_args;if iminfo ${initrd\_addr}; then if test ${tee} = yes; then bootm ${tee\_addr} ${initrd\_addr} ${fdt\_addr}; else booti ${loadaddr} ${initrd\_addr} ${fdt\_addr}; fi; else echo “Run fastboot …”; fastboot 0; fi;  
> bootcmd\_mmc1=devnum=1; run mmc\_boot  
> bootcmd\_mmc2=devnum=2; run mmc\_boot  
> bootcount=1  
> bootdelay=1  
> bootdir=/boot  
> bootlimit=1  
> cma\_size=cma=640M@1376M  
> console=ttymxc3,115200 earlycon=ec\_imx6q,0x30a60000,115200  
> cpu=armv8  
> distro\_bootcmd=for target in ${boot\_targets}; do run bootcmd\_${target}; done  
> efi\_dtb\_prefixes=/ /dtb/ /dtb/current/  
> emmc\_dev=1  
> ethaddr=f8:dc:7a:3e:81:ba  
> ethprime=FEC  
> fastboot\_dev=mmc1  
> fdt\_addr\_r=0x43000000  
> fdt\_high=0xffffffffffffffff  
> fdtcontroladdr=b6d2d7c0  
> fdtfile=imx8mm-var-som.dtb  
> findfdt=if test $fdtfile = undefined; then if test $board\_name = VAR-SOM-MX8M-MINI; then if test $som\_rev = som\_rev10; then setenv fdtfile imx8mm-var-som-rev10.dtb; else setenv fdtfile imx8mm-var-som.dtb; fi;else setenv fdtfile imx8mm-var-dart.dtb;fi; fi;  
> image=Image.gz  
> img\_addr=0x42000000  
> initrd\_addr=0x43800000  
> initrd\_high=0xffffffffffffffff  
> kboot=booti  
> kernel\_addr\_r=0x40480000  
> load\_efi\_dtb=load ${devtype} ${devnum}:${distro\_bootpart} ${fdt\_addr\_r} ${prefix}${efi\_fdtfile}  
> loadaddr=0x40480000  
> loadm4bin=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}/${m4\_bin}; cp.b ${loadaddr} ${m4\_addr} ${filesize}  
> m4\_addr=0x7e0000  
> m4\_bin=hello\_world.bin  
> mender\_altbootcmd=if test ${mender\_boot\_part} = 1; then setenv mender\_boot\_part 2; setenv mender\_boot\_part\_hex 2; else setenv mender\_boot\_part 1; setenv mender\_boot\_part\_hex 1; fi; setenv upgrade\_available 0; saveenv; run mender\_setup  
> mender\_boot\_kernel\_type=booti  
> mender\_boot\_part=1  
> mender\_boot\_part\_hex=1  
> mender\_boot\_part\_name=/dev/mmcblk1p1  
> mender\_check\_saveenv\_canary=1  
> mender\_kernel\_name=Image  
> mender\_kernel\_root=/dev/mmcblk1p1  
> mender\_kernel\_root\_name=/dev/mmcblk1p1  
> mender\_pre\_setup\_commands= if test “${ramsize\_check}” != “”; then run ramsize\_check; fi; if test “${mmcargs}” != “”; then run mmcargs; fi; if test “${videoargs}” != “”; then run videoargs; fi; if test “${optargs}” != “”; then run optargs; fi; run findfdt; setenv mender\_dtb\_name ${fdt\_file}; setenv kernel\_addr\_r ${loadaddr};  
> mender\_saveenv\_canary=1  
> mender\_setup=if test “${mender\_saveenv\_canary}” != “1”; then setenv mender\_saveenv\_canary 1; saveenv; fi; if test “${mender\_pre\_setup\_commands}” != “”; then run mender\_pre\_setup\_commands; fi; if test “${mender\_systemd\_machine\_id}” != “”; then setenv bootargs “systemd.machine\_id=${mender\_systemd\_machine\_id} ${bootargs}”; fi; setenv mender\_kernel\_root /dev/mmcblk1p${mender\_boot\_part}; if test ${mender\_boot\_part} = 1; then setenv mender\_boot\_part\_name /dev/mmcblk1p1; else setenv mender\_boot\_part\_name /dev/mmcblk1p2; fi; setenv mender\_kernel\_root\_name ${mender\_boot\_part\_name}; setenv mender\_uboot\_root mmc 0:${mender\_boot\_part\_hex}; setenv mender\_uboot\_root\_name ${mender\_boot\_part\_name}; setenv expand\_bootargs “setenv bootargs \”${bootargs}\“”; run expand\_bootargs; setenv expand\_bootargs; if test “${mender\_post\_setup\_commands}” != “”; then run mender\_post\_setup\_commands; fi  
> mender\_try\_to\_recover=if test ${upgrade\_available} = 1; then reset; fi  
> mender\_uboot\_boot=mmc 0:1  
> mender\_uboot\_dev=0  
> mender\_uboot\_if=mmc  
> mender\_uboot\_root=mmc 0:1  
> mender\_uboot\_root\_name=/dev/mmcblk1p1  
> mfgtool\_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc clk\_ignore\_unused  
> mmc\_boot=if mmc dev ${devnum}; then devtype=mmc; run scan\_dev\_for\_boot\_part; fi  
> mmcdev=0  
> mmcpart=1  
> ramsize\_check=if test $sdram\_size -le 512; then setenv cma\_size cma=320M; else setenv cma\_size cma=640M@1376M; fi;  
> runm4bin=if test ${m4\_addr} = 0x7e0000; then echo Booting M4 from TCM; else echo Booting M4 from DRAM; dcache flush; fi; bootaux ${m4\_addr};  
> scan\_dev\_for\_boot=echo Scanning ${devtype} ${devnum}:${distro\_bootpart}…; for prefix in ${boot\_prefixes}; do run scan\_dev\_for\_extlinux; run scan\_dev\_for\_scripts; done;run scan\_dev\_for\_efi;  
> scan\_dev\_for\_boot\_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro\_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro\_bootpart} bootfstype; then run scan\_dev\_for\_boot; fi; done; setenv devplist  
> scan\_dev\_for\_efi=setenv efi\_fdtfile ${fdtfile}; for prefix in ${efi\_dtb\_prefixes}; do if test -e ${devtype} ${devnum}:${distro\_bootpart} ${prefix}${efi\_fdtfile}; then run load\_efi\_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro\_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot\_efi\_binary; echo EFI LOAD FAILED: continuing…; fi; setenv efi\_fdtfile  
> scan\_dev\_for\_extlinux=if test -e ${devtype} ${devnum}:${distro\_bootpart} ${prefix}${boot\_syslinux\_conf}; then echo Found ${prefix}${boot\_syslinux\_conf}; run boot\_extlinux; echo SCRIPT FAILED: continuing…; fi  
> scan\_dev\_for\_scripts=for script in ${boot\_scripts}; do if test -e ${devtype} ${devnum}:${distro\_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot\_a\_script; echo SCRIPT FAILED: continuing…; fi; done  
> script=boot.scr  
> sd\_dev=0  
> sdram\_size=2048  
> serial#=220c1a09dab4b749  
> soc=imx8m  
> soc\_type=imx8mm  
> som\_rev=som\_rev11  
> stderr=serial  
> stdin=serial  
> stdout=serial  
> upgrade\_available=0  
> usb\_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan\_dev\_for\_boot\_part; fi  
> use\_m4=no  
> vendor=variscite
> 
> Environment size: 6623/131067 bytes

After going though posts from people facing similar error:

[https://hub.mender.io/t/issue-with-variscite-var-som-mx8m-nano/2840/11](https://hub.mender.io/t/issue-with-variscite-var-som-mx8m-nano/2840/11)  
[https://hub.mender.io/t/variscite-var-dart-imx8mm-problem/2811](https://hub.mender.io/t/variscite-var-dart-imx8mm-problem/2811)

I made a couple of changes to the local.conf according to those posts, but I am still getting the same error message.

local.conf:

> INHERIT += “rm\_work”
> 
> MENDER\_ARTIFACT\_NAME = “release-2”  
> 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\_FILE\_imx8mm-var-dart = “imx-boot”  
> MENDER\_IMAGE\_BOOTLOADER\_BOOTSECTOR\_OFFSET\_imx8mm-var-dart = “66”
> 
> IMAGE\_BOOT\_FILES\_imx8mm-var-dart = “”  
> MENDER\_BOOT\_PART\_SIZE\_MB\_imx8mm-var-dart = “0”
> 
> IMAGE\_FSTYPES\_remove = “tar.gz wic.gz wic.bmap mender.bmap sdimg.bmap sdcard.gz wic ext4”
> 
> MENDER\_FEATURES\_ENABLE\_append = " mender-image-sd mender-uboot"  
> MENDER\_FEATURES\_DISABLE\_append = " mender-image-uefi mender-grub"
> 
> MENDER\_STORAGE\_DEVICE\_imx8mm-var-dart = “/dev/mmcblk1”  
> MENDER\_UBOOT\_STORAGE\_DEVICE\_imx8mm-var-dart= “0”  
> UBOOT\_CONFIG\_imx8mm-var-dart = “sd”
> 
> MACHINE\_ESSENTIAL\_EXTRA\_RDEPENDS = “kernel-image kernel-devicetree”  
> KERNEL\_IMAGETYPE\_mender-uboot = “Image”
> 
> IMAGE\_POSTPROCESS\_COMMAND\_remove = “do\_qbsp\_image;”
> 
> MACHINE\_EXTRA\_RDEPENDS = “u-boot-fw-utils”  
> IMAGE\_BOOT\_FILES = “u-boot.bin”  
> #MENDER\_BOOT\_PART\_SIZE\_MB\_mender-uboot = “16”  
> #PREFERRED\_PROVIDER\_u-boot-fw-util= “u-boot-fw-utils-mender-auto-provided”

Do have any suggestions to how I can fix this problem? Thank you

---

_[View the full topic](https://hub.mender.io/t/variscite-var-som-mx8m-mini-nxp-i-mx-8m-mini/1918)._
