Upgrading from i.MX8MP to A311D, u-boot issues

I recently acquired a (new to me) MNT Pocket Reform with the i.MX8MP SoM, as well as an NVMe SSD. Currently it’s running an encrypted install on the NVMe with the default system image, with the bootloader installed to eMMC.

Looking for an upgrade, I got the A311D RCM4 module as it’s the only one readily available in the US right now (through crowd supply/mouser), and after installing it, found that it wouldn’t boot.

Up to this point I’ve experimented unsuccessfully with the reform system images, as well as Armbian’s bpi-cm4io image, which does successfully boot, though in its stock form doesn’t have much in the way of support for the display, ethernet, usb, etc. since it’s designed to work with the IO board for this CM4.

I currently have it wired up over UART and have the following logs for a successful boot and the behavior the system has when attempting to use the latest ‘pocket-reform-system-a311d.img’ image, both dd’d to an SD card:

Armbian:

pocket-reform-system-a311d.img:

This kind of hardware is pretty new to me, so I don’t entirely know what I’m doing, but I’m trying to at least avoid soft-bricking the cm4 by not writing to the eMMC. If anyone has some advice for getting this hardware to boot the Pocket Reform image, it would be greatly appreciated.

Looks like you hit the same thing I did on the a311d when booting the system image:

  1. BL33 CHK: 0x000000ff ADDR 017a4000

I think that’s a u-boot issue I reported.

Option 1 is to grab an older system image.

Option 2, assuming you need a hobby, is to try Arch (shameless self promotion).

Please keep in mind that Debian is a much nicer experience, in so many ways. I’d recommend the older system image path. :grin:

1 Like

Oh, one more thing, do NOT use reform-flash-bootloader to flash the latest u-boot to your emmc until that issue is resolved. I believe that will soft-brick your a311d.

Hello @shebang and welcome to the forum!

If you had an encrypted installation on your SSD before, then you likely had your /boot partition on your old imx8m+ emmc. Swapping out the SoM will remove that emmc storage and thus the /boot partition which was able to unlock your root filesystem disappeared. This is why your system no longer boots.

To be able to boot the system on your SSD (did yo use reform-setup-encrypted-disk to set it up?) you must fill the emmc on your new a311d som with a /boot partition containing a kernel and initramfs which knows how to unlock LUKS and boot the rootfs on your SSD.

To re-create a /boot partition on your a311d emmc you first boot a system from sd-card to perform this operation. On that system, unlock LUKS on your ssd, mount the rootfs somewhere, create a suitable partition on a311d emmc, mount it as /boot into the mountpoint of your rootfs, mount sysfs, proc and bind-mount /dev and chroot into that system. Once in there, re-install the kernel packages which shipped the kernel images in /boot (usually the linux-image-* packages) and regenerate your initramfs.

You can do this manually or you use an existing tool which does that for you. You can run reform-emmc-bootstrap from the system you booted from the sd-card. It will identify your SSD, prompt you for a password and then try to re-install the kernel images to bootstrap the /boot partition on your emmc. Make sure the system on sd-card has internet before running the tool because re-installing the kernel packages requires re-downloading them. You cannot do this without internet unless you go the manual route because swapping out your SoM means removal of your old /boot partition which means that the kernel packages loose access to some of the files they once had installed and which are nowhere else.

I appreciate the replies, I’ve gotten a working version of u-boot flashed to SD, and the /boot partition of my install on eMMC, with the encrypted install on NVMe. Typing up this reply on my Pocket Reform as we speak so I think I’m set for the time being! I’ll keep an eye on the GitLab issue in case any testing needs to be done on real hardware as it should be very easy to test on my end.

I’m afraid it won’t be that easy. In case u-boot is borked you soft-bricked your device and getting it back into working condition requires some extra hardware and some hours of your free-time.