MNT Reform: Open Source Portable Computer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines

  1. System Boot Details
  2. ===================
  3. Powering Up
  4. -----------
  5. When the power switch is turned on, the TinyRex module (the little red board that contains the i.MX6 and the memory chips) receives power. If it is happy with the applied voltages (POWEROK signals are present), the green LED on the TinyRex module will light up. If only the red LED lights up, there is a problem with the power supply.
  6. Next, the i.MX6 chip will jump to internal boot ROM code at memory address *0x00000000*. The boot ROM looks for an SD card on port SD1 and reads the DCD (Device Configuration Data) table from physical address 0x400 (1024 decimal, or the second physical block) on the SD card. This means that you can only use the MBR partition scheme on the boot disk, as it only occupies the first disk block. The more modern GPT partition format could work in theory, but most GPT tools and parsers do not understand GPT structures where the second block is in an alternative location.
  7. We recommend to use the SD card as a boot and rescue disk, and set up an mSATA SSD disk with your actual operating system and data. You can then use alternative partition schemes and encryption.
  8. Reform ships with U-Boot. It is installed onto the SD card and includes the DCD block that configures the DDR memory parameters and clocks.
  9. U-Boot
  10. ------
  11. U-Boot is a mini operating system and shell that allows you to inspect parts of the system (like PCIe, USB devices and Harddisks) and set up parameters to be passed to a "big" operating system kernel such as Linux, and start such an operating system.
  12. U-Boot itself has to be compiled with the board support files for Reform. This is done by The resulting file is u-boot.imx.
  13. U-Boot is installed to the second block of the SD card using the "dd" utility by
  14. U-Boot needs 2 files to boot Linux:
  15. - The Linux kernel itself, normally called "zImage".
  16. - The device tree blob (DTB), normally called "imx6qp-mntreform.dtb". It is a data structure that lists the addresses of and parameters for all the devices in the system that Linux needs to drive.
  17. Both files are created when building Linux from source with the "imx6qp-mntreform.dts" source file included in the kernel tree. The helper script from does it for you.
  18. Booting the Linux Kernel
  19. ------------------------
  20. Theoretically, you could boot other operating systems besides Linux, such as FreeBSD, NetBSD, OpenBSD or anything else that supports the i.MX6QP SoC. So far, we didn't have the time to test them, though. We'll happily expand this guide with your contributions if you've managed to run an alternative OS on Reform.
  21. The default boot commands for U-Boot are specified at
  22. If you want to boot manually, these are the steps.
  23. 1. Configure the kernel command line to use no initial ram disk, use the first partition of the first SD card as the root volume (read/write), and wait for the root device. Also, set the continuous memory allocation (CMA) pool to 256MB and disable message signaled interrupts (MSI) for PCI express. The CMA pool is needed by the etnaviv GPU drivers. MSI has to be disabled for some expansions like ath9k-based WiFi cards.
  24. .. code-block:: none
  25. setenv bootargs noinitrd root=/dev/mmcblk0p1 rw rootwait cma=256M pci=nomsi no_console_suspend=1
  26. 2. Set the maximum address/size for the device tree structure (called FDT in U-Boot, DTS/DTB in Linux). The kernel can fail to start without this.
  27. .. code-block:: none
  28. setenv fdt_high 0xffffffff
  29. 3. Load the Kernel (zImage) to address 0x10008000 from the SD card (also called "MMC") device 0, partition 1 (there is no partition 0, 1 is the first). ext4load works for ext4 formatted partitions. For FAT, you would use fatload.
  30. .. code-block:: none
  31. ext4load mmc 0:1 0x10008000 zImage
  32. 4. Load the device tree (FDT/DTB) to address 0x18000000 from the same partition.
  33. .. code-block:: none
  34. ext4load mmc 0:1 0x18000000 imx6qp-mntreform.dtb
  35. 5. Tell U-Boot where you just loaded the FDT and to please resize it.
  36. .. code-block:: none
  37. fdt addr 0x18000000
  38. fdt resize
  39. 6. Start Linux from the load address and pass the FDT address to it.
  40. .. code-block:: none
  41. bootz 0x10008000 - 0x18000000