Stefan Roese | 7360640 | 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 |
Pali Rohár | df71c31 | 2022-11-02 18:51:28 +0100 | [diff] [blame] | 10 | full DDR setup is "u-boot-with-spl.kwb". |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 11 | |
| 12 | Now all you need to do is copy this image on a SD card. |
| 13 | For example with this command: |
| 14 | |
Pali Rohár | df71c31 | 2022-11-02 18:51:28 +0100 | [diff] [blame] | 15 | $ sudo dd if=u-boot-with-spl.kwb of=/dev/sdX bs=512 seek=1 |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 16 | |
| 17 | Please use the correct device node for your setup instead |
| 18 | of "/dev/sdX" here! |
Baruch Siach | 67732a1 | 2017-09-24 15:50:18 +0300 | [diff] [blame] | 19 | |
Baruch Siach | e8c193e | 2019-03-25 09:09:00 +0200 | [diff] [blame] | 20 | Install U-Boot on eMMC: |
| 21 | ----------------------- |
| 22 | |
Baruch Siach | e8c193e | 2019-03-25 09:09:00 +0200 | [diff] [blame] | 23 | To make SPL load the main U-Boot image from the eMMC boot partition enable |
| 24 | eMMC boot acknowledgement and boot partition with the following U-Boot |
| 25 | command: |
| 26 | |
| 27 | mmc partconf 0 1 1 0 |
| 28 | |
| 29 | Install U-Boot on eMMC boot partition from Linux running on Clearfog: |
| 30 | |
| 31 | echo 0 > /sys/block/mmcblk0boot0/force_ro |
Pali Rohár | df71c31 | 2022-11-02 18:51:28 +0100 | [diff] [blame] | 32 | dd if=u-boot-with-spl.kwb of=/dev/mmcblk0boot0 |
Baruch Siach | e8c193e | 2019-03-25 09:09:00 +0200 | [diff] [blame] | 33 | |
| 34 | Note that the SD card is not accessible when the Clearfog SOM has eMMC. |
| 35 | Consider initial boot from UART (see below). |
| 36 | |
Baruch Siach | 1348c03 | 2019-05-16 13:04:03 +0300 | [diff] [blame] | 37 | Install U-Boot on SATA: |
| 38 | ----------------------- |
| 39 | |
| 40 | When loading the main U-Boot image from raw SATA sector, set |
| 41 | CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR to 0x141. |
| 42 | |
Florian Klink | 5d74703 | 2017-12-23 01:42:48 +0100 | [diff] [blame] | 43 | Boot selection: |
| 44 | --------------- |
| 45 | |
| 46 | Before powering up the board, boot selection should be done via the SW1 dip |
| 47 | switch (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 Siach | 67732a1 | 2017-09-24 15:50:18 +0300 | [diff] [blame] | 59 | Boot from UART: |
| 60 | --------------- |
| 61 | |
| 62 | Connect the on-board micro-USB (CF Pro: CON11, CF Base: CON5) |
| 63 | to your host. |
| 64 | |
Florian Klink | 5d74703 | 2017-12-23 01:42:48 +0100 | [diff] [blame] | 65 | Set the SW1 DIP switches to UART boot (see above). |
Baruch Siach | 67732a1 | 2017-09-24 15:50:18 +0300 | [diff] [blame] | 66 | |
| 67 | Run the following command to initiate U-Boot download: |
| 68 | |
Pali Rohár | df71c31 | 2022-11-02 18:51:28 +0100 | [diff] [blame] | 69 | ./tools/kwboot -b u-boot-with-spl.kwb /dev/ttyUSBX |
Baruch Siach | 67732a1 | 2017-09-24 15:50:18 +0300 | [diff] [blame] | 70 | |
| 71 | Use the correct UART device node for /dev/ttyUSBX. |
| 72 | |
| 73 | When download finishes start your favorite terminal emulator |
| 74 | on /dev/ttyUSBX. |