Run uBoot on an empty module (a fresh module just coming from production)

We need to do some changes in the config files. Follow these steps:
1. Open “Mfgtools-Rel-4.1.0_130816_MX6Q_UPDATER\Profiles\MX6Q Linux Update\OS Firmware\ucl2.xml“
2. Find “LIST name=”Sabre-SD-K3.5.7″ desc=”Choose SD as media for kernel 3.5.7″ and just above this line place:

4. The next step is to prepare TFTP client software for file transfer between Linux host computer and your Windows computer. Download & Install TFTPD32 on your local Windows machine.

After the installation, go to “Mfgtools-Rel-4.1.0_130816_MX6Q_UPDATER\Profiles\MX6Q Linux Update\OS Firmware\” and create an empty u-boot.bin file

5. Set TFTPD32 as you can see on the screenshot – use your Linux host IP, set your Mfgtools directory and press “GET” button. Then you need check if the u-boot from Linux host was uploaded to your Windows “Mfgtools-Rel-4.1.0_130816_MX6Q_UPDATER\Profiles\MX6Q Linux Update\OS Firmware\” directory (e.g. compare size of these two files):

6. Connect iMX6 Rex micro USB (J21) with your Windows computer. If your module is completely new, JP2 must not be fitted. If you have already programmed efuses, JP2 must be fitted. The USB series resistors must be in positions: R62 Fitted / R65 Fitted / R63 Not Fitted / R67 Not Fitted.

Programming eFuses on very fresh module (only once)

To be able to run the uBoot automaticaly from SPI, you need to program eFuses. Run these commands from uBoot. It’s very important you do it exactly this way – otherwise your module may never boot up.

//!!BEAWARE: Once you blow a bit to 1, it can NOT be changed back to 0!!
//BE SURE YOU ARE DOING IT RIGHT - THIS IS THE CORRECT SETTING FOR iMX6 REX SPI BOOT
//THE iMX6 REX SPI IS CONNECTED TO ECSPI3 and CS2
//for IMX6 REX, YOU MUST DO IT EXACTLY THIS WAY:
> imxotp blow --force 5 0x2A000030
> imxotp blow --force 6 0x10

Program eFuses to set the MAC address. Be sure that you set the correct address – it cannot be changed back.

//!!BEAWARE: Once you blow a bit to 1, it can NOT be changed back to 0!!
//USE YOUR MAC ADDRESS!!!!, this is just en example
// example MAC Address: 00:0d:15:00:bc:4a
> imxotp blow --force 23 0x000d
> imxotp blow --force 22 0x1500bc4a

Help! uBoot doesnt boot up.

If you accidentally flash a wrong u-boot, you can boot up through the USB cable and reflash it with a working one. Just follow the “Run uBoot on an empty module” steps.

Booting uBoot from an SD card

iMX6 Rex always boots up from the on-module SPI (this is defined by eFuses). Sometimes, you may want to boot uBoot from SD card. Follow these steps to do so:

To prepare a SD card, download cfimager, download uboot (depending on your module configuration use 1GB, 2GB or 512MB uboot version). Do not forget to rename uboot and the name of the card reader drive letter (located at the end of the command e.g. G). Use this command in Windows command prompt:

cfimager.exe -raw -offset 0x400 -skip 0x400 -f u-boot.bin -d G

Insert the SD card into the slot on the board edge (J29) – SD3 Interface. Now you have two options.

Option 1 – run this command from uBoot

> mw.l 0x020d8040 0x3040; mw.l 0x020d8044 0x10000000; reset

Option 2 – reflash SPI with iMX6DQ_SPI_to_uSDHC3.bin
Download iMX6DQ_SPI_to_uSDHC3.bin (originally from here) to your host machine and place it to the /tftp directory.

Booting Windows from an SD card

To prepare an SD card, download cfimager. You will also need your eboot.nb0 and NK.nb0 files. Insert the SD card into your computer and check the sd card letter (in our case, the SD card is visible as G drive, dont forget to replace the G in the commands below with the letter as your SD card was recognized). Then run these commands.

First save eboot.nb0 to SD card:

cfimager.exe -f eboot.nb0 -d G -imx53 -a

then save NK.nb0

cfimager.exe -f NK.nb0 -d G -imx53

Remove the SD card from your computer and plug it into the edge SD slot of your iMX6 Rex board. Cancel the u-boot autoboot and insert these commands: