Vanessa Maegima | 1541d7a | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 1 | How to update U-Boot on pico-imx7d board |
| 2 | ---------------------------------------- |
| 3 | |
| 4 | Required software on the host PC: |
| 5 | |
| 6 | - imx_usb_loader: https://github.com/boundarydevices/imx_usb_loader |
| 7 | |
| 8 | Build U-Boot for pico: |
| 9 | |
| 10 | $ make mrproper |
| 11 | $ make pico-imx7d_defconfig |
| 12 | $ make |
| 13 | |
Fabio Estevam | 36adc9a | 2019-04-26 09:36:23 -0300 | [diff] [blame] | 14 | This generates the SPL and u-boot-dtb.img binaries. |
Fabio Estevam | 4cdeda5 | 2018-09-04 10:23:12 -0300 | [diff] [blame] | 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 with DFU support then |
| 20 | the user can go to step 2 below in order to update U-Boot. |
Vanessa Maegima | 1541d7a | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 21 | |
| 22 | Put pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide |
| 23 | page 3) |
| 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 | |
Fabio Estevam | 00102ae | 2019-03-27 20:03:39 -0300 | [diff] [blame] | 29 | Note: Some computers may be a bit strict with USB current draw and will |
| 30 | shut down their ports if the draw is too high. The solution for that is |
| 31 | to use an externally powered USB hub between the board and the host computer. |
| 32 | |
Vanessa Maegima | 1541d7a | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 33 | Open a terminal program such as minicom. |
| 34 | |
Fabio Estevam | 36adc9a | 2019-04-26 09:36:23 -0300 | [diff] [blame] | 35 | Copy SPL and u-boot-dtb.img to the imx_usb_loader folder. |
Vanessa Maegima | 1541d7a | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 36 | |
Fabio Estevam | 4cdeda5 | 2018-09-04 10:23:12 -0300 | [diff] [blame] | 37 | Load the SPL binary via USB: |
Vanessa Maegima | 1541d7a | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 38 | |
Fabio Estevam | 4cdeda5 | 2018-09-04 10:23:12 -0300 | [diff] [blame] | 39 | $ sudo ./imx_usb SPL |
| 40 | |
Fabio Estevam | 36adc9a | 2019-04-26 09:36:23 -0300 | [diff] [blame] | 41 | Load the u-boot-dtb.img binary via USB: |
Fabio Estevam | 4cdeda5 | 2018-09-04 10:23:12 -0300 | [diff] [blame] | 42 | |
Fabio Estevam | 36adc9a | 2019-04-26 09:36:23 -0300 | [diff] [blame] | 43 | $ sudo ./imx_usb u-boot-dtb.img |
Vanessa Maegima | 1541d7a | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 44 | |
| 45 | Then U-Boot starts and its messages appear in the console program. |
| 46 | |
| 47 | Use the default environment variables: |
| 48 | |
| 49 | => env default -f -a |
| 50 | => saveenv |
| 51 | |
Fabio Estevam | 4cdeda5 | 2018-09-04 10:23:12 -0300 | [diff] [blame] | 52 | 2. Flashing U-Boot into the eMMC |
| 53 | |
Otavio Salvador | 619fc16 | 2018-06-29 15:19:19 -0300 | [diff] [blame] | 54 | Run the DFU agent so we can flash the new images using dfu-util tool: |
Vanessa Maegima | 1541d7a | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 55 | |
Otavio Salvador | 619fc16 | 2018-06-29 15:19:19 -0300 | [diff] [blame] | 56 | => dfu 0 mmc 0 |
Vanessa Maegima | 1541d7a | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 57 | |
Fabio Estevam | 36adc9a | 2019-04-26 09:36:23 -0300 | [diff] [blame] | 58 | Flash SPL and u-boot-dtb.img into the eMMC running the following commands on a PC: |
Otavio Salvador | 619fc16 | 2018-06-29 15:19:19 -0300 | [diff] [blame] | 59 | |
| 60 | $ sudo dfu-util -D SPL -a spl |
| 61 | |
Fabio Estevam | 36adc9a | 2019-04-26 09:36:23 -0300 | [diff] [blame] | 62 | $ sudo dfu-util -D u-boot-dtb.img -a u-boot |
Vanessa Maegima | 1541d7a | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 63 | |
| 64 | Remove power from the pico board. |
| 65 | |
| 66 | Put pico board into normal boot mode. |
| 67 | |
| 68 | Power up the board and the new updated U-Boot should boot from eMMC. |