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