readme.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. Lego Mindstorms EV3
  2. Intro
  3. =====
  4. This is the buildroot basic board support for the Lego Mindstorms EV3
  5. programmable brick. No support for sensors and drivers is provided for the
  6. moment.
  7. The Lego Mindstorms EV3 brick comprises a Texas Instruments AM1808 SoC, with
  8. an ARM 926EJ-S main processor running at 300 MHz.
  9. See:
  10. - https://en.wikipedia.org/wiki/Lego_Mindstorms_EV3
  11. - http://www.lego.com/en-us/mindstorms/products/ev3/31313-mindstorms-ev3/
  12. - http://www.ti.com/product/am1808
  13. The buildroot configuration uses the Linux kernel of the ev3dev project.
  14. See:
  15. - https://github.com/ev3dev/ev3-kernel/
  16. - http://www.ev3dev.org/
  17. How it works
  18. ============
  19. Boot process :
  20. --------------
  21. The u-boot on-board the EV3 brick has provision to boot a Linux kernel from the
  22. external µSD card. It will try to load a uImage from the first µSD card
  23. partition, which must be formatted with a FAT filesystem.
  24. How to build it
  25. ===============
  26. Configure Buildroot
  27. -------------------
  28. The lego_ev3_defconfig configuration provides basic support to boot on the Lego
  29. Mindstorms EV3 programmable brick:
  30. $ make lego_ev3_defconfig
  31. Build everything
  32. ----------------
  33. Note: you will need to have access to the network, since Buildroot will
  34. download the packages' sources.
  35. $ make
  36. Result of the build
  37. -------------------
  38. After building, you should obtain this tree:
  39. output/images/
  40. ├── rootfs.ext2
  41. ├── rootfs.ext3 -> rootfs.ext2
  42. └── uImage
  43. Prepare your SDcard
  44. ===================
  45. The following µSD card layout is recommended:
  46. - First partition formatted with a FAT filesystem, containing the uImage.
  47. - Second partition formatted as ext2 or ext3, containing the root filesystem.
  48. Create the SDcard partition table
  49. ----------------------------------
  50. Determine the device associated to the SD card :
  51. $ cat /proc/partitions
  52. Let's assume it is /dev/mmcblk0 :
  53. $ sudo fdisk /dev/mmcblk0
  54. Delete all previous partitions by creating a new disklabel with 'o', then
  55. create the new partition table, using these options, pressing enter after each
  56. one:
  57. * n p 1 2048 +10M t c
  58. * n p 2 22528 +256M
  59. Using the 'p' option, the SD card's partition must look like this :
  60. Device Boot Start End Blocks Id System
  61. /dev/mmcblk0p1 2048 22527 10240 c W95 FAT32 (LBA)
  62. /dev/mmcblk0p2 22528 546815 262144 83 Linux
  63. Then write the partition table using 'w' and exit.
  64. Make partition one a DOS partition :
  65. $ sudo mkfs.vfat /dev/mmcblk0p1
  66. Install the binaries to the SDcard
  67. ----------------------------------
  68. Remember your binaries are located in output/images/, go inside that directory :
  69. $ cd output/images
  70. Copy the Linux kernel:
  71. $ sudo mkdir /mnt/sdcard
  72. $ sudo mount /dev/mmcblk0p1 /mnt/sdcard
  73. $ sudo cp uImage /mnt/sdcard
  74. $ sudo umount /mnt/sdcard
  75. Copy the rootfs :
  76. $ sudo dd if=rootfs.ext3 of=/dev/mmcblk0p2 bs=1M
  77. $ sync
  78. It's Done!
  79. Finish
  80. ======
  81. Eject your µSD card, insert it in your Lego EV3, and power it up.
  82. To have a serial console, you will need a proper USB to Lego serial port
  83. adapter plugged into the EV3 sensors port 1.
  84. See:
  85. - http://botbench.com/blog/2013/08/15/ev3-creating-console-cable/
  86. - http://botbench.com/blog/2013/08/05/mindsensors-ev3-usb-console-adapter/
  87. The serial port config to use is 115200/8-N-1.