1f8b1e86dSFabio EstevamU-Boot for the Freescale i.MX6q SabreLite board 2*4ab7ab0bSMartyn Welch=============================================== 3f8b1e86dSFabio Estevam 4f8b1e86dSFabio EstevamThis file contains information for the port of U-Boot to the Freescale 5f8b1e86dSFabio Estevami.MX6q SabreLite board. 6f8b1e86dSFabio Estevam 7f8b1e86dSFabio Estevam 8*4ab7ab0bSMartyn Welch1. Build 9*4ab7ab0bSMartyn Welch-------- 10*4ab7ab0bSMartyn Welch 11*4ab7ab0bSMartyn WelchTo build U-Boot for the SabreLite board: 12*4ab7ab0bSMartyn Welch 13*4ab7ab0bSMartyn Welch make mx6qsabrelite_config 14*4ab7ab0bSMartyn Welch make 15*4ab7ab0bSMartyn Welch 16*4ab7ab0bSMartyn Welch 17*4ab7ab0bSMartyn Welch2. Boot from SD card 18*4ab7ab0bSMartyn Welch-------------------- 19*4ab7ab0bSMartyn Welch 20*4ab7ab0bSMartyn WelchThe SabreLite boards boot from the SPI NOR flash. These boards need their SPI 21*4ab7ab0bSMartyn Welchto be reflashed with a small SD card loader to support boot from SD card. The 22*4ab7ab0bSMartyn Welchboard will still boot from SPI NOR, but the loader will in turn request the 23*4ab7ab0bSMartyn WelchBootROM to load the U-Boot from SD card. 24f8b1e86dSFabio Estevam 25f8b1e86dSFabio EstevamThe SD card loader is available from 26f8b1e86dSFabio Estevam 27f8b1e86dSFabio Estevamhttps://wiki.linaro.org/Boards/MX6QSabreLite 28f8b1e86dSFabio Estevam 29*4ab7ab0bSMartyn WelchThis is provided under a open-source 3-clause BSD license. 30f8b1e86dSFabio Estevam 31*4ab7ab0bSMartyn WelchTo following procedure can be used to update the SPI-NOR on the SabreLite 32*4ab7ab0bSMartyn Welchboard: 33f8b1e86dSFabio Estevam 34f8b1e86dSFabio Estevam1. Write this SD card loader onto a large SD card using: 35f8b1e86dSFabio Estevam 36f8b1e86dSFabio Estevam sudo dd if=iMX6DQ_SPI_to_uSDHC3.bin of=/dev/sXx 37f8b1e86dSFabio Estevam 38f8b1e86dSFabio Estevam Note: Replace sXx with the device representing the SD card in your system. 39f8b1e86dSFabio Estevam 40f8b1e86dSFabio Estevam Note: This writes SD card loader at address 0 41f8b1e86dSFabio Estevam 42f8b1e86dSFabio Estevam2. Put this SD card into the slot for the large SD card (SD3 on the bottom of 43f8b1e86dSFabio Estevam the board). Make sure SW1 switch is at position "00", so that it can boot 44f8b1e86dSFabio Estevam from the fuses. 45f8b1e86dSFabio Estevam 46f8b1e86dSFabio Estevam3. Power-up the SabreLite, press 'space' to enter command mode in the U-Boot 47f8b1e86dSFabio Estevam (the default one the board is shipped with, starting from the SPI NOR) and 48f8b1e86dSFabio Estevam enter the following commands: 49f8b1e86dSFabio Estevam 50f8b1e86dSFabio Estevam MX6Q SABRELITE U-Boot > mmc dev 0 51f8b1e86dSFabio Estevam MX6Q SABRELITE U-Boot > mmc read 0x10800000 0 200 52f8b1e86dSFabio Estevam MX6Q SABRELITE U-Boot > sf probe 53f8b1e86dSFabio Estevam MX6Q SABRELITE U-Boot > sf erase 0 0x40000 54f8b1e86dSFabio Estevam MX6Q SABRELITE U-Boot > sf write 0x10800000 0 0x40000 55f8b1e86dSFabio Estevam 56*4ab7ab0bSMartyn Welch4. Write the u-boot.imx produced during the U-Boot build to the SD card: 57f8b1e86dSFabio Estevam 58*4ab7ab0bSMartyn Welch sudo dd if=u-boot.imx of=/dev/sXx bs=512 seek=2 && sudo sync 59*4ab7ab0bSMartyn Welch 60*4ab7ab0bSMartyn Welch Note: Replace sXx with the device representing the SD card in your system. 61*4ab7ab0bSMartyn Welch 62*4ab7ab0bSMartyn Welch5. Re-insert the SD card back in the slot for the large SD card and power-cycle 63*4ab7ab0bSMartyn Welch the board. 64f8b1e86dSFabio Estevam 65f8b1e86dSFabio EstevamNote: The board now boots from full size SD3 on the bottom of the board. NOT 66f8b1e86dSFabio Estevam the micro SD4/BOOT slot on the top of the board. I.e. you have to use 67f8b1e86dSFabio Estevam full size SD cards. 68f8b1e86dSFabio Estevam 69*4ab7ab0bSMartyn WelchThis information originally taken from: 70f8b1e86dSFabio Estevam 71f8b1e86dSFabio Estevam https://wiki.linaro.org/Boards/MX6QSabreLite 72f8b1e86dSFabio Estevam 73f8b1e86dSFabio Estevam 74*4ab7ab0bSMartyn Welch3. Boot from SPI NOR 75*4ab7ab0bSMartyn Welch-------------------- 76f8b1e86dSFabio Estevam 77*4ab7ab0bSMartyn WelchThe SabreLite board can also boot U-Boot directly from the SPI NOR flash: 78f8b1e86dSFabio Estevam 79*4ab7ab0bSMartyn Welch1. Power-up the SabreLite, press 'space' to enter command mode in the U-Boot 80*4ab7ab0bSMartyn Welch and enter the following commands: 81f8b1e86dSFabio Estevam 82*4ab7ab0bSMartyn Welch => mmc dev 0 83*4ab7ab0bSMartyn Welch => mmc read 0x10800000 0x400 0x80000 84*4ab7ab0bSMartyn Welch => sf probe 0 85*4ab7ab0bSMartyn Welch => sf erase 0 0xc0000 86*4ab7ab0bSMartyn Welch => sf write 0x10800000 0x400 0x80000 87f8b1e86dSFabio Estevam 88*4ab7ab0bSMartyn WelchNote: This procedure assumes you have booted using the desired U-Boot from an 89*4ab7ab0bSMartyn Welch SD card as prepared in the previous section. Alternative mechanisms, such 90*4ab7ab0bSMartyn Welch as using tftpboot to copy an alternative U-Boot image into memory can 91*4ab7ab0bSMartyn Welch also be used. 92*4ab7ab0bSMartyn Welch 93*4ab7ab0bSMartyn Welch 94*4ab7ab0bSMartyn Welch4. Recovering SPI-NOR 95*4ab7ab0bSMartyn Welch--------------------- 96*4ab7ab0bSMartyn Welch 97*4ab7ab0bSMartyn WelchIn case you somehow do not succeed with this procedure you can upload U-Boot 98*4ab7ab0bSMartyn Welchvia USB: 99*4ab7ab0bSMartyn Welch 100*4ab7ab0bSMartyn Welch1. Download and install the imx_loader following the instructions provided: 101*4ab7ab0bSMartyn Welch 102*4ab7ab0bSMartyn Welch https://github.com/boundarydevices/imx_usb_loader 103*4ab7ab0bSMartyn Welch 104*4ab7ab0bSMartyn Welch2. Connect the board to USB via the USB OTG port. 105*4ab7ab0bSMartyn Welch 106*4ab7ab0bSMartyn Welch3. Make sure SW1 switch is at position "01", so that it can boot from USB OTG. 107*4ab7ab0bSMartyn Welch 108*4ab7ab0bSMartyn Welch4. Power-up the SabreLite and run the imx_loader to upload the U-Boot image: 109*4ab7ab0bSMartyn Welch 110*4ab7ab0bSMartyn Welch sudo imx_usb u-boot.imx 111*4ab7ab0bSMartyn Welch 112*4ab7ab0bSMartyn WelchNote: This will upload and run the U-Boot image in memory, the SPI will not be 113*4ab7ab0bSMartyn Welch reprogrammed and this procedure will need to be repeated if the board is 114*4ab7ab0bSMartyn Welch reset. 115*4ab7ab0bSMartyn Welch 116*4ab7ab0bSMartyn Welch5. Use one of previous descriptions to re-flash the SPI-NOR as required. 117*4ab7ab0bSMartyn Welch 118*4ab7ab0bSMartyn Welch6. Ensure SW1 is returned to "00" to boot from the fuses once done. 119*4ab7ab0bSMartyn Welch 120