blob: 0b0e98de90a0b8905efe922b74d795b6ccf9780a [file] [log] [blame]
Stefan Roese0299c902015-10-20 15:14:47 +02001Update from original Marvell U-Boot to mainline U-Boot:
2-------------------------------------------------------
3
4Generate the U-Boot image with these commands:
5
6$ make clearfog_defconfig
7$ make
8
9The resulting image including the SPL binary with the
10full DDR setup is "u-boot-spl.kwb".
11
12Now all you need to do is copy this image on a SD card.
13For example with this command:
14
15$ sudo dd if=u-boot-spl.kwb of=/dev/sdX bs=512 seek=1
16
17Please use the correct device node for your setup instead
18of "/dev/sdX" here!
Baruch Siach0d106f12017-09-24 15:50:18 +030019
Baruch Siach3ff0ad22019-03-25 09:09:00 +020020Install U-Boot on eMMC:
21-----------------------
22
23The ROM loads the bootloader from eMMC first boot partition at offset 0. This
24is unlike load from SD card that is at offset 512. As a result, the offset of
25the main U-Boot image on the eMMC boot partition changes. Set
26CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to 0x140 for SPL to load U-Boot from
27the correct location.
28
29To make SPL load the main U-Boot image from the eMMC boot partition enable
30eMMC boot acknowledgement and boot partition with the following U-Boot
31command:
32
33 mmc partconf 0 1 1 0
34
35Install U-Boot on eMMC boot partition from Linux running on Clearfog:
36
37 echo 0 > /sys/block/mmcblk0boot0/force_ro
38 dd if=u-boot-spl.kwb of=/dev/mmcblk0boot0
39
40Note that the SD card is not accessible when the Clearfog SOM has eMMC.
41Consider initial boot from UART (see below).
42
Florian Klink0f70d702017-12-23 01:42:48 +010043Boot selection:
44---------------
45
46Before powering up the board, boot selection should be done via the SW1 dip
47switch (0: OFF, 1: ON):
48
49 - SPI: 00010
50 - SD/eMMC: 00111
51 - M.2 SSD: 11100
52 - UART: 01001 [1]
53
54[1]: According to SolidRun's manual, 11110 should be used for UART booting on
55 the ClearFog 'Pro' variant.
56 However, this doesn't work (anymore) at least on Rev. 2.1 (but '01001' as
57 mentionend for the 'Base' variant does).
58
Baruch Siach0d106f12017-09-24 15:50:18 +030059Boot from UART:
60---------------
61
62Connect the on-board micro-USB (CF Pro: CON11, CF Base: CON5)
63to your host.
64
Florian Klink0f70d702017-12-23 01:42:48 +010065Set the SW1 DIP switches to UART boot (see above).
Baruch Siach0d106f12017-09-24 15:50:18 +030066
67Run the following command to initiate U-Boot download:
68
69 ./tools/kwboot -b u-boot-spl.kwb /dev/ttyUSBX
70
71Use the correct UART device node for /dev/ttyUSBX.
72
73When download finishes start your favorite terminal emulator
74on /dev/ttyUSBX.