Vanessa Maegima | 27142c3 | 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 | |
| 14 | This generates the U-Boot binary called u-boot.imx. |
| 15 | |
| 16 | Put pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide |
| 17 | page 3) |
| 18 | |
| 19 | Connect a USB to serial adapter between the host PC and pico. |
| 20 | |
| 21 | Connect a USB cable between the OTG pico port and the host PC. |
| 22 | |
| 23 | Open a terminal program such as minicom. |
| 24 | |
| 25 | Copy u-boot.imx to the imx_usb_loader folder. |
| 26 | |
| 27 | Load u-boot.imx via USB: |
| 28 | |
| 29 | $ sudo ./imx_usb u-boot.imx |
| 30 | |
| 31 | Then U-Boot starts and its messages appear in the console program. |
| 32 | |
| 33 | Use the default environment variables: |
| 34 | |
| 35 | => env default -f -a |
| 36 | => saveenv |
| 37 | |
Otavio Salvador | 938aa68 | 2018-06-29 15:19:19 -0300 | [diff] [blame^] | 38 | Run the DFU agent so we can flash the new images using dfu-util tool: |
Vanessa Maegima | 27142c3 | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 39 | |
Otavio Salvador | 938aa68 | 2018-06-29 15:19:19 -0300 | [diff] [blame^] | 40 | => dfu 0 mmc 0 |
| 41 | |
| 42 | Flash SPL into the eMMC: |
| 43 | |
| 44 | $ sudo dfu-util -D SPL -a spl |
| 45 | |
| 46 | Flash u-boot.img into the eMMC: |
Vanessa Maegima | 27142c3 | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 47 | |
Otavio Salvador | 938aa68 | 2018-06-29 15:19:19 -0300 | [diff] [blame^] | 48 | $ sudo dfu-util -D u-boot.img -a u-boot |
Vanessa Maegima | 27142c3 | 2017-05-08 13:17:28 -0300 | [diff] [blame] | 49 | |
| 50 | Remove power from the pico board. |
| 51 | |
| 52 | Put pico board into normal boot mode. |
| 53 | |
| 54 | Power up the board and the new updated U-Boot should boot from eMMC. |
Vanessa Maegima | a2c1653 | 2017-08-29 13:53:18 -0300 | [diff] [blame] | 55 | |
| 56 | Building U-Boot to boot with NXP 4.1 kernel: |
| 57 | |
| 58 | The NXP 4.1 kernel boots only in secure boot mode on mx7. |
| 59 | |
| 60 | Follow the next steps to enable secure boot: |
| 61 | |
| 62 | $ make mrproper |
| 63 | $ make pico-imx7d_defconfig |
| 64 | $ make menuconfig |
| 65 | -> ARM architecture |
| 66 | -> [*] Enable support for booting in non-secure mode |
| 67 | -> [*] Boot in secure mode by default |
| 68 | -> Exit |
| 69 | $ make |
| 70 | |
| 71 | Flash u-boot.imx using the imx_usb_loader tool. |