Vanessa Maegima | 96bd20e | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 1 | How to Update U-Boot on Pico-imx6ul board |
| 2 | ----------------------------------------- |
| 3 | |
| 4 | Required software on the host PC: |
| 5 | |
| 6 | - imx_usb_loader: https://github.com/boundarydevices/imx_usb_loader |
| 7 | |
| 8 | - dfu-util: http://dfu-util.sourceforge.net/releases/ |
| 9 | |
| 10 | Build U-Boot for Pico: |
| 11 | |
| 12 | $ make mrproper |
| 13 | $ make pico-imx6ul_defconfig |
| 14 | $ make |
| 15 | |
Fabio Estevam | c45978b | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 16 | This generates the SPL and u-boot.img binaries. |
| 17 | |
| 18 | 1. Loading U-Boot via USB Serial Download Protocol |
| 19 | |
| 20 | Note: This method is convenient for development purposes. |
| 21 | If the eMMC has already a U-Boot flashed with DFU support then |
| 22 | the user can go to step 2 below in order to update U-Boot. |
Vanessa Maegima | 96bd20e | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 23 | |
| 24 | Put pico board in USB download mode (refer to the document |
| 25 | http://www.wandboard.org/images/hobbit/hobbitboard-imx6ul-reva1.pdf page 15) |
| 26 | |
| 27 | Connect a USB to serial adapter between the host PC and pico |
| 28 | |
| 29 | Connect a USB cable between the OTG pico port and the host PC |
| 30 | |
| 31 | Open a terminal program such as minicom |
| 32 | |
Fabio Estevam | c45978b | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 33 | Copy SPL and u-boot.img to the imx_usb_loader folder. |
| 34 | |
| 35 | Load the SPL binary via USB: |
Vanessa Maegima | 96bd20e | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 36 | |
Fabio Estevam | c45978b | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 37 | $ sudo ./imx_usb SPL |
Vanessa Maegima | 96bd20e | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 38 | |
Fabio Estevam | c45978b | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 39 | Load the u-boot.img binary via USB: |
| 40 | |
| 41 | $ sudo ./imx_usb u-boot.img |
Vanessa Maegima | 96bd20e | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 42 | |
| 43 | Then U-Boot should start and its messages will appear in the console program. |
| 44 | |
| 45 | Use the default environment variables: |
| 46 | |
| 47 | => env default -f -a |
| 48 | => saveenv |
| 49 | |
Fabio Estevam | c45978b | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 50 | 2. Flashing U-Boot into the eMMC |
| 51 | |
Vanessa Maegima | 96bd20e | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 52 | Run the DFU command: |
| 53 | => dfu 0 mmc 0 |
| 54 | |
Fabio Estevam | c45978b | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 55 | Flash SPL and u-boot.img into the eMMC running the following commands on a PC: |
| 56 | |
| 57 | $ sudo dfu-util -D SPL -a spl |
Vanessa Maegima | 96bd20e | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 58 | |
Fabio Estevam | c45978b | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 59 | $ sudo dfu-util -D u-boot.img -a u-boot |
Vanessa Maegima | 96bd20e | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 60 | |
| 61 | Then on the U-Boot prompt the following message should be seen after a |
| 62 | successful upgrade: |
| 63 | |
| 64 | #DOWNLOAD ... OK |
| 65 | Ctrl+C to exit ... |
| 66 | |
| 67 | Remove power from the pico board. |
| 68 | |
| 69 | Put pico board into normal boot mode |
| 70 | |
| 71 | Power up the board and the new updated U-Boot should boot from eMMC. |