xref: /openbmc/u-boot/board/technexion/pico-imx7d/README (revision 4da84d1b9b14f5ad8f86f0c69c85ac3d1f54cfd2)
11541d7a6SVanessa MaegimaHow to update U-Boot on pico-imx7d board
21541d7a6SVanessa Maegima----------------------------------------
31541d7a6SVanessa Maegima
41541d7a6SVanessa MaegimaRequired software on the host PC:
51541d7a6SVanessa Maegima
61541d7a6SVanessa Maegima- imx_usb_loader: https://github.com/boundarydevices/imx_usb_loader
71541d7a6SVanessa Maegima
81541d7a6SVanessa MaegimaBuild U-Boot for pico:
91541d7a6SVanessa Maegima
101541d7a6SVanessa Maegima$ make mrproper
111541d7a6SVanessa Maegima$ make pico-imx7d_defconfig
121541d7a6SVanessa Maegima$ make
131541d7a6SVanessa Maegima
144cdeda51SFabio EstevamThis generates the SPL and u-boot.img binaries.
154cdeda51SFabio Estevam
164cdeda51SFabio Estevam1. Loading U-Boot via USB Serial Download Protocol
174cdeda51SFabio Estevam
184cdeda51SFabio EstevamNote: This method is convenient for development purposes.
194cdeda51SFabio EstevamIf the eMMC has already a U-Boot flashed with DFU support then
204cdeda51SFabio Estevamthe user can go to step 2 below in order to update U-Boot.
211541d7a6SVanessa Maegima
221541d7a6SVanessa MaegimaPut pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide
231541d7a6SVanessa Maegimapage 3)
241541d7a6SVanessa Maegima
251541d7a6SVanessa MaegimaConnect a USB to serial adapter between the host PC and pico.
261541d7a6SVanessa Maegima
271541d7a6SVanessa MaegimaConnect a USB cable between the OTG pico port and the host PC.
281541d7a6SVanessa Maegima
29*00102ae5SFabio EstevamNote: Some computers may be a bit strict with USB current draw and will
30*00102ae5SFabio Estevamshut down their ports if the draw is too high. The solution for that is
31*00102ae5SFabio Estevamto use an externally powered USB hub between the board and the host computer.
32*00102ae5SFabio Estevam
331541d7a6SVanessa MaegimaOpen a terminal program such as minicom.
341541d7a6SVanessa Maegima
354cdeda51SFabio EstevamCopy SPL and u-boot.img to the imx_usb_loader folder.
361541d7a6SVanessa Maegima
374cdeda51SFabio EstevamLoad the SPL binary via USB:
381541d7a6SVanessa Maegima
394cdeda51SFabio Estevam$ sudo ./imx_usb SPL
404cdeda51SFabio Estevam
414cdeda51SFabio EstevamLoad the u-boot.img binary via USB:
424cdeda51SFabio Estevam
434cdeda51SFabio Estevam$ sudo ./imx_usb u-boot.img
441541d7a6SVanessa Maegima
451541d7a6SVanessa MaegimaThen U-Boot starts and its messages appear in the console program.
461541d7a6SVanessa Maegima
471541d7a6SVanessa MaegimaUse the default environment variables:
481541d7a6SVanessa Maegima
491541d7a6SVanessa Maegima=> env default -f -a
501541d7a6SVanessa Maegima=> saveenv
511541d7a6SVanessa Maegima
524cdeda51SFabio Estevam2. Flashing U-Boot into the eMMC
534cdeda51SFabio Estevam
54619fc167SOtavio SalvadorRun the DFU agent so we can flash the new images using dfu-util tool:
551541d7a6SVanessa Maegima
56619fc167SOtavio Salvador=> dfu 0 mmc 0
571541d7a6SVanessa Maegima
584cdeda51SFabio EstevamFlash SPL and u-boot.img into the eMMC running the following commands on a PC:
59619fc167SOtavio Salvador
60619fc167SOtavio Salvador$ sudo dfu-util -D SPL -a spl
61619fc167SOtavio Salvador
62619fc167SOtavio Salvador$ sudo dfu-util -D u-boot.img -a u-boot
631541d7a6SVanessa Maegima
641541d7a6SVanessa MaegimaRemove power from the pico board.
651541d7a6SVanessa Maegima
661541d7a6SVanessa MaegimaPut pico board into normal boot mode.
671541d7a6SVanessa Maegima
681541d7a6SVanessa MaegimaPower up the board and the new updated U-Boot should boot from eMMC.
69