forked from linux4sam/at91bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.txt
194 lines (142 loc) · 6.02 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
AT91Bootstrap Project
AT91Bootstrap is the 2nd level bootloader for Atmel SMART microprocessors (aka AT91).
It providing a set of algorithms to manage the hardware initialization such as
clock speed configuration, PIO settings, DRAM initialization, to download your
main application from specified boot media: NAND FLASH, serial FLASH (both
AT25-compatible of DataFlash), serial EEPROM, SD Card, etc. to main memory and
to start it.
1 GNU ARM Toolchain
================================================================================
AT91Bootstrap has been compiled and tested under Linux using the following GNU
ARM Toolchain:
- gcc version 4.2.1 (CodeSourcery Sourcery G++ Lite 2007q3-51)
- gcc version 4.2.3 (Sourcery G++ Lite 2008q1-126)
- gcc version 4.3.5 (Buildroot 2011.05)
- gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67)
- gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202)
- gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41)
- gcc version 4.5.3 20110223 (prerelease) (GCC) (OE 2011.03)
- gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
- gcc version 4.7.2 (Sourcery CodeBench Lite 2012.09-64)
- gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-24)
- gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
2 Compile AT91Bootstrap
================================================================================
2.1 Compile DataFlashBoot
Let's use at91sam9x5ek as an example,
2.1.1 Compile booting u-boot image from DataFlash
$ cd <project directory>
$ make mrproper
$ make at91sam9x5ekdf_uboot_defconfig
$ make
If the building process is successful, the final .bin image can be found under
binaries/
2.1.2 Compile booting kernel image from DataFlash
$ cd <project directory>
$ make mrproper
$ make at91sam9x5ekdf_linux_defconfig
$ make
If the building process is successful, the final .bin image can be found under
binaries/
2.1.3 Compile booting kernel & dt image from DataFlash
$ cd <project directory>
$ make mrproper
$ make at91sam9x5ekdf_linux_dt_defconfig
$ make
If the building process is successful, the final .bin image can be found under
binaries/
2.2 Compile NandFlashBoot
Let's use at91sam9m10g45ek as an example,
2.2.1 Compile booting u-boot image from NandFlash
$ cd <project directory>
$ make mrproper
$ make at91sam9m10g45eknf_uboot_defconfig
$ make
If the building process is successful, the final .bin image can be found under
binaries/
2.2.2 Compile booting kernel image from NandFlash
$ cd <project directory>
$ make mrproper
$ make at91sam9m10g45eknf_linux_defconfig
$ make
If the building process is successful, the final .bin image can be found under
binaries/
2.2.3 Compile booting kernel & dt image from NandFlash
$ cd <project directory>
$ make mrproper
$ make at91sam9m10g45eknf_linux_dt_defconfig
$ make
If the building process is successful, the final .bin image can be found under
binaries/
2.3 Compile SDCardBoot
Let's use at91sam9m10g45ek as an example,
2.3.1 Compile booting u-boot image from SDCard
$ cd <project directory>
$ make mrproper
$ make at91sam9m10g45eksd_uboot_defconfig
$ make
If the building process is successful, the final .bin image can be found under
binaries/
2.3.2 Compile booting linux image from SDCard
$ cd <project directory>
$ make mrproper
$ make at91sam9m10g45eksd_linux_defconfig
$ make
If the building process is successful, the final .bin image can be found under
binaries/
2.3.3 Compile booting linux & dt image from SDCard
$ cd <project directory>
$ make mrproper
$ make at91sam9m10g45eksd_linux_dt_defconfig
$ make
If the building process is successful, the final .bin image can be found under
binaries/
3 Release
================================================================================
If you plan to release the project, you can use the command as below
$ cd <project directory>
$ make tarball
If the command is successful, the .tar.gz tar package can be found under
the project top directory.
4. Others
================================================================================
4.1 About booting from NOR flash.
4.1.1 ROM Code version
Booting from the external NOR flash is supported in ROM code v2.1
for SAMA5D3x. Bootstrap relocates the binary to the internal SRAM and run.
4.1.2. SAM-BA
Using SAM-BA to program the binary to the NOR flash has a little different
from other booting mode. there is no 'Send Boot File' command for NOR flash.
You should use 'Send File' command to send the binary file as same as
the normal file, with 'Address' selected to 0.
5 Contributing your own board
================================================================================
If the system board that you have is not listed, then you will need
to port AT91Bootstrap to your hardware platform. To do this, follow these
steps:
1. Create a new directory to hold your board specific code under
contrib/board/ directory. Add any files you need.
In your board directory, you will need at least the "board.mk",
a "<board>.c", "<board>.h", "Config.in.board", and "Config.in.boardname".
2. Create the necessary default configuration files such as
"<board>df_uboot_defconfig" in your new board directory.
3. Add(source) your board's "Config.in.board" in "contrib/board/Config.in.board" file.
4. Add(source) your board's "Config.in.boardname" in the "contrib/board/Config.in.boardname" file.
5. Add your board's "<board>.h" in the "contrib/include/contrib_board.h" file.
6. Run "make <board>df_uboot_defconfig" with your new name.
7. Type "make", and you should get the final .bin image can be found under
the binaries/ directory.
6 Contributing
================================================================================
To contribute to AT91Bootstrap you should submit the patches for review to:
the github pull-request facility directly or the forum. And don't forget to
Cc the maintainers.
AT91 Forum:
http://www.at91.com/discussions/
Maintainers:
Wenyou Yang <[email protected]>
Nicolas Ferre <[email protected]>
When creating patches insert the [at91bootstrap] tag in the subject, for example
use something like:
git format-patch -s --subject-prefix='at91bootstrap][PATCH' <origin>
-End-