1*4882a593SmuzhiyunSummary 2*4882a593Smuzhiyun======= 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunLEGO MINDSTORMS EV3 is a toy robot produced by the LEGO Group. It is based 5*4882a593Smuzhiyunon the davinci da850 evm. The EV3 has a 16MB spi flash and a SDHC microSD card 6*4882a593Smuzhiyunreader. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunBooting 9*4882a593Smuzhiyun======= 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunThe EV3 contains a bootloader in EEPROM that loads u-boot.bin from address 0x0 12*4882a593Smuzhiyunof the spi flash memory. Using the default configuration, u-boot will check to 13*4882a593Smuzhiyunsee if there is a boot.scr file on the first FAT partition of the mmc. If there 14*4882a593Smuzhiyunis, it will run the script and boot the kernel from the uImage file also in 15*4882a593Smuzhiyunthe FAT partition. Otherwise, it will load a kernel and rootfs from the flash. 16*4882a593SmuzhiyunThe kernel must be stored at address 0x50000 on the flash and have a maximum 17*4882a593Smuzhiyunsize of 3MiB. The rootfs must be a squasfs image and stored at 0x350000 in the 18*4882a593Smuzhiyunflash and have a maximum size of 9.3MiB. The flash starting at 0xCB0000 is 19*4882a593Smuzhiyunreserved for user data. 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunWriting image to flash 22*4882a593Smuzhiyun====================== 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunThe EEPROM contains a program for uploading an image file to the flash memory. 25*4882a593SmuzhiyunThe program is started by holding down the right button on the EV3 when powering 26*4882a593Smuzhiyunit on. You can also `run fwupdateboot` in the u-boot shell to reboot into this 27*4882a593Smuzhiyunmode. The image can then be uploaded using the official LEGO MINDSTORMS EV3 28*4882a593Smuzhiyunsoftware or a 3rd party program capable of uploading a firmware file. 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunIf you are booting from the microSD card, it is enough to just write uboot.bin 31*4882a593Smuzhiyunto the flash. If you are not using a microSD card, you will need to create an 32*4882a593Smuzhiyunimage file using the layout described above. 33