===== How to use eMMC Boot Partitions =====
**Please Note:**\\
The following instructions have been tested on the\\
* TQMa6x BSP REV.113
* TQMa7x BSP REV.105
* TQMa6ULx BSP REV.105
Besides the user area an emmc device also offers two dedicated boot partitions to store the U-Boot bootloader. This tutorial describes how to use these boot partitions with the TQ modules.\\
\\
==== Prerequisites ====
* Configured TFTP Server on the development host to upload the U-Boot to the target hardware, please see [[en:general_information:tftp|how to setup TFTP Server]]
* u-boot binary to store (e.g. u-boot.bin)
* Set Starterkit DIP switches to eMMC boot, please see
* [[intern:arm:tqma6x:mba6x:dip_switches|TQMa6x DIP switch settings]]
* [[intern:arm:tqma7x:mba7x:dip_switches|TQMa7x DIP switch settings]]
* [[intern:arm:tqma6ulx:mba6ulx:dip_switches|TQMa6ULx DIP switch settings]]
\\
==== Flash Boot Partitions ====
== 1. Interrupt Boot process in U-Boot and set u-boot environment variable if deviating from default==
setenv uboot
++++ Example |
setenv uboot uboot.bin
++++
\\
== 2. Set U-Boot Network Configuration ==
Please see [[en:general_information:tutorial:update_firmware_tftp|how to set up network configuration]]\\
\\
== 3. Load U-Boot file via TFTP ==
Load the u-boot binary as shown below.
tftp ${uboot}
\\
== 4. Set block count expression in U.Boot ==
setexpr bc ${filesize} + 1ff
setexpr bc ${bc} / 200
\\
== 5. Write u-boot binary to boot partitions ==
++++ boot partition 1 |
mmc dev ${mmcdev} 1
mmc write ${loadaddr} 2 ${bc}
++++
++++ boot partition 2 |
mmc dev ${mmcdev} 2
mmc write ${loadaddr} 2 ${bc}
++++
\\
== 6. Return to the User Area ==
mmc dev ${mmcdev} 0
\\
==== Boot from Partitions ====
After writing u-boot binary, select arcording eMMC Boot partition.\\
\\
**User Area boot (default)**
mmc partconf ${mmcdev} 0 0 0
\\
**Boot Partition 1**
mmc partconf ${mmcdev} 0 1 0
\\
**Boot Partition 2**
mmc partconf ${mmcdev} 0 2 0
\\
Reset the System to make the changes effective