Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 1 | How to Update U-Boot on pico-imx6q/dl boards |
| 2 | -------------------------------------------- |
| 3 | |
| 4 | Required software on the host PC: |
| 5 | |
| 6 | - UUU: https://github.com/NXPmicro/mfgtools |
| 7 | |
| 8 | Build U-Boot for pico: |
| 9 | |
| 10 | $ make mrproper |
| 11 | $ make pico-imx6_defconfig |
| 12 | $ make |
| 13 | |
| 14 | This generates the SPL and u-boot-dtb.img binaries. |
| 15 | |
| 16 | 1. Loading U-Boot via USB Serial Download Protocol |
| 17 | |
| 18 | Note: This method is convenient for development purposes. |
| 19 | If the eMMC has already a U-Boot flashed then the user can |
| 20 | go to step 2 below in order to update U-Boot. |
| 21 | |
| 22 | Put pico board in USB download mode (Refer to the following link for details: |
| 23 | https://www.technexion.com/support/knowledgebase/boot-configuration-settings-for-pico-baseboards/). |
| 24 | |
| 25 | Connect a USB to serial adapter between the host PC and pico. |
| 26 | |
| 27 | Connect a USB cable between the OTG pico port and the host PC. |
| 28 | |
| 29 | Open a terminal program such as minicom. |
| 30 | |
| 31 | Copy SPL and u-boot-dtb.img to the uuu folder. |
| 32 | |
| 33 | Load the U-Boot via USB: |
| 34 | |
| 35 | $ sudo ./uuu -v uuu_script |
| 36 | |
| 37 | where uuu_script contains the following: |
| 38 | |
| 39 | SDP: boot -f SPL |
| 40 | SDPU: write -f u-boot-dtb.img -addr 0x10000000 |
| 41 | SDPU: jump -addr 0x10000000 |
| 42 | |
| 43 | Then U-Boot starts and its messages appear in the console program. |
| 44 | |
| 45 | Use the default environment variables: |
| 46 | |
| 47 | => env default -f -a |
| 48 | => saveenv |
| 49 | |
| 50 | 2. Flashing U-Boot into the eMMC |
| 51 | |
| 52 | The default U-Boot environment expects the use of eMMC user |
| 53 | partition. To ensure we are using the proper eMMC partition for boot, |
| 54 | please run: |
| 55 | |
| 56 | => mmc partconf 0 0 0 0 |
| 57 | |
| 58 | Next, run the DFU agent so we can flash the new images using dfu-util |
| 59 | tool: |
| 60 | |
| 61 | => dfu 0 mmc 0 |
| 62 | |
| 63 | Flash SPL and u-boot-dtb.img into the eMMC running the following commands on a PC: |
| 64 | |
| 65 | $ sudo dfu-util -D SPL -a spl |
| 66 | |
| 67 | $ sudo dfu-util -D u-boot-dtb.img -a u-boot |
| 68 | |
| 69 | Remove power from the pico board. |
| 70 | |
| 71 | Put pico board into normal boot mode. |
| 72 | |
| 73 | Power up the board and the new updated U-Boot should boot from eMMC. |