Stefan Roese | 0299c90 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 1 | Update from original Marvell U-Boot to mainline U-Boot: |
| 2 | ------------------------------------------------------- |
| 3 | |
| 4 | Generate the U-Boot image with these commands: |
| 5 | |
| 6 | $ make clearfog_defconfig |
| 7 | $ make |
| 8 | |
| 9 | The resulting image including the SPL binary with the |
| 10 | full DDR setup is "u-boot-spl.kwb". |
| 11 | |
| 12 | Now all you need to do is copy this image on a SD card. |
| 13 | For example with this command: |
| 14 | |
| 15 | $ sudo dd if=u-boot-spl.kwb of=/dev/sdX bs=512 seek=1 |
| 16 | |
| 17 | Please use the correct device node for your setup instead |
| 18 | of "/dev/sdX" here! |
Baruch Siach | 0d106f1 | 2017-09-24 15:50:18 +0300 | [diff] [blame] | 19 | |
Baruch Siach | 3ff0ad2 | 2019-03-25 09:09:00 +0200 | [diff] [blame] | 20 | Install U-Boot on eMMC: |
| 21 | ----------------------- |
| 22 | |
| 23 | The ROM loads the bootloader from eMMC first boot partition at offset 0. This |
| 24 | is unlike load from SD card that is at offset 512. As a result, the offset of |
| 25 | the main U-Boot image on the eMMC boot partition changes. Set |
| 26 | CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to 0x140 for SPL to load U-Boot from |
| 27 | the correct location. |
| 28 | |
| 29 | To make SPL load the main U-Boot image from the eMMC boot partition enable |
| 30 | eMMC boot acknowledgement and boot partition with the following U-Boot |
| 31 | command: |
| 32 | |
| 33 | mmc partconf 0 1 1 0 |
| 34 | |
| 35 | Install 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 | |
| 40 | Note that the SD card is not accessible when the Clearfog SOM has eMMC. |
| 41 | Consider initial boot from UART (see below). |
| 42 | |
Baruch Siach | 85fe441 | 2019-05-16 13:04:03 +0300 | [diff] [blame] | 43 | Install U-Boot on SATA: |
| 44 | ----------------------- |
| 45 | |
| 46 | When loading the main U-Boot image from raw SATA sector, set |
| 47 | CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR to 0x141. |
| 48 | |
Florian Klink | 0f70d70 | 2017-12-23 01:42:48 +0100 | [diff] [blame] | 49 | Boot selection: |
| 50 | --------------- |
| 51 | |
| 52 | Before powering up the board, boot selection should be done via the SW1 dip |
| 53 | switch (0: OFF, 1: ON): |
| 54 | |
| 55 | - SPI: 00010 |
| 56 | - SD/eMMC: 00111 |
| 57 | - M.2 SSD: 11100 |
| 58 | - UART: 01001 [1] |
| 59 | |
| 60 | [1]: According to SolidRun's manual, 11110 should be used for UART booting on |
| 61 | the ClearFog 'Pro' variant. |
| 62 | However, this doesn't work (anymore) at least on Rev. 2.1 (but '01001' as |
| 63 | mentionend for the 'Base' variant does). |
| 64 | |
Baruch Siach | 0d106f1 | 2017-09-24 15:50:18 +0300 | [diff] [blame] | 65 | Boot from UART: |
| 66 | --------------- |
| 67 | |
| 68 | Connect the on-board micro-USB (CF Pro: CON11, CF Base: CON5) |
| 69 | to your host. |
| 70 | |
Florian Klink | 0f70d70 | 2017-12-23 01:42:48 +0100 | [diff] [blame] | 71 | Set the SW1 DIP switches to UART boot (see above). |
Baruch Siach | 0d106f1 | 2017-09-24 15:50:18 +0300 | [diff] [blame] | 72 | |
| 73 | Run the following command to initiate U-Boot download: |
| 74 | |
| 75 | ./tools/kwboot -b u-boot-spl.kwb /dev/ttyUSBX |
| 76 | |
| 77 | Use the correct UART device node for /dev/ttyUSBX. |
| 78 | |
| 79 | When download finishes start your favorite terminal emulator |
| 80 | on /dev/ttyUSBX. |