How do I create a bootable image?

Is there any secret to making an image bootable for the mnt reform, to put on my SSD. I’ve been browsing the mntmn/reform-bootstrap repository, and there are a few things I’m not clear on. I notice that it includes compiling uboot into the image, but this doesn’t seem like it would be necessary if I’m already using uboot from the embedded flash memory.

I’ve been doing my own research, and it seems I’m supposed to use mkimage from u-boot-tools in the Debian repository. However, i don’t know where to begin finding the parameters I’m supposed to use with it.

Or am I just overthinking everything and any image should work assuming it has a working kernel?

I haven’t experimented much with this myself, but I think if you’ve got uBoot on the embedded flash memory, you should be able to boot any image with a kernel configured for the Reform’s hardware. AFAICT, the first image loaded is the only one with constraints: it has to be offset some amount and the image(s) for the ARM core(s) have to be preceded by the firmware images for the System Controller and the Security Controller. (Here’s the documentation on the boot process.) Once you’re in uBoot, though, you should be able to boot any image uBoot can boot.


Aha, thank you. It’ll take me a little bit to get things right, and will be unable to play with it for a few days, but being able to eliminate that as a problem has helped me a great deal.

Mntmn fixed my problem. I was a unique case, where I had already switched over to the default linux install and uboot on the emmc memory. This is the install with uboot you can only get to by taking off the heat sink and manually switching the dip switch on the SoM.

Trying to boot to this emmc memory with uboot and then to the sd card wasn’t supported by the default boot script. My actual file system was fine.

The fix involves modifing the reform-init script in the /sbin directory on the emmc memory. The following code needs to be inserted before line 28, before the final else clause:

elif [ "$BOOTPREF" == "sd" ]; then
	echo "Booting from SD."

the final if-else statement should look like this:

# Check config
if [ "$BOOTPREF" == "usb" ]; then
	echo "Booting from USB storage in 3 seconds."
elif [ "$BOOTPREF" == "nvme" ]; then
	echo "Booting from NVMe SSD."
elif [ "$BOOTPREF" == "sd" ]; then
	echo "Booting from SD."
	# Default. Boot from SD card (already mounted by kernel).
	echo "Booting from SD card (or eMMC)."
	exec /sbin/init