Otavio Salvador | d714035 | 2015-11-19 19:02:36 -0200 | [diff] [blame] | 1 | U-Boot for the Congatec QMX6 boards |
SARTRE Leo | 9b75bad | 2013-06-03 23:30:36 +0000 | [diff] [blame] | 2 | |
| 3 | This file contains information for the port of U-Boot to the Congatec |
Otavio Salvador | d714035 | 2015-11-19 19:02:36 -0200 | [diff] [blame] | 4 | QMX6 boards. |
SARTRE Leo | 9b75bad | 2013-06-03 23:30:36 +0000 | [diff] [blame] | 5 | |
Otavio Salvador | d714035 | 2015-11-19 19:02:36 -0200 | [diff] [blame] | 6 | 1. Building U-boot |
| 7 | ------------------ |
| 8 | |
| 9 | - Build U-boot for Congatec QMX6 boards: |
| 10 | |
| 11 | $ make mrproper |
| 12 | $ make cgtqmx6eval_defconfig |
| 13 | $ make |
| 14 | |
| 15 | This will generate the following binaries: |
| 16 | |
| 17 | - SPL |
| 18 | - u-boot.img |
| 19 | |
| 20 | 2. Flashing U-boot in the SPI NOR |
SARTRE Leo | 9b75bad | 2013-06-03 23:30:36 +0000 | [diff] [blame] | 21 | --------------------------------- |
| 22 | |
Otavio Salvador | d714035 | 2015-11-19 19:02:36 -0200 | [diff] [blame] | 23 | Copy SPL and u-boot.img to the exported TFTP directory of the |
| 24 | host PC (/tftpboot , for example). |
SARTRE Leo | 9b75bad | 2013-06-03 23:30:36 +0000 | [diff] [blame] | 25 | |
Otavio Salvador | d714035 | 2015-11-19 19:02:36 -0200 | [diff] [blame] | 26 | => sf probe |
SARTRE Leo | 9b75bad | 2013-06-03 23:30:36 +0000 | [diff] [blame] | 27 | |
Otavio Salvador | b5e7c1e | 2016-01-07 17:01:23 -0200 | [diff] [blame^] | 28 | => setenv serverip <server_ip_address> |
| 29 | |
| 30 | => setenv ipaddr <board_ip_address> |
| 31 | |
Otavio Salvador | d714035 | 2015-11-19 19:02:36 -0200 | [diff] [blame] | 32 | => tftp 0x12000000 SPL |
SARTRE Leo | 9b75bad | 2013-06-03 23:30:36 +0000 | [diff] [blame] | 33 | |
Otavio Salvador | d714035 | 2015-11-19 19:02:36 -0200 | [diff] [blame] | 34 | => sf erase 0x0 0x10000 |
SARTRE Leo | 9b75bad | 2013-06-03 23:30:36 +0000 | [diff] [blame] | 35 | |
Otavio Salvador | b5e7c1e | 2016-01-07 17:01:23 -0200 | [diff] [blame^] | 36 | => sf write 0x12000000 0x400 0x10000 |
SARTRE Leo | 9b75bad | 2013-06-03 23:30:36 +0000 | [diff] [blame] | 37 | |
Otavio Salvador | d714035 | 2015-11-19 19:02:36 -0200 | [diff] [blame] | 38 | => tftp 0x12000000 u-boot.img |
| 39 | |
| 40 | => sf erase 0x10000 0x70000 |
| 41 | |
| 42 | => sf write 0x12000000 0x10000 0x70000 |
| 43 | |
| 44 | Reboot the board and the new U-boot should come up. |
| 45 | |
| 46 | 3. Booting from the SD card |
| 47 | --------------------------- |
| 48 | |
| 49 | - Flash the SPL image into the SD card: |
| 50 | |
| 51 | sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync |
| 52 | |
| 53 | - Flash the u-boot.img image into the SD card: |
| 54 | |
| 55 | sudo dd if=u-boot.img of=/dev/mmcblk0 bs=1k seek=69; sync |
| 56 | |
| 57 | - Insert the SD card into the big slot. |
| 58 | |
| 59 | The boot medium of Congatec QMX6 boards is the SPI NOR flash, so boot |
| 60 | the board from SPI first. |
| 61 | |
| 62 | It is also possible to boot from the SD card slot by using the 'bmode' |
| 63 | command: |
| 64 | |
| 65 | => bmode esdhc4 |
| 66 | |
| 67 | And then the U-boot from the big slot will boot. |
| 68 | |
| 69 | Note: If the "bmode" command is not available from your pre-installed U-boot, |
| 70 | these instruction will produce the same effect: |
| 71 | |
| 72 | => mw.l 0x20d8040 0x3850 |
| 73 | => mw.l 0x020d8044 0x10000000 |
| 74 | => reset |