readme.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. This document explains how to set up a basic Buildroot system on
  2. various Atmel/Microchip boards. Additional details can also be found
  3. on the Linux4SAM website: http://www.linux4sam.org
  4. This guide covers the following configurations:
  5. - at91sam9g45m10ek_defconfig
  6. - at91sam9rlek_defconfig
  7. - at91sam9x5ek_defconfig (at91sam9g15, at91sam9g25, at91sam9x25,
  8. at91sam9g35 and at91sam9x35)
  9. - atmel_sama5d3xek_defconfig (sama5d31, sama5d33, sama5d34, sama5d35,
  10. sama5d36)
  11. - atmel_sama5d3_xplained_defconfig
  12. - atmel_sama5d3_xplained_dev_defconfig
  13. - atmel_sama5d3_xplained_mmc_defconfig
  14. - atmel_sama5d3_xplained_mmc_dev_defconfig
  15. - atmel_sama5d4_xplained_defconfig
  16. - atmel_sama5d4_xplained_dev_defconfig
  17. - atmel_sama5d4_xplained_mmc_defconfig
  18. - atmel_sama5d4_xplained_mmc_dev_defconfig
  19. - atmel_sama5d2_xplained_mmc_defconfig
  20. - atmel_sama5d2_xplained_mmc_dev_defconfig
  21. - microchip_sama5d27_wlsom1_ek_mmc_defconfig
  22. - microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig
  23. - microchip_sam9x60ek_mmc_defconfig
  24. - microchip_sam9x60ek_mmc_dev_defconfig
  25. - microchip_sama5d2_icp_mmc_defconfig
  26. - microchip_sama5d2_icp_mmc_dev_defconfig
  27. - microchip_sama7g5ek_mmc_defconfig
  28. - microchip_sama7g5ek_mmc_dev_defconfig
  29. These configurations will use AT91Bootstrap, u-boot and a linux kernel from
  30. the git trees maintained by Atmel.
  31. The configurations labeled as 'dev' provide a development rootfs with tools to
  32. tests the features of the SoC:
  33. - ALSA tools to test audio
  34. - FFMPEG to record video from the ISI/ISC
  35. - I2C, SPI, CAN, etc. tools
  36. - modetest for LCD screens, HDMI
  37. - Wilc1000/Wilc3000 firmware for the Atmel Wireless sdio module
  38. - SSH for convenience
  39. - GDB/GDB server for debug
  40. Configuring and building Buildroot
  41. ==================================
  42. For the Xplained/Evaluation Kit boards, the Buildroot configuration is
  43. provided to boot from an SD card. Those configurations are labeled as
  44. 'mmc'. In this case, after building Buildroot, follow the instructions
  45. in the "Preparing the SD card" section.
  46. For the other configurations listed above, the Buildroot configuration
  47. assumes the system will be flashed on NAND. In this case, after
  48. building Buildroot, follow the instructions in the "Flashing the NAND
  49. using SAM-BA" section below.
  50. To configure and build Buildroot, run:
  51. make <board>_defconfig
  52. make
  53. Flashing the NAND using SAM-BA
  54. ==============================
  55. Flashing the board
  56. ------------------
  57. Connect the board:
  58. o at91sam9g45m10ek: DBGU: J10, USB sam-ba: J14
  59. o at91sam9rlek: DBGU: J19, USB sam-ba: J21
  60. o at91sam9x5ek: DBGU: J11, USB sam-ba: J20
  61. o sama5d3xek: DBGU: J14, USB sam-ba: J20
  62. o sama5d3 Xplained: DBGU: J23, USB sam-ba: J6
  63. o sama5d4ek: DBGU: J22 or J24, USB sam-ba: J1
  64. o sama5d4 Xplained: DBGU: J1, USB sam-ba: J11
  65. Start the board in RomBOOT:
  66. o at91sam9g45m10ek:
  67. 1. open JP8, JP10 and JP12
  68. 2. start the board
  69. 3. close JP8, JP10 and JP12
  70. o at91sam9rlek:
  71. 1. J11 on 1-2 (BMS=1), open J12 and J13
  72. 2. start the board
  73. 3. close J12 and J13
  74. o at91sam9x5ek:
  75. 1. open JP9 and:
  76. - Cogent: open *NCS jumper
  77. - Embest: open SW1
  78. - Ronetix: open J1 and J2
  79. 2. start the board
  80. 3. close JP9 and:
  81. - Cogent: close *NCS jumper
  82. - Embest: close SW1 (ON position)
  83. - Ronetix: close J1 and J2
  84. o sama5d3xek:
  85. 1. start the board
  86. 2. push BP4 and BP1
  87. 3. release BP1
  88. 4. release BP4
  89. o sama5d3 Xplained:
  90. 1. open JP5 (NANDCS) and JP6 (SPICS)
  91. 2. start the board
  92. 3. close JP5 ans JP6
  93. o sama5d4ek:
  94. 1. start the board
  95. 2. push BP3 and BP4
  96. 3. release BP4
  97. 4. release BP3
  98. o sama5d4 Xplained:
  99. 1. close JP7 (BOOT_DIS)
  100. 2. start the board
  101. 3. open JP7
  102. "RomBOOT" should appear on your console (this should be ttyUSBx or ttyACMx)
  103. Now locate the USB sam-ba interface it should be ttyACMx, usually ttyACM0
  104. dmesg on your machine should give:
  105. usb 1-2.1.4: New USB device found, idVendor=03eb, idProduct=6124
  106. usb 1-2.1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
  107. cdc_acm 1-2.1.4:1.0: ttyACM0: USB ACM device
  108. Look for idVendor=03eb, idProduct=6124, this is the interface you want to use.
  109. You can then flash the board using the provided flasher.sh script in board/atmel:
  110. board/atmel/flasher.sh <builddir_path> <interface> <board>
  111. For example, for an out of tree build made in
  112. /tmp/atmel_sama5d3_xplained/ for the sama5d3 Xplained, you would use:
  113. board/atmel/flasher.sh /tmp/atmel_sama5d3_xplained/ /dev/ttyACM0 sama5d3_xplained
  114. Reboot, the system should boot up to the buildroot login invite.
  115. Preparing the SD card
  116. =====================
  117. An image named sdcard.img is automatically generated. With this image,
  118. you no longer have to care about the creation of the partition and
  119. copying files to the SD card.
  120. You need at least a 1GB SD card. All the data on the SD card will be
  121. lost. To copy the image on the SD card:
  122. /!\ Caution be sure to do it on the right mmcblk device /!\
  123. dd if=output/images/sdcard.img of=/dev/mmcblk0
  124. Insert your SD card in your Xplained/Evaluation Kit board, and
  125. enjoy. The default U-Boot environment will load properly the kernel
  126. and Device Tree blob from the first partition of the SD card, so
  127. everything works automatically.
  128. By default a 16MB FAT partition is created. It contains at91bootstrap,
  129. u-boot, the kernel image and all dtb variants for your board. The dtb
  130. used is the basic one:
  131. U-Boot> print
  132. [...]
  133. bootcmd=fatload mmc 1:1 0x21000000 at91-sama5d2_xplained.dtb; fatload mmc 1:1 0x22000000 zImage; bootz 0x22000000 - 0x21000000
  134. [...]
  135. If you want to use a variant such as the _pda7 one, you will have to
  136. update your u-boot environment:
  137. U-Boot> setenv bootcmd 'fatload mmc 1:1 0x21000000 at91-sama5d2_xplained_pda7.dtb; fatload mmc 1:1 0x22000000 zImage; bootz 0x22000000 - 0x21000000'
  138. U-Boot> save
  139. Saving Environment to FAT...
  140. writing uboot.env
  141. done
  142. A 512MB ext4 partition is also created to store the rootfs generated.
  143. If you want to customize the size of the partitions and their content,
  144. take a look at the the genimage.cfg file in the board directory.