Over the last few years we have designed a custom board based on imx6q SabreSD for our data acquisition system. It is working well and has been for the last couple of years.
We based out SPL/U-Boot/Linux kernel/Debian setup on those here at Digikey I think created by Robert C Nelson (we created custom variants of the imx6q SabreSD code and tailored it to our hardware customisations):
Debian: Getting Started with the i.MX6q SABRE Board
We of course had to customise U-boot for our device and also the kernel device tree etc. We are on kernel v5.15.x-rt and U-boot v2018.11 and Debian 10.12.
Until now we’ve been running from SD cards but we do have a 16GB eMMC 5.2 fitted. If I boot from the SD card and then in Linux get the info about the MMC we see:
root@arm:~# cat /sys/kernel/debug/mmc2/ios
clock: 52000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don’t care)
power mode: 2 (on)
bus width: 3 (8 bits)
timing spec: 8 (mmc DDR52)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)
and also:
root@arm:~# lsblk -p
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
/dev/mmcblk1 179:0 0 29.8G 0 disk
└─/dev/mmcblk1p1 179:1 0 29.8G 0 part /
/dev/mmcblk2 179:256 0 14.7G 0 disk
└─/dev/mmcblk2p1 179:257 0 14.7G 0 part
/dev/mmcblk2boot0 179:512 0 4M 1 disk
/dev/mmcblk2boot1 179:768 0 4M 1 disk
mmcblk1 is the SD card, mmcblk2 is the eMMC.
I have tried a couple of approaches. The first was to simply try and flash what we’d use to create the SD card (using similar steps to the Digikey link above in this post) onto mmcblk2 (ultimately a partition mmcblk2p1) and not use boot0 or boot1. I can then power off, remove the SD card and change our 8 way dip switches to select MMC instead of SD (similar to the dip switches on the iMX6 SabreSD dev kit board). When I do this it ultimately drops to a U-boot console with errors about invalid partitions on the MMC and invalid file system format. I did try repeating this using a rebuilt version of our U-boot where I made sure in our header files (based on mx6sabre_common.h and mx6sabresd.h) I tweaked some values to select MMC instead of SD. Again this made no difference.
Next I tried to make use of mmcblkboot0, like shown here:
eMMC Hardware Boot Area Partitions
In the above when it came to using dd to flash a U-boot image to boot0 I used the .img file from our build.
Anyway when I tried the boot0 approach our board wouldn’t even boot at all, I cannot even see any serial output.
I’m sure I’m missing something silly so any hints/help would be much appreciated. In particular what would I need to do to be able to use our U-boot/Linux Kernel/Debian images base don the Robert C Nelson ones I linked above to work from eMMC?
Many thanks in advance.