blob: 0777c781c26f15934008b98e6a9d9596b6aaca6a [file] [log] [blame]
Otavio Salvadore186b182015-11-19 19:02:36 -02001U-Boot for the Congatec QMX6 boards
SARTRE Leodce71762013-06-03 23:30:36 +00002
3This file contains information for the port of U-Boot to the Congatec
Otavio Salvadore186b182015-11-19 19:02:36 -02004QMX6 boards.
SARTRE Leodce71762013-06-03 23:30:36 +00005
Bin Meng75574052016-02-05 19:30:11 -080061. Building U-Boot
Otavio Salvadore186b182015-11-19 19:02:36 -02007------------------
8
Bin Meng75574052016-02-05 19:30:11 -08009- Build U-Boot for Congatec QMX6 boards:
Otavio Salvadore186b182015-11-19 19:02:36 -020010
11$ make mrproper
12$ make cgtqmx6eval_defconfig
13$ make
14
15This will generate the following binaries:
16
17- SPL
18- u-boot.img
19
Bin Meng75574052016-02-05 19:30:11 -0800202. Flashing U-Boot in the SPI NOR
SARTRE Leodce71762013-06-03 23:30:36 +000021---------------------------------
22
Otavio Salvadore186b182015-11-19 19:02:36 -020023Copy SPL and u-boot.img to the exported TFTP directory of the
24host PC (/tftpboot , for example).
25
26=> sf probe
27
Otavio Salvadorbc06d182016-01-07 17:01:23 -020028=> setenv serverip <server_ip_address>
29
30=> setenv ipaddr <board_ip_address>
31
Otavio Salvadore186b182015-11-19 19:02:36 -020032=> tftp 0x12000000 SPL
33
34=> sf erase 0x0 0x10000
35
Otavio Salvadorbc06d182016-01-07 17:01:23 -020036=> sf write 0x12000000 0x400 0x10000
Otavio Salvadore186b182015-11-19 19:02:36 -020037
38=> tftp 0x12000000 u-boot.img
SARTRE Leodce71762013-06-03 23:30:36 +000039
Otavio Salvadore186b182015-11-19 19:02:36 -020040=> sf erase 0x10000 0x70000
SARTRE Leodce71762013-06-03 23:30:36 +000041
Otavio Salvadore186b182015-11-19 19:02:36 -020042=> sf write 0x12000000 0x10000 0x70000
SARTRE Leodce71762013-06-03 23:30:36 +000043
Bin Meng75574052016-02-05 19:30:11 -080044Reboot the board and the new U-Boot should come up.
SARTRE Leodce71762013-06-03 23:30:36 +000045
Otavio Salvadore186b182015-11-19 19:02:36 -0200463. Booting from the SD card
47---------------------------
48
49- Flash the SPL image into the SD card:
50
51sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync
52
53- Flash the u-boot.img image into the SD card:
54
55sudo dd if=u-boot.img of=/dev/mmcblk0 bs=1k seek=69; sync
56
57- Insert the SD card into the big slot.
58
59The boot medium of Congatec QMX6 boards is the SPI NOR flash, so boot
60the board from SPI first.
61
62It is also possible to boot from the SD card slot by using the 'bmode'
63command:
64
65=> bmode esdhc4
66
Bin Meng75574052016-02-05 19:30:11 -080067And then the U-Boot from the big slot will boot.
Otavio Salvadore186b182015-11-19 19:02:36 -020068
Bin Meng75574052016-02-05 19:30:11 -080069Note: If the "bmode" command is not available from your pre-installed U-Boot,
Otavio Salvadore186b182015-11-19 19:02:36 -020070these instruction will produce the same effect:
SARTRE Leodce71762013-06-03 23:30:36 +000071
Otavio Salvadore186b182015-11-19 19:02:36 -020072=> mw.l 0x20d8040 0x3850
73=> mw.l 0x020d8044 0x10000000
74=> reset