Vanessa Maegima | dab1493 | 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 | c97c9e0 | 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 | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 23 | |
| 24 | Put pico board in USB download mode (refer to the document |
Otavio Salvador | 978138f | 2018-09-04 10:23:17 -0300 | [diff] [blame^] | 25 | http://www.wandboard.org/images/hobbit/hobbitboard-imx6ul-reva1.pdf |
| 26 | page 15). |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 27 | |
Otavio Salvador | 978138f | 2018-09-04 10:23:17 -0300 | [diff] [blame^] | 28 | Connect a USB to serial adapter between the host PC and pico. |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 29 | |
Otavio Salvador | 978138f | 2018-09-04 10:23:17 -0300 | [diff] [blame^] | 30 | Connect a USB cable between the OTG pico port and the host PC. |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 31 | |
Otavio Salvador | 978138f | 2018-09-04 10:23:17 -0300 | [diff] [blame^] | 32 | Open a terminal program such as minicom. |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 33 | |
Fabio Estevam | c97c9e0 | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 34 | Copy SPL and u-boot.img to the imx_usb_loader folder. |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 35 | |
Fabio Estevam | c97c9e0 | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 36 | Load the SPL binary via USB: |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 37 | |
Fabio Estevam | c97c9e0 | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 38 | $ sudo ./imx_usb SPL |
| 39 | |
| 40 | Load the u-boot.img binary via USB: |
| 41 | |
| 42 | $ sudo ./imx_usb u-boot.img |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 43 | |
Otavio Salvador | 978138f | 2018-09-04 10:23:17 -0300 | [diff] [blame^] | 44 | Then U-Boot starts and its messages appear in the console program. |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 45 | |
| 46 | Use the default environment variables: |
| 47 | |
| 48 | => env default -f -a |
| 49 | => saveenv |
| 50 | |
Fabio Estevam | c97c9e0 | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 51 | 2. Flashing U-Boot into the eMMC |
| 52 | |
Otavio Salvador | 978138f | 2018-09-04 10:23:17 -0300 | [diff] [blame^] | 53 | Run the DFU agent so we can flash the new images using dfu-util tool: |
| 54 | |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 55 | => dfu 0 mmc 0 |
| 56 | |
Fabio Estevam | c97c9e0 | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 57 | Flash SPL and u-boot.img into the eMMC running the following commands on a PC: |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 58 | |
Fabio Estevam | c97c9e0 | 2018-09-04 10:23:13 -0300 | [diff] [blame] | 59 | $ sudo dfu-util -D SPL -a spl |
| 60 | |
| 61 | $ sudo dfu-util -D u-boot.img -a u-boot |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 62 | |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 63 | Remove power from the pico board. |
| 64 | |
Otavio Salvador | 978138f | 2018-09-04 10:23:17 -0300 | [diff] [blame^] | 65 | Put pico board into normal boot mode. |
Vanessa Maegima | dab1493 | 2016-06-15 12:48:15 -0300 | [diff] [blame] | 66 | |
| 67 | Power up the board and the new updated U-Boot should boot from eMMC. |