Denis 'GNUtoo' Carikli | f3767bc | 2020-05-30 05:24:25 +0200 | [diff] [blame] | 1 | TBS2910 Matrix ARM miniPC |
| 2 | ========================= |
| 3 | |
| 4 | Building |
| 5 | -------- |
| 6 | To build u-boot for the TBS2910 Matrix ARM miniPC, you can use the following |
| 7 | procedure: |
| 8 | |
| 9 | First add the ARM toolchain to your PATH |
| 10 | |
| 11 | Then setup the ARCH and cross compilation environment variables. |
| 12 | |
| 13 | When this is done you can then build u-boot for the TBS2910 Matrix ARM miniPC |
| 14 | with the following commands: |
| 15 | |
| 16 | .. code-block:: none |
| 17 | |
| 18 | make mrproper |
| 19 | make tbs2910_defconfig |
| 20 | make |
| 21 | |
| 22 | Once the build is complete, you can find the resulting image as u-boot.imx in |
| 23 | the current directory. |
| 24 | |
| 25 | UART |
| 26 | ---- |
| 27 | The UART voltage is at 3.3V and its settings are 115200bps 8N1 |
| 28 | |
| 29 | BOOT/UPDATE boot switch: |
| 30 | ------------------------ |
| 31 | The BOOT/UPDATE switch (SW11) is connected to the BOOT_MODE0 and |
| 32 | BOOT_MODE1 SoC pins. It has "BOOT" and "UPDATE" markings both on |
| 33 | the PCB and on the plastic case. |
| 34 | |
| 35 | When set to the "UPDATE" position, the SoC will use the "Boot From Fuses" |
| 36 | configuration, and since BT_FUSE_SEL is 0, this makes the SOC jump to serial |
| 37 | downloader. |
| 38 | |
| 39 | When set in the "BOOT" position, the SoC will use the "Internal boot" |
| 40 | configuration, and since BT_FUSE_SEL is 0, it will then use the GPIO pins |
| 41 | for the boot configuration. |
| 42 | |
| 43 | SW6 binary DIP switch array on the PCB revision 2.1: |
| 44 | ---------------------------------------------------- |
| 45 | On that PCB revision, SW6 has 8 positions. |
| 46 | |
| 47 | Switching a position to ON sets the corresponding |
| 48 | register to 1. |
| 49 | |
| 50 | See the following table for a correspondence between the switch positions and |
| 51 | registers: |
| 52 | |
| 53 | =============== ============ |
| 54 | Switch position Register |
| 55 | =============== ============ |
| 56 | 1 BOOT_CFG2[3] |
| 57 | 2 BOOT_CFG2[4] |
| 58 | 3 BOOT_CFG2[5] |
| 59 | 4 BOOT_CFG2[6] |
| 60 | 5 BOOT_CFG1[4] |
| 61 | 6 BOOT_CFG1[5] |
| 62 | 7 BOOT_CFG1[6] |
| 63 | 8 BOOT_CFG1[7] |
| 64 | =============== ============ |
| 65 | |
| 66 | For example: |
| 67 | |
| 68 | - To boot from the eMMC: 1:ON , 2:ON, 3:ON, 4:OFF, 5:OFF, 6:ON, 7:ON, 8:OFF |
| 69 | - To boot from the microSD slot: 1: ON, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:OFF, |
| 70 | 7:ON, 8:OFF |
| 71 | - To boot from the SD slot: 1: OFF, 2: ON, 3: OFF, 4: OFF, 5:OFF, 6:OFF, 7:ON, |
| 72 | 8:OFF |
| 73 | - To boot from SATA: 1: OFF, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:ON, 7:OFF, 8:OFF |
| 74 | |
| 75 | You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for |
| 76 | additional details. |
| 77 | |
| 78 | SW6 binary DIP switch array on the PCB revision 2.3: |
| 79 | ---------------------------------------------------- |
| 80 | On that PCB revision, SW6 has only 4 positions. |
| 81 | |
| 82 | Switching a position to ON sets the corresponding |
| 83 | register to 1. |
| 84 | |
| 85 | See the following table for a correspondence between the switch positions and |
| 86 | registers: |
| 87 | |
| 88 | =============== ============ |
| 89 | Switch position Register |
| 90 | =============== ============ |
| 91 | 1 BOOT_CFG2[3] |
| 92 | 2 BOOT_CFG2[4] |
| 93 | 3 BOOT_CFG2[5] |
| 94 | 4 BOOT_CFG1[5] |
| 95 | =============== ============ |
| 96 | |
| 97 | For example: |
| 98 | |
| 99 | - To boot from the eMMC: 1:ON, 2:ON, 3:ON, 4:ON |
| 100 | - To boot from the microSD slot: 1:ON, 2:OFF, 3:OFF, 4:OFF |
| 101 | - To boot from the SD slot: 1:OFF, 2:ON, 3:OFF, 4:OFF |
| 102 | |
| 103 | You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for |
| 104 | additional details. |
| 105 | |
| 106 | Loading u-boot from USB: |
| 107 | ------------------------ |
| 108 | If you need to load u-boot from USB, you can use the following instructions: |
| 109 | |
| 110 | First build imx_usb_loader, as we will need it to load u-boot from USB. This |
| 111 | can be done with the following commands: |
| 112 | |
| 113 | .. code-block:: none |
| 114 | |
| 115 | git clone git://github.com/boundarydevices/imx_usb_loader.git |
| 116 | cd imx_usb_loader |
| 117 | make |
| 118 | |
| 119 | This will create the resulting imx_usb binary. |
| 120 | |
| 121 | When this is done, you can copy the u-boot.imx image that you built earlier |
| 122 | in in the imx_usb_loader directory. |
| 123 | |
| 124 | You will then need to power off the TBS2910 Matrix ARM miniPC and make sure that |
| 125 | the boot switch is set to "UPDATE" |
| 126 | |
| 127 | Once this is done you can connect an USB cable between the computer that will |
| 128 | run imx_usb and the TBS2910 Matrix ARM miniPC. |
| 129 | |
| 130 | If you also need to access the u-boot console, you will also need to connect an |
| 131 | UART cable between the computer running imx_usb and the TBS2910 Matrix ARM |
| 132 | miniPC. |
| 133 | |
| 134 | Once everything is connected you can finally power on the TBS2910 Matrix ARM |
| 135 | miniPC. The SoC will then jump to the serial download and wait for you. |
| 136 | |
| 137 | Finlay, you can load u-boot through USB with with the following command: |
| 138 | |
| 139 | .. code-block:: none |
| 140 | |
| 141 | sudo ./imx_usb -v u-boot.imx |
| 142 | |
| 143 | The u-boot boot messages will then appear in the serial console. |
| 144 | |
| 145 | Install u-boot on the eMMC: |
| 146 | --------------------------- |
| 147 | To install u-boot on the eMMC, you first need to boot the TBS2910 Matrix ARM |
| 148 | miniPC. |
| 149 | |
| 150 | Once booted, you can flash u-boot.imx to mmcblk0boot0 with the |
| 151 | following commands: |
| 152 | |
| 153 | .. code-block:: none |
| 154 | |
| 155 | sudo echo 0 >/sys/block/mmcblk0boot0/force_ro |
| 156 | sudo dd if=u-boot.imx of=/dev/mmcblk0boot0 bs=1k seek=1; sync |
| 157 | |
| 158 | Note that the eMMC card node may vary, so adjust this as needed. |
| 159 | |
| 160 | Once the new u-boot version is installed, to boot on it you then need to power |
| 161 | off the TBS2910 Matrix ARM miniPC. |
| 162 | |
| 163 | Once it is off, you need make sure that the boot switch is set to "BOOT" and |
| 164 | that the SW6 switch is set to boot on the eMMC as described in the previous |
| 165 | sections. |
| 166 | |
| 167 | If you also need to access the u-boot console, you will also need to connect an |
| 168 | UART cable between the computer running imx_usb and the TBS2910 Matrix ARM |
| 169 | miniPC. |
| 170 | |
| 171 | You can then power up the TBS2910 Matrix ARM miniPC and U-Boot messages will |
| 172 | appear in the serial console. |
| 173 | |
| 174 | Booting a distribution: |
| 175 | ----------------------- |
| 176 | When booting on the TBS2910 Matrix ARM miniPC, by default U-Boot will first try |
| 177 | to boot from hardcoded offsets from the start of the eMMC. This is for |
| 178 | compatibility with the stock GNU/Linux distribution. |
| 179 | |
| 180 | If that fails it will then try to boot from several interfaces using |
| 181 | 'distro_bootcmd': It will first try to boot from the microSD slot, then the |
| 182 | SD slot, then the internal eMMC, then the SATA interface and finally the USB |
| 183 | interface. For more information on how to configure your distribution to boot, |
| 184 | see 'README.distro'. |
| 185 | |
| 186 | Links: |
| 187 | ------ |
| 188 | - https://www.tbsdtv.com/download/document/tbs2910/TBS2910-Matrix-ARM-mini-PC-SCH_rev2.1.pdf |
| 189 | - The schematics for the revision 2.1 of the TBS2910 Matrix ARM miniPC. |
| 190 | - https://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf - The |
| 191 | SoC reference manual for additional details on the BOOT_CFG registers. |