blob: f21d8301cbef6b01fa2eb1d83cb4f2d45fc34457 [file] [log] [blame]
Vanessa Maegima27142c32017-05-08 13:17:28 -03001How to update U-Boot on pico-imx7d board
2----------------------------------------
3
4Required software on the host PC:
5
6- imx_usb_loader: https://github.com/boundarydevices/imx_usb_loader
7
8Build U-Boot for pico:
9
10$ make mrproper
11$ make pico-imx7d_defconfig
12$ make
13
Fabio Estevam23e08f92018-09-04 10:23:12 -030014This generates the SPL and u-boot.img binaries.
15
161. Loading U-Boot via USB Serial Download Protocol
17
18Note: This method is convenient for development purposes.
19If the eMMC has already a U-Boot flashed with DFU support then
20the user can go to step 2 below in order to update U-Boot.
Vanessa Maegima27142c32017-05-08 13:17:28 -030021
22Put pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide
23page 3)
24
25Connect a USB to serial adapter between the host PC and pico.
26
27Connect a USB cable between the OTG pico port and the host PC.
28
Fabio Estevam7fabe8d2019-03-27 20:03:39 -030029Note: Some computers may be a bit strict with USB current draw and will
30shut down their ports if the draw is too high. The solution for that is
31to use an externally powered USB hub between the board and the host computer.
32
Vanessa Maegima27142c32017-05-08 13:17:28 -030033Open a terminal program such as minicom.
34
Fabio Estevam23e08f92018-09-04 10:23:12 -030035Copy SPL and u-boot.img to the imx_usb_loader folder.
36
37Load the SPL binary via USB:
Vanessa Maegima27142c32017-05-08 13:17:28 -030038
Fabio Estevam23e08f92018-09-04 10:23:12 -030039$ sudo ./imx_usb SPL
Vanessa Maegima27142c32017-05-08 13:17:28 -030040
Fabio Estevam23e08f92018-09-04 10:23:12 -030041Load the u-boot.img binary via USB:
42
43$ sudo ./imx_usb u-boot.img
Vanessa Maegima27142c32017-05-08 13:17:28 -030044
45Then U-Boot starts and its messages appear in the console program.
46
47Use the default environment variables:
48
49=> env default -f -a
50=> saveenv
51
Fabio Estevam23e08f92018-09-04 10:23:12 -0300522. Flashing U-Boot into the eMMC
53
Otavio Salvador938aa682018-06-29 15:19:19 -030054Run the DFU agent so we can flash the new images using dfu-util tool:
Vanessa Maegima27142c32017-05-08 13:17:28 -030055
Otavio Salvador938aa682018-06-29 15:19:19 -030056=> dfu 0 mmc 0
57
Fabio Estevam23e08f92018-09-04 10:23:12 -030058Flash SPL and u-boot.img into the eMMC running the following commands on a PC:
Otavio Salvador938aa682018-06-29 15:19:19 -030059
60$ sudo dfu-util -D SPL -a spl
61
Otavio Salvador938aa682018-06-29 15:19:19 -030062$ sudo dfu-util -D u-boot.img -a u-boot
Vanessa Maegima27142c32017-05-08 13:17:28 -030063
64Remove power from the pico board.
65
66Put pico board into normal boot mode.
67
68Power up the board and the new updated U-Boot should boot from eMMC.