1How 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
14This generates the U-Boot binary called u-boot.imx.
15
16Put pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide
17page 3)
18
19Connect a USB to serial adapter between the host PC and pico.
20
21Connect a USB cable between the OTG pico port and the host PC.
22
23Open a terminal program such as minicom.
24
25Copy u-boot.imx to the imx_usb_loader folder.
26
27Load u-boot.imx via USB:
28
29$ sudo ./imx_usb u-boot.imx
30
31Then U-Boot starts and its messages appear in the console program.
32
33Use the default environment variables:
34
35=> env default -f -a
36=> saveenv
37
38Run the UMS command:
39=> ums 0 mmc 0
40
41Transfer u-boot.imx to be flashed into the eMMC:
42
43$ sudo dd if=u-boot.imx of=/dev/sdX bs=1K seek=1; sync
44
45Remove power from the pico board.
46
47Put pico board into normal boot mode.
48
49Power up the board and the new updated U-Boot should boot from eMMC.
50
51Building U-Boot to boot with NXP 4.1 kernel:
52
53The NXP 4.1 kernel boots only in secure boot mode on mx7.
54
55Follow the next steps to enable secure boot:
56
57$ make mrproper
58$ make pico-imx7d_defconfig
59$ make menuconfig
60	-> ARM architecture
61	-> [*] Enable support for booting in non-secure mode
62	-> [*]   Boot in secure mode by default
63	-> Exit
64$ make
65
66Flash u-boot.imx using the imx_usb_loader tool.
67