Michael Trimarchi | 273ab5a | 2022-09-18 17:09:53 +0200 | [diff] [blame] | 1 | How to Update U-Boot on imx6ulz_smm_m2 board |
| 2 | -------------------------------------------- |
| 3 | |
| 4 | Required software on the host PC: |
| 5 | |
| 6 | - UUU: https://github.com/NXPmicro/mfgtools |
| 7 | |
| 8 | Build U-Boot for m2: |
| 9 | |
| 10 | $ make mrproper |
| 11 | $ make imx6ulz_smm_m2_defconfig |
| 12 | $ make |
| 13 | |
| 14 | This generates the SPL and u-boot-dtb.img binaries. |
| 15 | |
| 16 | 1. Loading U-Boot via USB Serial Download Protocol |
| 17 | |
| 18 | Copy SPL and u-boot-dtb.img to the uuu folder. |
| 19 | |
| 20 | Load the U-Boot via USB: |
| 21 | |
| 22 | $ sudo uuu -v -b nand_script.lst u-boot-with-spl.imx |
| 23 | |
| 24 | where nand_script.lst contains the following: |
| 25 | |
| 26 | uuu_version 1.2.39 |
| 27 | |
| 28 | # @_flash.bin | bootloader |
| 29 | # @_image [_flash.bin] | image burn to nand, default is the same as bootloader |
| 30 | |
| 31 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ |
| 32 | SDP: boot -f _flash.bin |
| 33 | |
| 34 | # This command will be run when ROM support stream mode |
| 35 | # i.MX8QXP, i.MX8QM |
| 36 | SDPS: boot -f _flash.bin |
| 37 | |
| 38 | # These commands will be run when use SPL and will be skipped if no spl |
| 39 | # SDPU will be deprecated. please use SDPV instead of SDPU |
| 40 | # { |
| 41 | SDPU: delay 1000 |
| 42 | SDPU: write -f _flash.bin -offset 0x57c00 |
| 43 | SDPU: jump |
| 44 | # } |
| 45 | |
| 46 | # These commands will be run when use SPL and will be skipped if no spl |
| 47 | # if (SPL support SDPV) |
| 48 | # { |
| 49 | SDPV: delay 1000 |
| 50 | SDPV: write -f _flash.bin -offset 0x11000 |
| 51 | SDPV: jump |
| 52 | # } |
| 53 | |
| 54 | FB: ucmd setenv fastboot_buffer ${loadaddr} |
| 55 | FB: download -f _image |
| 56 | FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi |
| 57 | # Burn image to nandfit partition if needed |
| 58 | FB: ucmd if env exists nandfit_part; then nand erase.part nandfit; nand write ${fastboot_buffer} nandfit ${fastboot_bytes}; else true; fi; |
| 59 | FB: ucmd nandbcb init ${fastboot_buffer} nandboot ${fastboot_bytes} |
| 60 | FB: Done |
| 61 | |
| 62 | Then U-Boot starts and its messages appear in the console program. |
| 63 | |
| 64 | Use the default environment variables: |
| 65 | |
| 66 | => env default -f -a |
| 67 | => saveenv |