xref: /openbmc/u-boot/board/lego/ev3/README (revision ef64e782)
1Summary
2=======
3
4LEGO MINDSTORMS EV3 is a toy robot produced by the LEGO Group. It is based
5on the davinci da850 evm. The EV3 has a 16MB spi flash and a SDHC microSD card
6reader.
7
8Booting
9=======
10
11The EV3 contains a bootloader in EEPROM that loads u-boot.bin from address 0x0
12of the SPI flash memory (with a size of 256KiB!). Because the EEPROM is read-
13only and it takes care of low level configuration (PLL and DDR), we don't use
14U-Boot to produce an SPL image.
15
16Using the default configuration, U-Boot had a boot scrips that works as follows:
17
18* Check to see if microSD card is present
19* If it is, try to load boot.scr from the first FAT partition
20* If loading boot.scr was successful, run it
21* Otherwise, try loading uEnv.txt
22* If loading uEnv.txt was successful, import it
23* If there is a uenvcmd variable (from uEnv.txt), run it
24* Try to load uImage from the first FAT partition
25* If it was successful, try to load da850-lego-ev3.dtb
26* If loading uImage was successful, boot it (DT is optional)
27* If none of the above was successful, try booting from flash
28
29Suggested Flash Memory Layout
30=============================
31
32The following is based on the default U-Boot configuration:
33
34| Image (file)       | Start Addr. | Max. Size         |
35+--------------------+-------------+-------------------+
36| u-boot.bin         |         0x0 |  0x40000 (256KiB) |
37| da850-lego-ev3.dtb |     0x40000 |  0x10000 (64KiB)  |
38| uImage             |     0x50000 | 0x400000 (4MiB)   |
39| rootfs (squashfs)  |    0x450000 | 0xa00000 (10MiB)  |
40
41Writing image to flash
42======================
43
44The EEPROM contains a program for uploading an image file to the flash memory.
45The program is started by holding down the right button on the EV3 when powering
46it on. You can also `run fwupdateboot` in the u-boot shell to reboot into this
47mode. The image can then be uploaded using the official LEGO MINDSTORMS EV3
48software or a 3rd party program capable of uploading a firmware file.
49
50If you are booting from the microSD card, it is enough to just write uboot.bin
51to the flash. If you are not using a microSD card, you will need to create an
52image file using the layout described above.
53