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 141541d7a6SVanessa MaegimaThis generates the U-Boot binary called u-boot.imx. 151541d7a6SVanessa Maegima 161541d7a6SVanessa MaegimaPut pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide 171541d7a6SVanessa Maegimapage 3) 181541d7a6SVanessa Maegima 191541d7a6SVanessa MaegimaConnect a USB to serial adapter between the host PC and pico. 201541d7a6SVanessa Maegima 211541d7a6SVanessa MaegimaConnect a USB cable between the OTG pico port and the host PC. 221541d7a6SVanessa Maegima 231541d7a6SVanessa MaegimaOpen a terminal program such as minicom. 241541d7a6SVanessa Maegima 251541d7a6SVanessa MaegimaCopy u-boot.imx to the imx_usb_loader folder. 261541d7a6SVanessa Maegima 271541d7a6SVanessa MaegimaLoad u-boot.imx via USB: 281541d7a6SVanessa Maegima 291541d7a6SVanessa Maegima$ sudo ./imx_usb u-boot.imx 301541d7a6SVanessa Maegima 311541d7a6SVanessa MaegimaThen U-Boot starts and its messages appear in the console program. 321541d7a6SVanessa Maegima 331541d7a6SVanessa MaegimaUse the default environment variables: 341541d7a6SVanessa Maegima 351541d7a6SVanessa Maegima=> env default -f -a 361541d7a6SVanessa Maegima=> saveenv 371541d7a6SVanessa Maegima 38*619fc167SOtavio SalvadorRun the DFU agent so we can flash the new images using dfu-util tool: 391541d7a6SVanessa Maegima 40*619fc167SOtavio Salvador=> dfu 0 mmc 0 411541d7a6SVanessa Maegima 42*619fc167SOtavio SalvadorFlash SPL into the eMMC: 43*619fc167SOtavio Salvador 44*619fc167SOtavio Salvador$ sudo dfu-util -D SPL -a spl 45*619fc167SOtavio Salvador 46*619fc167SOtavio SalvadorFlash u-boot.img into the eMMC: 47*619fc167SOtavio Salvador 48*619fc167SOtavio Salvador$ sudo dfu-util -D u-boot.img -a u-boot 491541d7a6SVanessa Maegima 501541d7a6SVanessa MaegimaRemove power from the pico board. 511541d7a6SVanessa Maegima 521541d7a6SVanessa MaegimaPut pico board into normal boot mode. 531541d7a6SVanessa Maegima 541541d7a6SVanessa MaegimaPower up the board and the new updated U-Boot should boot from eMMC. 550bfd4f81SVanessa Maegima 560bfd4f81SVanessa MaegimaBuilding U-Boot to boot with NXP 4.1 kernel: 570bfd4f81SVanessa Maegima 580bfd4f81SVanessa MaegimaThe NXP 4.1 kernel boots only in secure boot mode on mx7. 590bfd4f81SVanessa Maegima 600bfd4f81SVanessa MaegimaFollow the next steps to enable secure boot: 610bfd4f81SVanessa Maegima 620bfd4f81SVanessa Maegima$ make mrproper 630bfd4f81SVanessa Maegima$ make pico-imx7d_defconfig 640bfd4f81SVanessa Maegima$ make menuconfig 650bfd4f81SVanessa Maegima -> ARM architecture 660bfd4f81SVanessa Maegima -> [*] Enable support for booting in non-secure mode 670bfd4f81SVanessa Maegima -> [*] Boot in secure mode by default 680bfd4f81SVanessa Maegima -> Exit 690bfd4f81SVanessa Maegima$ make 700bfd4f81SVanessa Maegima 710bfd4f81SVanessa MaegimaFlash u-boot.imx using the imx_usb_loader tool. 72