No need to be sorry! If you donāt find the documentation, then even if it exists, it might also be a problem with how findable it is. In case of A311D, a document for how to upgrade the hardware only very recently was uploaded: https://mntre.com/documentation/pocket-reform-rcm4-bpi-upgrade-manual.pdf
As for the software side, the reform-emmc-bootstrap script is also only a very recent addition so it cannot be part of the handbook, for example. Do you have your OS on your NVMe SSD? In that case, the upgrade process theoretically is that you first swap out the module. That will remove the /boot partition from your OS on NVMe. So for now, your existing OS on NVMe cannot be booted anymore. So you flash the latest system image on a new sd-card and boot that. From that installation you can then run reform-emmc-bootstrap which will attempt to populate the eMMC of your new module with a /boot partition that can boot your existing OS on your NVMe SSD.
If you need more details or if you run into problems as you run reform-emmc-bootstrap please shout! The reform-emmc-bootstrap script is very new and it is not unlikely that there are still bugs.
Hereās where I am now. Iāve swapped out the module and booted from an SD using the system image from the Gitlab link above. Iām now booted into the SD card and have run reform-emmc-bootstrap Iām running into this error after the script has run.
E: writting to eMMC not supported on MNT Pocket Reform with BPI-CM4 Module
Iāve read that this is an issue with BPI-CM4
I have my OS installed on my NVME, does reform-emmc-bootstrap have an option to install the boot partition to my NVME or do I need to use a different tool?
Edit: Additional note
My OS is on the NVME, but my boot was on the old SOC. The /boot folder in my NVME is empty.
The reason for forbidding this is, that if something should go wrong and you flash a broken u-boot, then you soft-brick your device because A311D only loads u-boot from eMMC and since your u-boot is broken you cannot boot a rescue image to fix your u-boot. In that situation, you would use extra hardware to restore your A311D. If you are fine with that risk, you can edit /usr/share/reform-tools/machines/MNT Pocket Reform with BPI-CM4 Module.conf and replace EMMC_USE=false with EMMC_USE=true.
Having /boot on NVMe is only useful if u-boot is able to read from your NVMe which best to my knowledge it is not (yet).
Yes, because your u-boot on i.MX 8M+ also is unable to read your NVMe, so /boot was on eMMC and you need a folder in your root filesystem to mount the /boot partition into.
Yes, I have an A311D in my classic Reform and have /boot and u-boot both on my eMMC. I did not use reform-emmc-bootstrap but the āscaryā part is flashing u-boot and that is done by the reform-flash-uboot script (reform-emmc-bootstrap calls that) and I have used that to flash my u-boot.
Hrmā¦ I thought somebody had written about this in this forum but I fail to find that postā¦ Maybe somebody else knows?
Yes. reform-emmc-bootstrap will use parted to create a partition table and an ext4 formatted partition for /boot on it.
I swapped in the A311D module (and installed the new aluminum heatsink plate I got from JLCNC!), powered onā¦ screen stayed black.
Reinstalled the i.mx8m board, now it does not boot, black screen. (Yes, HYPER and return to power on : - )
I take it the reform-emms-boostrap script was to be run on the i.mx8M cpu, in hindsight? The new document at (https://mntre.com/documentation/pocket-reform-rcm4-bpi-upgrade-manual.pdf) says āprocessor modules come preinstalled with Debianā leading me to believe boot is on the CPU module. So I guess Iām confused.
About the only thing that could go wrong physically is the tiny ribbon cable and itās connector. Iām experienced with electronics, have used these connectors before, I was abundantly delicate. Only the usual nominal small force needed to operate the latch (push/pull lateral for i.mx8m, tilt up for a311d).
Powering off was tricky, I ended up using the battery switch. Off then on seemed to reset the keyboard processor OK.
Sooo it depends when/where you got your A311D module from. If we recently sent it to you from MNT shop, then it has a system preinstalled and doesnāt need any prep just to test it out. Be sure not to have a MicroSD inserted at that point. On the other hand, you can try with a freshly imaged MicroSD card from http://mntre.com/system-image (pocket-reform-system-a311d.img.gz) as well. U-boot on the A311D moduleās eMMC flash will pick that up.
If you got the module from Crowd Supply or Mouser or a long time ago from us, then it wonāt have an OS preinstalled, just an older u-boot IIRC. This then requires booting from MicroSD (same link to image above).
The next step would be serial debugging to see whatās going on. For that you just need a USB-UART adapter with dupont leads and another computer with a terminal program like tio. You can connect the adapter (see Pocket Reform handbook) to the serial port 2 RX/TX/GND pins (leftmost IIRC) and do tio /dev/ttyACM0 -b 115200 on your other machine, then turn on Pocket Reform and report back what you see in the terminal.
Ahh, I got the A311D more than 6 months ago, so no boot. That explains that.
I downloaded that A311d system image and ddād it onto a 64gb microSD as usual, and that is installed in the slot during my tests.
I ran the machine with A311D installed and the cover off, to watch LEDs. (I kept my finger on the chip to watch for temperature rise, it barely noticably warmed).
WITH microSD installed, on power-on green LED, one red LED lit. Approx ~2 seconds, two flashes on the SSD, another ~ 2 seconds the other red LED lit, and blinks OFF two times, and repeats. A diagnostic I assume.
So it looked like it was trying to bootā¦ so I downloaded the image again (given itās length, Iād deleted it from ~/Downloads), repeated the dd on the same microSD, and now itās booted.
(initramfs complains that /dev/mmcblk0p2 needs manual fsck but Iāll take it from here.)
I am reliably booting my Pocket with A311D, but only from /dev/mmcblk0 which is what itās calling the microSD slot. It contains p1 as /boot and p2 as /. I can see also
/dev/mmcblk1boot0 (4 mb)
/dev/mmcblk1boot1 (4 mb)
reform-emmc-bootstrap complains:
mount: /tmp/reform-emmc-bootstrap.Us0ott5MM1/dev: mount point does not exist.
and will not proceed.
Iāve read the entire thread here, and honestly, thereās too many side stories to parse. I take it mmcblk1 is the internal small bootstrap device and from the dire warnings about a bad flash of it I am reluctant to poke about.
Is there a straightforward method from here to boot from emmc?
root@pix:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mmcblk0 179:0 0 57.9G 0 disk
āāmmcblk0p1 179:1 0 488M 0 part /boot
āāmmcblk0p2 179:2 0 57.4G 0 part /
nvme0n1 259:0 0 931.5G 0 disk
āānvme0n1p1 259:1 0 931.5G 0 part
mmcblk1 179:256 0 14.6G 0 disk
mmcblk1boot0 179:512 0 4M 1 disk
mmcblk1boot1 179:768 0 4M 1 disk
I assume mmcblk1 is the EMMC. The partitions are bad; parted says the drive is ~16GB, what Iād expect. The two 4MB parts canāt be mounted (āwrong fs type, bad option, etcā).
This is EMMC attached to the A311D board, right? And has not been partitioned and mkfs yet?
I canāt find mention of how to partition it, if indeed I should do it manually. /boot and /?
I know that if the EMMC /boot ālooks bootableā but is not Iāve soft-bricked the board, hence my hesitancy.
Iād be just as happy booting from the nvme. reform-boot-config seems to offer microSD or emmc as options.
You can always check what is what by platform by looking into (in your case) /usr/share/reform-tools/machines/MNT Reform 2 with BPI-CM4 Module.conf. The value mmcblk1 is associated with the variable DEV_MMC, so yes, this is your eMMC.
That is how it looks like, yes.
you can run reform-flash-rescue which should get your eMMC back to āfactoryā settings by downloading and flashing the latest image
you can manually create a partition on your eMMC, mount your SSD somewhere mount eMMC into boot, chroot into it, restore /boot etc
or automate the last point by running reform-emmc-bootstrap
In one of your last posts you write:
This sounds like what reform-emmc-bootstrap thinks is your rootfs does not actually contain a rootfs. Can you re-run reform-emmc-bootstrap with increased verbosity like this: sudo sh -x /usr/bin/reform-emmc-bootstrap and paste the output here to better understand what is going on?
I think itās also very legitimate to start a new thread for your own problem to not get it mixed up with the others. It is also very hard for me to remember who had which problem and who was how far into solving it and what the special circumstances were each time.
No, you soft-bricked your a311d if your u-boot on eMMC looks bootable but actually does not do the right thing. If your u-boot on eMMC is not broken and thus does the wrong thing, then it will prefer booting the SD-card over eMMC. So even if you mess up the first partition of your eMMC, you can pop an SD-card back in and repair things.
Totally correct ā it was bad thread hygiene for me to extend this thread.
OK now I see that the mktemp failedā¦ the script was run from /rootā¦ I donāt normally login root, always user then sudo. But given new system and no home mounted I logged in root.
Iāll examine reform-flash-rescue and see what it does and maybe try it soon.
reform-bootstrap-emmc saw that you have a single partition on your SSD and assumed that to be your root file system. But there seems to be no /dev directory on that filesystem. Can you confirm?
mktemp did not fail. What failed is to bind-mount your /dev into the ādevā directory of your root file system on the SSD. I will add some more checks to abort early with a more meaningful error message.