Migration from i.MX8MPlus to A311D

so you still have to have the sd card inserted? whats the benefit of moving to eMMC?
if both u-boot and /boot would reside on eMMC without the need for the sd card, that would be welcome improvement and “feature parity” with the default module.

Indeed; I plan to try and move uboot onto emmc, too, but I’m taking one step at a time

I believe I am now successfully loading uboot (in addition to mounting /boot, see above) from emmc. Here’s what I did:

  • I created one of these devices in case I need to recover. I bought the device from the linked aliexpress listing and modified it according to the instructions on the page. N.b. you will also need a microhdmi adapter, and before using i2c-tools on the pocket reform you’ll need to sudo modprobe i2c-dev.
  • I made a copy of reform-flash-uboot and added the following lines after the lines sourcing the machine details, i.e. line 31 on my version:
EMMC_USE=true
EMMC_BOOT=true
  • I ran that copy of reform-flash-uboot:
sudo ./reform-flash-uboot emmc

I was then able to remove the sd card and boot normally.

For future reference, the details for the current uboot binary I’m now booting with on pocket reform are as follows:

# the current u-boot hashes from source.mnt.re
UBOOT_SHA1="c85f532eb0559b5fc3db20271027239531c77698"
UBOOT_PROJECT="reform-a311d-uboot"
UBOOT_TAG="2024-08-01"
UBOOT_OFFSET=512
FLASHBIN_OFFSET=512

I did not need to alter the uboot or flashbin offsets.

3 Likes

I just tested this with an A311D already installed an did the following steps as root to eliminate the SD card.

sfdisk /dev/mmcblk1 <<EOF
size=1048576, type=83
type=83
EOF
mkfs.ext4 /dev/mmcblk1p1

umount /boot
mount "/dev/mmcblk1p1" /boot/
apt install --reinstall linux-image-6.10.9-mnt-reform-arm64

edited /etc/fstab

-/dev/mmcblk0p1 /boot auto errors=remount-ro 0 1
+/dev/mmcblk1p1 /boot auto errors=remount-ro 0 1

edited /sbin/reform-boot-config after line 30 with

EMMC_USE=true

ran it with the following command

reform-boot-config --emmc /dev/reformvg/root

then edited /sbin/reform-flash-uboot after line 31 with

EMMC_USE=true
EMMC_BOOT=true

then ran it with the following command

reform-flash-uboot emmc

shut down the system, removed the sd card and started it up again to see the LUKS unlock message and was happy :smiley:

so thank you deianara for the valuable prework!

3 Likes

Thank you all!

Since it seems that it is not possible to edit old messages after some time passed (I guess that’s the reason?) how about we maintaine the steps to migrate in a wiki page instead of using this forum?

I started this: Migration · Wiki · Reform / reform-system-image · GitLab

4 Likes

Is it possible to use a wiki post on this forum? I wouldn’t necessarily think to look under reform-system-image to find this

I have no idea how to do a wiki post on this forum – do you?

2 Likes

You need trust level 3, which I don’t (yet :slightly_smiling_face:) have

Uuuuh that sounds useful!

@minute could we have the option to create wiki posts on this discourse as well?

2 Likes

trust level 3… me neither

So according to the above, I might just be missing the “given 30 likes in the past 100 days” requirement for trust level 3. That requirement seems quite arbitrary. For small communities, 30 likes is a lot. I’ll not go around and like every new post just because i want to raise my “trust”…

4 Likes

I’ve now marked your post as a wiki post. Have fun! :slight_smile:

3 Likes

Hi – I’ve been really busy with projects, and using my Pocket with the i.mx8m-- processor without problems, and have been threatening to upgrade to the A311D board I already have, sitting on my desk staring back at me…

And honestly following this thread has been daunting, it looks like there’s a lot that can go wrong including semi-bricking. And so I have been loathe to start.

But it the process laid out in the wiki (Migration · Wiki · Reform / reform-system-image · GitLab) seems straightened out. I’m moderately skilled but not up on linux CPU and system geekery.

But I’m NOT using an encrypted filesystem, and hadn’t planned to. My usage case doesn’t warrant it and I would rather not add complexity that doesn’t benefit me. A second passphrase at boot does not thrill me, also, but then I’m not confident to pick apart the script to remove the encrypted fs stuff.

In the mean time my Pocket is just great. Not quite sure what to do at this point.

I just looked and found the rk3588 upgrade kit, it’s a lot more affordable than it was 6 months ago, and shorter delivery time. A smaller part of my hesitation is that the A311D isn’t that big of an improvement (in my big Reform). I may defer a bit and do that instead.

That wiki page content was outdated. I just updated it.

I wrote the reform-emmc-bootstrap tool in the beginning of January 2025 which automates the whole thing. It should work with an unencrypted setup on SSD as well. Please report bugs if you find any. Thanks!

4 Likes

if I have the most recent version of reform-tools installed. Isn’t reform-emmc-bootstrap be included in that package?

Yes, reform-tools version 1.67 or later ships with it.

I’m having an issue running reform-emmc-bootstrap. When I run it, I get the following error

I: no partition table found trying to open LUKS device
Device reform_crypt already exists.
     Logical volume reformvg/swap in use.
     Can't deactivate volume group "reformvg" with 2 open logical volume(s)

I’m not sure how to proceed. What are the prerequisites to running reform-emmc-boostrap?

This sounds like you are booting an encrypted system. The name suggests that reform-setup-encrypted-nvme was used to create it. Are you running reform-emmc-bootstrap from a system you booted from SSD and if yes, then everything seems to be running fine. Why are you trying to run reform-emmc-bootstrap?

If my assesment is incorrect, please provide more context of your problem.

Maybe I’m doing this all wrong. I have the A311D upgrade kit and I must be starting in the wrong place. I’ve looked at this thread and the wiki, but I’m not sure where to start. Is there a one single place for the documentation for this upgrade? Sorry in advance if I missed it.