Commit 5991703e88f320767d9390d64a6a9bd62560696b
Committed by
Tom Rini
1 parent
34ee947ac3
Exists in
v2017.01-smarct4x
and in
25 other branches
spl: dfu: move DFU Kconfig to SPL Kconfig
The DFU Kconfig menu entries should be part of the SPL Kconfig file. Also avoid using the top level Makefile by moving the config dependent build artifacts to the driver/ and driver/usb/gadget/ Makfiles. With that, DFU can be built again in SPL if CONFIG_SPL_DFU_SUPPORT is enabled. Fixes: 6ad6102246d8 ("usb:gadget: Disallow DFU in SPL for now") Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Showing 6 changed files with 35 additions and 33 deletions Inline Diff
Kconfig
1 | # | 1 | # |
2 | # For a description of the syntax of this configuration file, | 2 | # For a description of the syntax of this configuration file, |
3 | # see the file Documentation/kbuild/kconfig-language.txt in the | 3 | # see the file Documentation/kbuild/kconfig-language.txt in the |
4 | # Linux kernel source tree. | 4 | # Linux kernel source tree. |
5 | # | 5 | # |
6 | mainmenu "U-Boot $UBOOTVERSION Configuration" | 6 | mainmenu "U-Boot $UBOOTVERSION Configuration" |
7 | 7 | ||
8 | config UBOOTVERSION | 8 | config UBOOTVERSION |
9 | string | 9 | string |
10 | option env="UBOOTVERSION" | 10 | option env="UBOOTVERSION" |
11 | 11 | ||
12 | # Allow defaults in arch-specific code to override any given here | 12 | # Allow defaults in arch-specific code to override any given here |
13 | source "arch/Kconfig" | 13 | source "arch/Kconfig" |
14 | 14 | ||
15 | menu "General setup" | 15 | menu "General setup" |
16 | 16 | ||
17 | config LOCALVERSION | 17 | config LOCALVERSION |
18 | string "Local version - append to U-Boot release" | 18 | string "Local version - append to U-Boot release" |
19 | help | 19 | help |
20 | Append an extra string to the end of your U-Boot version. | 20 | Append an extra string to the end of your U-Boot version. |
21 | This will show up in your boot log, for example. | 21 | This will show up in your boot log, for example. |
22 | The string you set here will be appended after the contents of | 22 | The string you set here will be appended after the contents of |
23 | any files with a filename matching localversion* in your | 23 | any files with a filename matching localversion* in your |
24 | object and source tree, in that order. Your total string can | 24 | object and source tree, in that order. Your total string can |
25 | be a maximum of 64 characters. | 25 | be a maximum of 64 characters. |
26 | 26 | ||
27 | config LOCALVERSION_AUTO | 27 | config LOCALVERSION_AUTO |
28 | bool "Automatically append version information to the version string" | 28 | bool "Automatically append version information to the version string" |
29 | default y | 29 | default y |
30 | help | 30 | help |
31 | This will try to automatically determine if the current tree is a | 31 | This will try to automatically determine if the current tree is a |
32 | release tree by looking for Git tags that belong to the current | 32 | release tree by looking for Git tags that belong to the current |
33 | top of tree revision. | 33 | top of tree revision. |
34 | 34 | ||
35 | A string of the format -gxxxxxxxx will be added to the localversion | 35 | A string of the format -gxxxxxxxx will be added to the localversion |
36 | if a Git-based tree is found. The string generated by this will be | 36 | if a Git-based tree is found. The string generated by this will be |
37 | appended after any matching localversion* files, and after the value | 37 | appended after any matching localversion* files, and after the value |
38 | set in CONFIG_LOCALVERSION. | 38 | set in CONFIG_LOCALVERSION. |
39 | 39 | ||
40 | (The actual string used here is the first eight characters produced | 40 | (The actual string used here is the first eight characters produced |
41 | by running the command: | 41 | by running the command: |
42 | 42 | ||
43 | $ git rev-parse --verify HEAD | 43 | $ git rev-parse --verify HEAD |
44 | 44 | ||
45 | which is done within the script "scripts/setlocalversion".) | 45 | which is done within the script "scripts/setlocalversion".) |
46 | 46 | ||
47 | config CC_OPTIMIZE_FOR_SIZE | 47 | config CC_OPTIMIZE_FOR_SIZE |
48 | bool "Optimize for size" | 48 | bool "Optimize for size" |
49 | default y | 49 | default y |
50 | help | 50 | help |
51 | Enabling this option will pass "-Os" instead of "-O2" to gcc | 51 | Enabling this option will pass "-Os" instead of "-O2" to gcc |
52 | resulting in a smaller U-Boot image. | 52 | resulting in a smaller U-Boot image. |
53 | 53 | ||
54 | This option is enabled by default for U-Boot. | 54 | This option is enabled by default for U-Boot. |
55 | 55 | ||
56 | config DISTRO_DEFAULTS | 56 | config DISTRO_DEFAULTS |
57 | bool "Select defaults suitable for booting general purpose Linux distributions" | 57 | bool "Select defaults suitable for booting general purpose Linux distributions" |
58 | default y if ARCH_SUNXI | 58 | default y if ARCH_SUNXI |
59 | default y if ARCH_LS2080A | 59 | default y if ARCH_LS2080A |
60 | default n | 60 | default n |
61 | select CMD_BOOTZ if ARM && !ARM64 | 61 | select CMD_BOOTZ if ARM && !ARM64 |
62 | select CMD_BOOTI if ARM64 | 62 | select CMD_BOOTI if ARM64 |
63 | select CMD_DHCP | 63 | select CMD_DHCP |
64 | select CMD_EXT2 | 64 | select CMD_EXT2 |
65 | select CMD_EXT4 | 65 | select CMD_EXT4 |
66 | select CMD_FAT | 66 | select CMD_FAT |
67 | select CMD_FS_GENERIC | 67 | select CMD_FS_GENERIC |
68 | select CMD_MII | 68 | select CMD_MII |
69 | select CMD_PING | 69 | select CMD_PING |
70 | select HUSH_PARSER | 70 | select HUSH_PARSER |
71 | help | 71 | help |
72 | Select this to enable various options and commands which are suitable | 72 | Select this to enable various options and commands which are suitable |
73 | for building u-boot for booting general purpose Linux distributions. | 73 | for building u-boot for booting general purpose Linux distributions. |
74 | 74 | ||
75 | config SYS_MALLOC_F | 75 | config SYS_MALLOC_F |
76 | bool "Enable malloc() pool before relocation" | 76 | bool "Enable malloc() pool before relocation" |
77 | default y if DM | 77 | default y if DM |
78 | help | 78 | help |
79 | Before relocation, memory is very limited on many platforms. Still, | 79 | Before relocation, memory is very limited on many platforms. Still, |
80 | we can provide a small malloc() pool if needed. Driver model in | 80 | we can provide a small malloc() pool if needed. Driver model in |
81 | particular needs this to operate, so that it can allocate the | 81 | particular needs this to operate, so that it can allocate the |
82 | initial serial device and any others that are needed. | 82 | initial serial device and any others that are needed. |
83 | 83 | ||
84 | config SYS_MALLOC_F_LEN | 84 | config SYS_MALLOC_F_LEN |
85 | hex "Size of malloc() pool before relocation" | 85 | hex "Size of malloc() pool before relocation" |
86 | depends on SYS_MALLOC_F | 86 | depends on SYS_MALLOC_F |
87 | default 0x400 | 87 | default 0x400 |
88 | help | 88 | help |
89 | Before relocation, memory is very limited on many platforms. Still, | 89 | Before relocation, memory is very limited on many platforms. Still, |
90 | we can provide a small malloc() pool if needed. Driver model in | 90 | we can provide a small malloc() pool if needed. Driver model in |
91 | particular needs this to operate, so that it can allocate the | 91 | particular needs this to operate, so that it can allocate the |
92 | initial serial device and any others that are needed. | 92 | initial serial device and any others that are needed. |
93 | 93 | ||
94 | menuconfig EXPERT | 94 | menuconfig EXPERT |
95 | bool "Configure standard U-Boot features (expert users)" | 95 | bool "Configure standard U-Boot features (expert users)" |
96 | default y | 96 | default y |
97 | help | 97 | help |
98 | This option allows certain base U-Boot options and settings | 98 | This option allows certain base U-Boot options and settings |
99 | to be disabled or tweaked. This is for specialized | 99 | to be disabled or tweaked. This is for specialized |
100 | environments which can tolerate a "non-standard" U-Boot. | 100 | environments which can tolerate a "non-standard" U-Boot. |
101 | Use this only if you really know what you are doing. | 101 | Use this only if you really know what you are doing. |
102 | 102 | ||
103 | if EXPERT | 103 | if EXPERT |
104 | config SYS_MALLOC_CLEAR_ON_INIT | 104 | config SYS_MALLOC_CLEAR_ON_INIT |
105 | bool "Init with zeros the memory reserved for malloc (slow)" | 105 | bool "Init with zeros the memory reserved for malloc (slow)" |
106 | default y | 106 | default y |
107 | help | 107 | help |
108 | This setting is enabled by default. The reserved malloc | 108 | This setting is enabled by default. The reserved malloc |
109 | memory is initialized with zeros, so first malloc calls | 109 | memory is initialized with zeros, so first malloc calls |
110 | will return the pointer to the zeroed memory. But this | 110 | will return the pointer to the zeroed memory. But this |
111 | slows the boot time. | 111 | slows the boot time. |
112 | 112 | ||
113 | It is recommended to disable it, when CONFIG_SYS_MALLOC_LEN | 113 | It is recommended to disable it, when CONFIG_SYS_MALLOC_LEN |
114 | value, has more than few MiB, e.g. when uses bzip2 or bmp logo. | 114 | value, has more than few MiB, e.g. when uses bzip2 or bmp logo. |
115 | Then the boot time can be significantly reduced. | 115 | Then the boot time can be significantly reduced. |
116 | Warning: | 116 | Warning: |
117 | When disabling this, please check if malloc calls, maybe | 117 | When disabling this, please check if malloc calls, maybe |
118 | should be replaced by calloc - if one expects zeroed memory. | 118 | should be replaced by calloc - if one expects zeroed memory. |
119 | 119 | ||
120 | config TOOLS_DEBUG | 120 | config TOOLS_DEBUG |
121 | bool "Enable debug information for tools" | 121 | bool "Enable debug information for tools" |
122 | help | 122 | help |
123 | Enable generation of debug information for tools such as mkimage. | 123 | Enable generation of debug information for tools such as mkimage. |
124 | This can be used for debugging purposes. With debug information | 124 | This can be used for debugging purposes. With debug information |
125 | it is possible to set breakpoints on particular lines, single-step | 125 | it is possible to set breakpoints on particular lines, single-step |
126 | debug through the source code, etc. | 126 | debug through the source code, etc. |
127 | 127 | ||
128 | endif | 128 | endif |
129 | 129 | ||
130 | config PHYS_64BIT | 130 | config PHYS_64BIT |
131 | bool "64bit physical address support" | 131 | bool "64bit physical address support" |
132 | help | 132 | help |
133 | Say Y here to support 64bit physical memory address. | 133 | Say Y here to support 64bit physical memory address. |
134 | This can be used not only for 64bit SoCs, but also for | 134 | This can be used not only for 64bit SoCs, but also for |
135 | large physical address extention on 32bit SoCs. | 135 | large physical address extention on 32bit SoCs. |
136 | 136 | ||
137 | endmenu # General setup | 137 | endmenu # General setup |
138 | 138 | ||
139 | menu "Boot images" | 139 | menu "Boot images" |
140 | 140 | ||
141 | config FIT | 141 | config FIT |
142 | bool "Support Flattened Image Tree" | 142 | bool "Support Flattened Image Tree" |
143 | help | 143 | help |
144 | This option allows to boot the new uImage structrure, | 144 | This option allows to boot the new uImage structrure, |
145 | Flattened Image Tree. FIT is formally a FDT, which can include | 145 | Flattened Image Tree. FIT is formally a FDT, which can include |
146 | images of various types (kernel, FDT blob, ramdisk, etc.) | 146 | images of various types (kernel, FDT blob, ramdisk, etc.) |
147 | in a single blob. To boot this new uImage structure, | 147 | in a single blob. To boot this new uImage structure, |
148 | pass the address of the blob to the "bootm" command. | 148 | pass the address of the blob to the "bootm" command. |
149 | FIT is very flexible, supporting compression, multiple images, | 149 | FIT is very flexible, supporting compression, multiple images, |
150 | multiple configurations, verification through hashing and also | 150 | multiple configurations, verification through hashing and also |
151 | verified boot (secure boot using RSA). This option enables that | 151 | verified boot (secure boot using RSA). This option enables that |
152 | feature. | 152 | feature. |
153 | 153 | ||
154 | config SPL_FIT | 154 | config SPL_FIT |
155 | bool "Support Flattened Image Tree within SPL" | 155 | bool "Support Flattened Image Tree within SPL" |
156 | depends on FIT | 156 | depends on FIT |
157 | depends on SPL | 157 | depends on SPL |
158 | 158 | ||
159 | config FIT_VERBOSE | 159 | config FIT_VERBOSE |
160 | bool "Display verbose messages on FIT boot" | 160 | bool "Display verbose messages on FIT boot" |
161 | depends on FIT | 161 | depends on FIT |
162 | 162 | ||
163 | config FIT_SIGNATURE | 163 | config FIT_SIGNATURE |
164 | bool "Enable signature verification of FIT uImages" | 164 | bool "Enable signature verification of FIT uImages" |
165 | depends on FIT | 165 | depends on FIT |
166 | depends on DM | 166 | depends on DM |
167 | select RSA | 167 | select RSA |
168 | help | 168 | help |
169 | This option enables signature verification of FIT uImages, | 169 | This option enables signature verification of FIT uImages, |
170 | using a hash signed and verified using RSA. If | 170 | using a hash signed and verified using RSA. If |
171 | CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive | 171 | CONFIG_SHA_PROG_HW_ACCEL is defined, i.e support for progressive |
172 | hashing is available using hardware, then then RSA library will use | 172 | hashing is available using hardware, then then RSA library will use |
173 | it. See doc/uImage.FIT/signature.txt for more details. | 173 | it. See doc/uImage.FIT/signature.txt for more details. |
174 | 174 | ||
175 | WARNING: When relying on signed FIT images with a required signature | 175 | WARNING: When relying on signed FIT images with a required signature |
176 | check the legacy image format is disabled by default, so that | 176 | check the legacy image format is disabled by default, so that |
177 | unsigned images cannot be loaded. If a board needs the legacy image | 177 | unsigned images cannot be loaded. If a board needs the legacy image |
178 | format support in this case, enable it using | 178 | format support in this case, enable it using |
179 | CONFIG_IMAGE_FORMAT_LEGACY. | 179 | CONFIG_IMAGE_FORMAT_LEGACY. |
180 | 180 | ||
181 | config SPL_FIT_SIGNATURE | 181 | config SPL_FIT_SIGNATURE |
182 | bool "Enable signature verification of FIT firmware within SPL" | 182 | bool "Enable signature verification of FIT firmware within SPL" |
183 | depends on SPL_FIT | 183 | depends on SPL_FIT |
184 | depends on SPL_DM | 184 | depends on SPL_DM |
185 | select SPL_RSA | 185 | select SPL_RSA |
186 | 186 | ||
187 | config FIT_BEST_MATCH | 187 | config FIT_BEST_MATCH |
188 | bool "Select the best match for the kernel device tree" | 188 | bool "Select the best match for the kernel device tree" |
189 | depends on FIT | 189 | depends on FIT |
190 | help | 190 | help |
191 | When no configuration is explicitly selected, default to the | 191 | When no configuration is explicitly selected, default to the |
192 | one whose fdt's compatibility field best matches that of | 192 | one whose fdt's compatibility field best matches that of |
193 | U-Boot itself. A match is considered "best" if it matches the | 193 | U-Boot itself. A match is considered "best" if it matches the |
194 | most specific compatibility entry of U-Boot's fdt's root node. | 194 | most specific compatibility entry of U-Boot's fdt's root node. |
195 | The order of entries in the configuration's fdt is ignored. | 195 | The order of entries in the configuration's fdt is ignored. |
196 | 196 | ||
197 | config FIT_VERBOSE | 197 | config FIT_VERBOSE |
198 | bool "Show verbose messages when FIT images fails" | 198 | bool "Show verbose messages when FIT images fails" |
199 | depends on FIT | 199 | depends on FIT |
200 | help | 200 | help |
201 | Generally a system will have valid FIT images so debug messages | 201 | Generally a system will have valid FIT images so debug messages |
202 | are a waste of code space. If you are debugging your images then | 202 | are a waste of code space. If you are debugging your images then |
203 | you can enable this option to get more verbose information about | 203 | you can enable this option to get more verbose information about |
204 | failures. | 204 | failures. |
205 | 205 | ||
206 | config OF_BOARD_SETUP | 206 | config OF_BOARD_SETUP |
207 | bool "Set up board-specific details in device tree before boot" | 207 | bool "Set up board-specific details in device tree before boot" |
208 | depends on OF_LIBFDT | 208 | depends on OF_LIBFDT |
209 | help | 209 | help |
210 | This causes U-Boot to call ft_board_setup() before booting into | 210 | This causes U-Boot to call ft_board_setup() before booting into |
211 | the Operating System. This function can set up various | 211 | the Operating System. This function can set up various |
212 | board-specific information in the device tree for use by the OS. | 212 | board-specific information in the device tree for use by the OS. |
213 | The device tree is then passed to the OS. | 213 | The device tree is then passed to the OS. |
214 | 214 | ||
215 | config OF_SYSTEM_SETUP | 215 | config OF_SYSTEM_SETUP |
216 | bool "Set up system-specific details in device tree before boot" | 216 | bool "Set up system-specific details in device tree before boot" |
217 | depends on OF_LIBFDT | 217 | depends on OF_LIBFDT |
218 | help | 218 | help |
219 | This causes U-Boot to call ft_system_setup() before booting into | 219 | This causes U-Boot to call ft_system_setup() before booting into |
220 | the Operating System. This function can set up various | 220 | the Operating System. This function can set up various |
221 | system-specific information in the device tree for use by the OS. | 221 | system-specific information in the device tree for use by the OS. |
222 | The device tree is then passed to the OS. | 222 | The device tree is then passed to the OS. |
223 | 223 | ||
224 | config OF_STDOUT_VIA_ALIAS | 224 | config OF_STDOUT_VIA_ALIAS |
225 | bool "Update the device-tree stdout alias from U-Boot" | 225 | bool "Update the device-tree stdout alias from U-Boot" |
226 | depends on OF_LIBFDT | 226 | depends on OF_LIBFDT |
227 | help | 227 | help |
228 | This uses U-Boot's serial alias from the aliases node to update | 228 | This uses U-Boot's serial alias from the aliases node to update |
229 | the device tree passed to the OS. The "linux,stdout-path" property | 229 | the device tree passed to the OS. The "linux,stdout-path" property |
230 | in the chosen node is set to point to the correct serial node. | 230 | in the chosen node is set to point to the correct serial node. |
231 | This option currently references CONFIG_CONS_INDEX, which is | 231 | This option currently references CONFIG_CONS_INDEX, which is |
232 | incorrect when used with device tree as this option does not | 232 | incorrect when used with device tree as this option does not |
233 | exist / should not be used. | 233 | exist / should not be used. |
234 | 234 | ||
235 | config SYS_EXTRA_OPTIONS | 235 | config SYS_EXTRA_OPTIONS |
236 | string "Extra Options (DEPRECATED)" | 236 | string "Extra Options (DEPRECATED)" |
237 | help | 237 | help |
238 | The old configuration infrastructure (= mkconfig + boards.cfg) | 238 | The old configuration infrastructure (= mkconfig + boards.cfg) |
239 | provided the extra options field. If you have something like | 239 | provided the extra options field. If you have something like |
240 | "HAS_BAR,BAZ=64", the optional options | 240 | "HAS_BAR,BAZ=64", the optional options |
241 | #define CONFIG_HAS | 241 | #define CONFIG_HAS |
242 | #define CONFIG_BAZ 64 | 242 | #define CONFIG_BAZ 64 |
243 | will be defined in include/config.h. | 243 | will be defined in include/config.h. |
244 | This option was prepared for the smooth migration from the old | 244 | This option was prepared for the smooth migration from the old |
245 | configuration to Kconfig. Since this option will be removed sometime, | 245 | configuration to Kconfig. Since this option will be removed sometime, |
246 | new boards should not use this option. | 246 | new boards should not use this option. |
247 | 247 | ||
248 | config SYS_TEXT_BASE | 248 | config SYS_TEXT_BASE |
249 | depends on SPARC || ARC || X86 || ARCH_UNIPHIER || ARCH_ZYNQMP || \ | 249 | depends on SPARC || ARC || X86 || ARCH_UNIPHIER || ARCH_ZYNQMP || \ |
250 | (M68K && !TARGET_ASTRO_MCF5373L) || MICROBLAZE || MIPS | 250 | (M68K && !TARGET_ASTRO_MCF5373L) || MICROBLAZE || MIPS |
251 | depends on !EFI_APP | 251 | depends on !EFI_APP |
252 | hex "Text Base" | 252 | hex "Text Base" |
253 | help | 253 | help |
254 | TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture | 254 | TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture |
255 | 255 | ||
256 | config SPL_LOAD_FIT | 256 | config SPL_LOAD_FIT |
257 | bool "Enable SPL loading U-Boot as a FIT" | 257 | bool "Enable SPL loading U-Boot as a FIT" |
258 | depends on FIT | 258 | depends on FIT |
259 | help | 259 | help |
260 | Normally with the SPL framework a legacy image is generated as part | 260 | Normally with the SPL framework a legacy image is generated as part |
261 | of the build. This contains U-Boot along with information as to | 261 | of the build. This contains U-Boot along with information as to |
262 | where it should be loaded. This option instead enables generation | 262 | where it should be loaded. This option instead enables generation |
263 | of a FIT (Flat Image Tree) which provides more flexibility. In | 263 | of a FIT (Flat Image Tree) which provides more flexibility. In |
264 | particular it can handle selecting from multiple device tree | 264 | particular it can handle selecting from multiple device tree |
265 | and passing the correct one to U-Boot. | 265 | and passing the correct one to U-Boot. |
266 | 266 | ||
267 | config SPL_FIT_IMAGE_POST_PROCESS | 267 | config SPL_FIT_IMAGE_POST_PROCESS |
268 | bool "Enable post-processing of FIT artifacts after loading by the SPL" | 268 | bool "Enable post-processing of FIT artifacts after loading by the SPL" |
269 | depends on SPL_LOAD_FIT && TI_SECURE_DEVICE | 269 | depends on SPL_LOAD_FIT && TI_SECURE_DEVICE |
270 | help | 270 | help |
271 | Allows doing any sort of manipulation to blobs after they got extracted | 271 | Allows doing any sort of manipulation to blobs after they got extracted |
272 | from the U-Boot FIT image like stripping off headers or modifying the | 272 | from the U-Boot FIT image like stripping off headers or modifying the |
273 | size of the blob, verification, authentication, decryption etc. in a | 273 | size of the blob, verification, authentication, decryption etc. in a |
274 | platform or board specific way. In order to use this feature a platform | 274 | platform or board specific way. In order to use this feature a platform |
275 | or board-specific implementation of board_fit_image_post_process() must | 275 | or board-specific implementation of board_fit_image_post_process() must |
276 | be provided. Also, anything done during this post-processing step would | 276 | be provided. Also, anything done during this post-processing step would |
277 | need to be comprehended in how the images were prepared before being | 277 | need to be comprehended in how the images were prepared before being |
278 | injected into the FIT creation (i.e. the blobs would have been pre- | 278 | injected into the FIT creation (i.e. the blobs would have been pre- |
279 | processed before being added to the FIT image). | 279 | processed before being added to the FIT image). |
280 | 280 | ||
281 | config FIT_IMAGE_POST_PROCESS | 281 | config FIT_IMAGE_POST_PROCESS |
282 | bool "Enable post-processing of FIT artifacts after loading by U-Boot" | 282 | bool "Enable post-processing of FIT artifacts after loading by U-Boot" |
283 | depends on FIT && TI_SECURE_DEVICE | 283 | depends on FIT && TI_SECURE_DEVICE |
284 | help | 284 | help |
285 | Allows doing any sort of manipulation to blobs after they got extracted | 285 | Allows doing any sort of manipulation to blobs after they got extracted |
286 | from FIT images like stripping off headers or modifying the size of the | 286 | from FIT images like stripping off headers or modifying the size of the |
287 | blob, verification, authentication, decryption etc. in a platform or | 287 | blob, verification, authentication, decryption etc. in a platform or |
288 | board specific way. In order to use this feature a platform or board- | 288 | board specific way. In order to use this feature a platform or board- |
289 | specific implementation of board_fit_image_post_process() must be | 289 | specific implementation of board_fit_image_post_process() must be |
290 | provided. Also, anything done during this post-processing step would | 290 | provided. Also, anything done during this post-processing step would |
291 | need to be comprehended in how the images were prepared before being | 291 | need to be comprehended in how the images were prepared before being |
292 | injected into the FIT creation (i.e. the blobs would have been pre- | 292 | injected into the FIT creation (i.e. the blobs would have been pre- |
293 | processed before being added to the FIT image). | 293 | processed before being added to the FIT image). |
294 | 294 | ||
295 | config SPL_DFU_SUPPORT | ||
296 | bool "Enable SPL with DFU to load binaries to memory device" | ||
297 | depends on USB | ||
298 | help | ||
299 | Currently the SPL does not have capability to load the | ||
300 | binaries or boot images to boot devices like ram,eMMC,SPI,etc. | ||
301 | This feature enables the DFU (Device Firmware Upgarde) in SPL with | ||
302 | RAM memory device support. The ROM code will load and execute | ||
303 | the SPL built with dfu. The user can load binaries (u-boot/kernel) to | ||
304 | selected device partition from host-pc using dfu-utils. | ||
305 | This feature will be useful to flash the binaries to factory | ||
306 | or bare-metal boards using USB interface. | ||
307 | |||
308 | choice | ||
309 | bool "DFU device selection" | ||
310 | depends on SPL_DFU_SUPPORT | ||
311 | |||
312 | config SPL_DFU_RAM | ||
313 | bool "RAM device" | ||
314 | depends on SPL_DFU_SUPPORT | ||
315 | help | ||
316 | select RAM/DDR memory device for loading binary images | ||
317 | (u-boot/kernel) to the selected device partition using | ||
318 | DFU and execute the u-boot/kernel from RAM. | ||
319 | |||
320 | endchoice | ||
321 | |||
322 | config SYS_CLK_FREQ | 295 | config SYS_CLK_FREQ |
323 | depends on ARC || ARCH_SUNXI | 296 | depends on ARC || ARCH_SUNXI |
324 | int "CPU clock frequency" | 297 | int "CPU clock frequency" |
325 | help | 298 | help |
326 | TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture | 299 | TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture |
327 | 300 | ||
328 | config ARCH_FIXUP_FDT | 301 | config ARCH_FIXUP_FDT |
329 | bool "Enable arch_fixup_fdt() call" | 302 | bool "Enable arch_fixup_fdt() call" |
330 | depends on ARM || MIPS | 303 | depends on ARM || MIPS |
331 | default y | 304 | default y |
332 | help | 305 | help |
333 | Enable FDT memory map syncup before OS boot. This feature can be | 306 | Enable FDT memory map syncup before OS boot. This feature can be |
334 | used for booting OS with different memory setup where the part of | 307 | used for booting OS with different memory setup where the part of |
335 | the memory location should be used for different purpose. | 308 | the memory location should be used for different purpose. |
336 | 309 | ||
337 | endmenu # Boot images | 310 | endmenu # Boot images |
338 | 311 | ||
339 | source "common/Kconfig" | 312 | source "common/Kconfig" |
340 | 313 | ||
341 | source "cmd/Kconfig" | 314 | source "cmd/Kconfig" |
342 | 315 | ||
343 | source "dts/Kconfig" | 316 | source "dts/Kconfig" |
344 | 317 | ||
345 | source "net/Kconfig" | 318 | source "net/Kconfig" |
346 | 319 | ||
347 | source "drivers/Kconfig" | 320 | source "drivers/Kconfig" |
348 | 321 | ||
349 | source "fs/Kconfig" | 322 | source "fs/Kconfig" |
350 | 323 | ||
351 | source "lib/Kconfig" | 324 | source "lib/Kconfig" |
352 | 325 | ||
353 | source "test/Kconfig" | 326 | source "test/Kconfig" |
354 | 327 |
common/spl/Kconfig
1 | menu "SPL / TPL" | 1 | menu "SPL / TPL" |
2 | 2 | ||
3 | config SUPPORT_SPL | 3 | config SUPPORT_SPL |
4 | bool | 4 | bool |
5 | 5 | ||
6 | config SUPPORT_TPL | 6 | config SUPPORT_TPL |
7 | bool | 7 | bool |
8 | 8 | ||
9 | config SPL | 9 | config SPL |
10 | bool | 10 | bool |
11 | depends on SUPPORT_SPL | 11 | depends on SUPPORT_SPL |
12 | prompt "Enable SPL" | 12 | prompt "Enable SPL" |
13 | help | 13 | help |
14 | If you want to build SPL as well as the normal image, say Y. | 14 | If you want to build SPL as well as the normal image, say Y. |
15 | 15 | ||
16 | config SPL_SYS_MALLOC_SIMPLE | 16 | config SPL_SYS_MALLOC_SIMPLE |
17 | bool | 17 | bool |
18 | depends on SPL | 18 | depends on SPL |
19 | prompt "Only use malloc_simple functions in the SPL" | 19 | prompt "Only use malloc_simple functions in the SPL" |
20 | help | 20 | help |
21 | Say Y here to only use the *_simple malloc functions from | 21 | Say Y here to only use the *_simple malloc functions from |
22 | malloc_simple.c, rather then using the versions from dlmalloc.c; | 22 | malloc_simple.c, rather then using the versions from dlmalloc.c; |
23 | this will make the SPL binary smaller at the cost of more heap | 23 | this will make the SPL binary smaller at the cost of more heap |
24 | usage as the *_simple malloc functions do not re-use free-ed mem. | 24 | usage as the *_simple malloc functions do not re-use free-ed mem. |
25 | 25 | ||
26 | config SPL_STACK_R | 26 | config SPL_STACK_R |
27 | depends on SPL | 27 | depends on SPL |
28 | bool "Enable SDRAM location for SPL stack" | 28 | bool "Enable SDRAM location for SPL stack" |
29 | help | 29 | help |
30 | SPL starts off execution in SRAM and thus typically has only a small | 30 | SPL starts off execution in SRAM and thus typically has only a small |
31 | stack available. Since SPL sets up DRAM while in its board_init_f() | 31 | stack available. Since SPL sets up DRAM while in its board_init_f() |
32 | function, it is possible for the stack to move there before | 32 | function, it is possible for the stack to move there before |
33 | board_init_r() is reached. This option enables a special SDRAM | 33 | board_init_r() is reached. This option enables a special SDRAM |
34 | location for the SPL stack. U-Boot SPL switches to this after | 34 | location for the SPL stack. U-Boot SPL switches to this after |
35 | board_init_f() completes, and before board_init_r() starts. | 35 | board_init_f() completes, and before board_init_r() starts. |
36 | 36 | ||
37 | config SPL_STACK_R_ADDR | 37 | config SPL_STACK_R_ADDR |
38 | depends on SPL_STACK_R | 38 | depends on SPL_STACK_R |
39 | hex "SDRAM location for SPL stack" | 39 | hex "SDRAM location for SPL stack" |
40 | help | 40 | help |
41 | Specify the address in SDRAM for the SPL stack. This will be set up | 41 | Specify the address in SDRAM for the SPL stack. This will be set up |
42 | before board_init_r() is called. | 42 | before board_init_r() is called. |
43 | 43 | ||
44 | config SPL_STACK_R_MALLOC_SIMPLE_LEN | 44 | config SPL_STACK_R_MALLOC_SIMPLE_LEN |
45 | depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE | 45 | depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE |
46 | hex "Size of malloc_simple heap after switching to DRAM SPL stack" | 46 | hex "Size of malloc_simple heap after switching to DRAM SPL stack" |
47 | default 0x100000 | 47 | default 0x100000 |
48 | help | 48 | help |
49 | Specify the amount of the stack to use as memory pool for | 49 | Specify the amount of the stack to use as memory pool for |
50 | malloc_simple after switching the stack to DRAM. This may be set | 50 | malloc_simple after switching the stack to DRAM. This may be set |
51 | to give board_init_r() a larger heap then the initial heap in | 51 | to give board_init_r() a larger heap then the initial heap in |
52 | SRAM which is limited to SYS_MALLOC_F_LEN bytes. | 52 | SRAM which is limited to SYS_MALLOC_F_LEN bytes. |
53 | 53 | ||
54 | config SPL_SEPARATE_BSS | 54 | config SPL_SEPARATE_BSS |
55 | depends on SPL | 55 | depends on SPL |
56 | bool "BSS section is in a different memory region from text" | 56 | bool "BSS section is in a different memory region from text" |
57 | help | 57 | help |
58 | Some platforms need a large BSS region in SPL and can provide this | 58 | Some platforms need a large BSS region in SPL and can provide this |
59 | because RAM is already set up. In this case BSS can be moved to RAM. | 59 | because RAM is already set up. In this case BSS can be moved to RAM. |
60 | This option should then be enabled so that the correct device tree | 60 | This option should then be enabled so that the correct device tree |
61 | location is used. Normally we put the device tree at the end of BSS | 61 | location is used. Normally we put the device tree at the end of BSS |
62 | but with this option enabled, it goes at _image_binary_end. | 62 | but with this option enabled, it goes at _image_binary_end. |
63 | 63 | ||
64 | config SPL_DISPLAY_PRINT | 64 | config SPL_DISPLAY_PRINT |
65 | depends on SPL | 65 | depends on SPL |
66 | bool "Display a board-specific message in SPL" | 66 | bool "Display a board-specific message in SPL" |
67 | help | 67 | help |
68 | If this option is enabled, U-Boot will call the function | 68 | If this option is enabled, U-Boot will call the function |
69 | spl_display_print() immediately after displaying the SPL console | 69 | spl_display_print() immediately after displaying the SPL console |
70 | banner ("U-Boot SPL ..."). This function should be provided by | 70 | banner ("U-Boot SPL ..."). This function should be provided by |
71 | the board. | 71 | the board. |
72 | 72 | ||
73 | config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR | 73 | config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR |
74 | bool "MMC raw mode: by sector" | 74 | bool "MMC raw mode: by sector" |
75 | depends on SPL | 75 | depends on SPL |
76 | default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER ||ARCH_MX6 || \ | 76 | default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER ||ARCH_MX6 || \ |
77 | ARCH_ROCKCHIP || ARCH_MVEBU || ARCH_SOCFPGA || \ | 77 | ARCH_ROCKCHIP || ARCH_MVEBU || ARCH_SOCFPGA || \ |
78 | ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \ | 78 | ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \ |
79 | OMAP44XX || OMAP54XX || AM33XX || AM43XX | 79 | OMAP44XX || OMAP54XX || AM33XX || AM43XX |
80 | help | 80 | help |
81 | Use sector number for specifying U-Boot location on MMC/SD in | 81 | Use sector number for specifying U-Boot location on MMC/SD in |
82 | raw mode. | 82 | raw mode. |
83 | 83 | ||
84 | config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR | 84 | config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR |
85 | hex "Address on the MMC to load U-Boot from" | 85 | hex "Address on the MMC to load U-Boot from" |
86 | depends on SPL && SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR | 86 | depends on SPL && SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR |
87 | default 0x50 if ARCH_SUNXI | 87 | default 0x50 if ARCH_SUNXI |
88 | default 0x75 if ARCH_DAVINCI | 88 | default 0x75 if ARCH_DAVINCI |
89 | default 0x80 if ARCH_UNIPHIER | 89 | default 0x80 if ARCH_UNIPHIER |
90 | default 0x8a if ARCH_MX6 | 90 | default 0x8a if ARCH_MX6 |
91 | default 0x100 if ARCH_ROCKCHIP | 91 | default 0x100 if ARCH_ROCKCHIP |
92 | default 0x140 if ARCH_MVEBU | 92 | default 0x140 if ARCH_MVEBU |
93 | default 0x200 if ARCH_SOCFPGA || ARCH_AT91 | 93 | default 0x200 if ARCH_SOCFPGA || ARCH_AT91 |
94 | default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \ | 94 | default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \ |
95 | OMAP54XX || AM33XX || AM43XX | 95 | OMAP54XX || AM33XX || AM43XX |
96 | help | 96 | help |
97 | Address on the MMC to load U-Boot from, when the MMC is being used | 97 | Address on the MMC to load U-Boot from, when the MMC is being used |
98 | in raw mode. Units: MMC sectors (1 sector = 512 bytes). | 98 | in raw mode. Units: MMC sectors (1 sector = 512 bytes). |
99 | 99 | ||
100 | config TPL | 100 | config TPL |
101 | bool | 101 | bool |
102 | depends on SPL && SUPPORT_TPL | 102 | depends on SPL && SUPPORT_TPL |
103 | prompt "Enable TPL" | 103 | prompt "Enable TPL" |
104 | help | 104 | help |
105 | If you want to build TPL as well as the normal image and SPL, say Y. | 105 | If you want to build TPL as well as the normal image and SPL, say Y. |
106 | 106 | ||
107 | config SPL_CRC32_SUPPORT | 107 | config SPL_CRC32_SUPPORT |
108 | bool "Support CRC32" | 108 | bool "Support CRC32" |
109 | depends on SPL_FIT | 109 | depends on SPL_FIT |
110 | help | 110 | help |
111 | Enable this to support CRC32 in FIT images within SPL. This is a | 111 | Enable this to support CRC32 in FIT images within SPL. This is a |
112 | 32-bit checksum value that can be used to verify images. This is | 112 | 32-bit checksum value that can be used to verify images. This is |
113 | the least secure type of checksum, suitable for detected | 113 | the least secure type of checksum, suitable for detected |
114 | accidental image corruption. For secure applications you should | 114 | accidental image corruption. For secure applications you should |
115 | consider SHA1 or SHA256. | 115 | consider SHA1 or SHA256. |
116 | 116 | ||
117 | config SPL_MD5_SUPPORT | 117 | config SPL_MD5_SUPPORT |
118 | bool "Support MD5" | 118 | bool "Support MD5" |
119 | depends on SPL_FIT | 119 | depends on SPL_FIT |
120 | help | 120 | help |
121 | Enable this to support MD5 in FIT images within SPL. An MD5 | 121 | Enable this to support MD5 in FIT images within SPL. An MD5 |
122 | checksum is a 128-bit hash value used to check that the image | 122 | checksum is a 128-bit hash value used to check that the image |
123 | contents have not been corrupted. Note that MD5 is not considered | 123 | contents have not been corrupted. Note that MD5 is not considered |
124 | secure as it is possible (with a brute-force attack) to adjust the | 124 | secure as it is possible (with a brute-force attack) to adjust the |
125 | image while still retaining the same MD5 hash value. For secure | 125 | image while still retaining the same MD5 hash value. For secure |
126 | applications where images may be changed maliciously, you should | 126 | applications where images may be changed maliciously, you should |
127 | consider SHA1 or SHA256. | 127 | consider SHA1 or SHA256. |
128 | 128 | ||
129 | config SPL_SHA1_SUPPORT | 129 | config SPL_SHA1_SUPPORT |
130 | bool "Support SHA1" | 130 | bool "Support SHA1" |
131 | depends on SPL_FIT | 131 | depends on SPL_FIT |
132 | help | 132 | help |
133 | Enable this to support SHA1 in FIT images within SPL. A SHA1 | 133 | Enable this to support SHA1 in FIT images within SPL. A SHA1 |
134 | checksum is a 160-bit (20-byte) hash value used to check that the | 134 | checksum is a 160-bit (20-byte) hash value used to check that the |
135 | image contents have not been corrupted or maliciously altered. | 135 | image contents have not been corrupted or maliciously altered. |
136 | While SHA1 is fairly secure it is coming to the end of its life | 136 | While SHA1 is fairly secure it is coming to the end of its life |
137 | due to the expanding computing power avaiable to brute-force | 137 | due to the expanding computing power avaiable to brute-force |
138 | attacks. For more security, consider SHA256. | 138 | attacks. For more security, consider SHA256. |
139 | 139 | ||
140 | config SPL_SHA256_SUPPORT | 140 | config SPL_SHA256_SUPPORT |
141 | bool "Support SHA256" | 141 | bool "Support SHA256" |
142 | depends on SPL_FIT | 142 | depends on SPL_FIT |
143 | help | 143 | help |
144 | Enable this to support SHA256 in FIT images within SPL. A SHA256 | 144 | Enable this to support SHA256 in FIT images within SPL. A SHA256 |
145 | checksum is a 256-bit (32-byte) hash value used to check that the | 145 | checksum is a 256-bit (32-byte) hash value used to check that the |
146 | image contents have not been corrupted. SHA256 is recommended for | 146 | image contents have not been corrupted. SHA256 is recommended for |
147 | use in secure applications since (as at 2016) there is no known | 147 | use in secure applications since (as at 2016) there is no known |
148 | feasible attack that could produce a 'collision' with differing | 148 | feasible attack that could produce a 'collision' with differing |
149 | input data. Use this for the highest security. Note that only the | 149 | input data. Use this for the highest security. Note that only the |
150 | SHA256 variant is supported: SHA512 and others are not currently | 150 | SHA256 variant is supported: SHA512 and others are not currently |
151 | supported in U-Boot. | 151 | supported in U-Boot. |
152 | 152 | ||
153 | config SPL_CRYPTO_SUPPORT | 153 | config SPL_CRYPTO_SUPPORT |
154 | bool "Support crypto drivers" | 154 | bool "Support crypto drivers" |
155 | depends on SPL | 155 | depends on SPL |
156 | help | 156 | help |
157 | Enable crypto drivers in SPL. These drivers can be used to | 157 | Enable crypto drivers in SPL. These drivers can be used to |
158 | accelerate secure boot processing in secure applications. Enable | 158 | accelerate secure boot processing in secure applications. Enable |
159 | this option to build the drivers in drivers/crypto as part of an | 159 | this option to build the drivers in drivers/crypto as part of an |
160 | SPL build. | 160 | SPL build. |
161 | 161 | ||
162 | config SPL_HASH_SUPPORT | 162 | config SPL_HASH_SUPPORT |
163 | bool "Support hashing drivers" | 163 | bool "Support hashing drivers" |
164 | depends on SPL | 164 | depends on SPL |
165 | help | 165 | help |
166 | Enable hashing drivers in SPL. These drivers can be used to | 166 | Enable hashing drivers in SPL. These drivers can be used to |
167 | accelerate secure boot processing in secure applications. Enable | 167 | accelerate secure boot processing in secure applications. Enable |
168 | this option to build system-specific drivers for hash acceleration | 168 | this option to build system-specific drivers for hash acceleration |
169 | as part of an SPL build. | 169 | as part of an SPL build. |
170 | 170 | ||
171 | config SPL_DMA_SUPPORT | 171 | config SPL_DMA_SUPPORT |
172 | bool "Support DMA drivers" | 172 | bool "Support DMA drivers" |
173 | depends on SPL | 173 | depends on SPL |
174 | help | 174 | help |
175 | Enable DMA (direct-memory-access) drivers in SPL. These drivers | 175 | Enable DMA (direct-memory-access) drivers in SPL. These drivers |
176 | can be used to handle memory-to-peripheral data transfer without | 176 | can be used to handle memory-to-peripheral data transfer without |
177 | the CPU moving the data. Enable this option to build the drivers | 177 | the CPU moving the data. Enable this option to build the drivers |
178 | in drivers/dma as part of an SPL build. | 178 | in drivers/dma as part of an SPL build. |
179 | 179 | ||
180 | config SPL_DRIVERS_MISC_SUPPORT | 180 | config SPL_DRIVERS_MISC_SUPPORT |
181 | bool "Support misc drivers" | 181 | bool "Support misc drivers" |
182 | depends on SPL | 182 | depends on SPL |
183 | help | 183 | help |
184 | Enable miscellaneous drivers in SPL. These drivers perform various | 184 | Enable miscellaneous drivers in SPL. These drivers perform various |
185 | tasks that don't fall nicely into other categories, Enable this | 185 | tasks that don't fall nicely into other categories, Enable this |
186 | option to build the drivers in drivers/misc as part of an SPL | 186 | option to build the drivers in drivers/misc as part of an SPL |
187 | build, for those that support building in SPL (not all drivers do). | 187 | build, for those that support building in SPL (not all drivers do). |
188 | 188 | ||
189 | config SPL_ENV_SUPPORT | 189 | config SPL_ENV_SUPPORT |
190 | bool "Support an environment" | 190 | bool "Support an environment" |
191 | depends on SPL | 191 | depends on SPL |
192 | help | 192 | help |
193 | Enable environment support in SPL. The U-Boot environment provides | 193 | Enable environment support in SPL. The U-Boot environment provides |
194 | a number of settings (essentially name/value pairs) which can | 194 | a number of settings (essentially name/value pairs) which can |
195 | control many aspects of U-Boot's operation. Normally this is not | 195 | control many aspects of U-Boot's operation. Normally this is not |
196 | needed in SPL as it has a much simpler task with less | 196 | needed in SPL as it has a much simpler task with less |
197 | configuration. But some boards use this to support 'Falcon' boot | 197 | configuration. But some boards use this to support 'Falcon' boot |
198 | on EXT2 and FAT, where SPL boots directly into Linux without | 198 | on EXT2 and FAT, where SPL boots directly into Linux without |
199 | starting U-Boot first. Enabling this option will make getenv() | 199 | starting U-Boot first. Enabling this option will make getenv() |
200 | and setenv() available in SPL. | 200 | and setenv() available in SPL. |
201 | 201 | ||
202 | config SPL_SAVEENV | 202 | config SPL_SAVEENV |
203 | bool "Support save environment" | 203 | bool "Support save environment" |
204 | depends on SPL && SPL_ENV_SUPPORT | 204 | depends on SPL && SPL_ENV_SUPPORT |
205 | help | 205 | help |
206 | Enable save environment support in SPL after setenv. By default | 206 | Enable save environment support in SPL after setenv. By default |
207 | the saveenv option is not provided in SPL, but some boards need | 207 | the saveenv option is not provided in SPL, but some boards need |
208 | this support in 'Falcon' boot, where SPL need to boot from | 208 | this support in 'Falcon' boot, where SPL need to boot from |
209 | different images based on environment variable set by OS. For | 209 | different images based on environment variable set by OS. For |
210 | example OS may set "reboot_image" environment variable to | 210 | example OS may set "reboot_image" environment variable to |
211 | "recovery" inorder to boot recovery image by SPL. The SPL read | 211 | "recovery" inorder to boot recovery image by SPL. The SPL read |
212 | "reboot_image" and act accordingly and change the reboot_image | 212 | "reboot_image" and act accordingly and change the reboot_image |
213 | to default mode using setenv and save the environemnt. | 213 | to default mode using setenv and save the environemnt. |
214 | 214 | ||
215 | config SPL_ETH_SUPPORT | 215 | config SPL_ETH_SUPPORT |
216 | bool "Support Ethernet" | 216 | bool "Support Ethernet" |
217 | depends on SPL_ENV_SUPPORT | 217 | depends on SPL_ENV_SUPPORT |
218 | help | 218 | help |
219 | Enable access to the network subsystem and associated Ethernet | 219 | Enable access to the network subsystem and associated Ethernet |
220 | drivers in SPL. This permits SPL to load U-Boot over an Ethernet | 220 | drivers in SPL. This permits SPL to load U-Boot over an Ethernet |
221 | link rather than from an on-board peripheral. Environment support | 221 | link rather than from an on-board peripheral. Environment support |
222 | is required since the network stack uses a number of environment | 222 | is required since the network stack uses a number of environment |
223 | variables. See also SPL_NET_SUPPORT. | 223 | variables. See also SPL_NET_SUPPORT. |
224 | 224 | ||
225 | config SPL_EXT_SUPPORT | 225 | config SPL_EXT_SUPPORT |
226 | bool "Support EXT filesystems" | 226 | bool "Support EXT filesystems" |
227 | depends on SPL | 227 | depends on SPL |
228 | help | 228 | help |
229 | Enable support for EXT2/3/4 filesystems with SPL. This permits | 229 | Enable support for EXT2/3/4 filesystems with SPL. This permits |
230 | U-Boot (or Linux in Falcon mode) to be loaded from an EXT | 230 | U-Boot (or Linux in Falcon mode) to be loaded from an EXT |
231 | filesystem from within SPL. Support for the underlying block | 231 | filesystem from within SPL. Support for the underlying block |
232 | device (e.g. MMC or USB) must be enabled separately. | 232 | device (e.g. MMC or USB) must be enabled separately. |
233 | 233 | ||
234 | config SPL_FAT_SUPPORT | 234 | config SPL_FAT_SUPPORT |
235 | bool "Support FAT filesystems" | 235 | bool "Support FAT filesystems" |
236 | depends on SPL | 236 | depends on SPL |
237 | help | 237 | help |
238 | Enable support for FAT and VFAT filesystems with SPL. This | 238 | Enable support for FAT and VFAT filesystems with SPL. This |
239 | permits U-Boot (or Linux in Falcon mode) to be loaded from a FAT | 239 | permits U-Boot (or Linux in Falcon mode) to be loaded from a FAT |
240 | filesystem from within SPL. Support for the underlying block | 240 | filesystem from within SPL. Support for the underlying block |
241 | device (e.g. MMC or USB) must be enabled separately. | 241 | device (e.g. MMC or USB) must be enabled separately. |
242 | 242 | ||
243 | config SPL_FPGA_SUPPORT | 243 | config SPL_FPGA_SUPPORT |
244 | bool "Support FPGAs" | 244 | bool "Support FPGAs" |
245 | depends on SPL | 245 | depends on SPL |
246 | help | 246 | help |
247 | Enable support for FPGAs in SPL. Field-programmable Gate Arrays | 247 | Enable support for FPGAs in SPL. Field-programmable Gate Arrays |
248 | provide software-configurable hardware which is typically used to | 248 | provide software-configurable hardware which is typically used to |
249 | implement peripherals (such as UARTs, LCD displays, MMC) or | 249 | implement peripherals (such as UARTs, LCD displays, MMC) or |
250 | accelerate custom processing functions, such as image processing | 250 | accelerate custom processing functions, such as image processing |
251 | or machine learning. Sometimes it is useful to program the FPGA | 251 | or machine learning. Sometimes it is useful to program the FPGA |
252 | as early as possible during boot, and this option can enable that | 252 | as early as possible during boot, and this option can enable that |
253 | within SPL. | 253 | within SPL. |
254 | 254 | ||
255 | config SPL_GPIO_SUPPORT | 255 | config SPL_GPIO_SUPPORT |
256 | bool "Support GPIO" | 256 | bool "Support GPIO" |
257 | depends on SPL | 257 | depends on SPL |
258 | help | 258 | help |
259 | Enable support for GPIOs (General-purpose Input/Output) in SPL. | 259 | Enable support for GPIOs (General-purpose Input/Output) in SPL. |
260 | GPIOs allow U-Boot to read the state of an input line (high or | 260 | GPIOs allow U-Boot to read the state of an input line (high or |
261 | low) and set the state of an output line. This can be used to | 261 | low) and set the state of an output line. This can be used to |
262 | drive LEDs, control power to various system parts and read user | 262 | drive LEDs, control power to various system parts and read user |
263 | input. GPIOs can be useful in SPL to enable a 'sign-of-life' LED, | 263 | input. GPIOs can be useful in SPL to enable a 'sign-of-life' LED, |
264 | for example. Enable this option to build the drivers in | 264 | for example. Enable this option to build the drivers in |
265 | drivers/gpio as part of an SPL build. | 265 | drivers/gpio as part of an SPL build. |
266 | 266 | ||
267 | config SPL_I2C_SUPPORT | 267 | config SPL_I2C_SUPPORT |
268 | bool "Support I2C" | 268 | bool "Support I2C" |
269 | depends on SPL | 269 | depends on SPL |
270 | help | 270 | help |
271 | Enable support for the I2C (Inter-Integrated Circuit) bus in SPL. | 271 | Enable support for the I2C (Inter-Integrated Circuit) bus in SPL. |
272 | I2C works with a clock and data line which can be driven by a | 272 | I2C works with a clock and data line which can be driven by a |
273 | one or more masters or slaves. It is a fairly complex bus but is | 273 | one or more masters or slaves. It is a fairly complex bus but is |
274 | widely used as it only needs two lines for communication. Speeds of | 274 | widely used as it only needs two lines for communication. Speeds of |
275 | 400kbps are typical but up to 3.4Mbps is supported by some | 275 | 400kbps are typical but up to 3.4Mbps is supported by some |
276 | hardware. I2C can be useful in SPL to configure power management | 276 | hardware. I2C can be useful in SPL to configure power management |
277 | ICs (PMICs) before raising the CPU clock speed, for example. | 277 | ICs (PMICs) before raising the CPU clock speed, for example. |
278 | Enable this option to build the drivers in drivers/i2c as part of | 278 | Enable this option to build the drivers in drivers/i2c as part of |
279 | an SPL build. | 279 | an SPL build. |
280 | 280 | ||
281 | config SPL_LIBCOMMON_SUPPORT | 281 | config SPL_LIBCOMMON_SUPPORT |
282 | bool "Support common libraries" | 282 | bool "Support common libraries" |
283 | depends on SPL | 283 | depends on SPL |
284 | help | 284 | help |
285 | Enable support for common U-Boot libraries within SPL. These | 285 | Enable support for common U-Boot libraries within SPL. These |
286 | libraries include common code to deal with U-Boot images, | 286 | libraries include common code to deal with U-Boot images, |
287 | environment and USB, for example. This option is enabled on many | 287 | environment and USB, for example. This option is enabled on many |
288 | boards. Enable this option to build the code in common/ as part of | 288 | boards. Enable this option to build the code in common/ as part of |
289 | an SPL build. | 289 | an SPL build. |
290 | 290 | ||
291 | config SPL_LIBDISK_SUPPORT | 291 | config SPL_LIBDISK_SUPPORT |
292 | bool "Support disk paritions" | 292 | bool "Support disk paritions" |
293 | depends on SPL | 293 | depends on SPL |
294 | help | 294 | help |
295 | Enable support for disk partitions within SPL. 'Disk' is something | 295 | Enable support for disk partitions within SPL. 'Disk' is something |
296 | of a misnomer as it includes non-spinning media such as flash (as | 296 | of a misnomer as it includes non-spinning media such as flash (as |
297 | used in MMC and USB sticks). Partitions provide a way for a disk | 297 | used in MMC and USB sticks). Partitions provide a way for a disk |
298 | to be split up into separate regions, with a partition table placed | 298 | to be split up into separate regions, with a partition table placed |
299 | at the start or end which describes the location and size of each | 299 | at the start or end which describes the location and size of each |
300 | 'partition'. These partitions are typically uses as individual block | 300 | 'partition'. These partitions are typically uses as individual block |
301 | devices, typically with an EXT2 or FAT filesystem in each. This | 301 | devices, typically with an EXT2 or FAT filesystem in each. This |
302 | option enables whatever partition support has been enabled in | 302 | option enables whatever partition support has been enabled in |
303 | U-Boot to also be used in SPL. It brings in the code in disk/. | 303 | U-Boot to also be used in SPL. It brings in the code in disk/. |
304 | 304 | ||
305 | config SPL_LIBGENERIC_SUPPORT | 305 | config SPL_LIBGENERIC_SUPPORT |
306 | bool "Support generic libraries" | 306 | bool "Support generic libraries" |
307 | depends on SPL | 307 | depends on SPL |
308 | help | 308 | help |
309 | Enable support for generic U-Boot libraries within SPL. These | 309 | Enable support for generic U-Boot libraries within SPL. These |
310 | libraries include generic code to deal with device tree, hashing, | 310 | libraries include generic code to deal with device tree, hashing, |
311 | printf(), compression and the like. This option is enabled on many | 311 | printf(), compression and the like. This option is enabled on many |
312 | boards. Enable this option to build the code in lib/ as part of an | 312 | boards. Enable this option to build the code in lib/ as part of an |
313 | SPL build. | 313 | SPL build. |
314 | 314 | ||
315 | config SPL_MMC_SUPPORT | 315 | config SPL_MMC_SUPPORT |
316 | bool "Support MMC" | 316 | bool "Support MMC" |
317 | depends on SPL | 317 | depends on SPL |
318 | help | 318 | help |
319 | Enable support for MMC (Multimedia Card) within SPL. This enables | 319 | Enable support for MMC (Multimedia Card) within SPL. This enables |
320 | the MMC protocol implementation and allows any enabled drivers to | 320 | the MMC protocol implementation and allows any enabled drivers to |
321 | be used within SPL. MMC can be used with or without disk partition | 321 | be used within SPL. MMC can be used with or without disk partition |
322 | support depending on the application (SPL_LIBDISK_SUPPORT). Enable | 322 | support depending on the application (SPL_LIBDISK_SUPPORT). Enable |
323 | this option to build the drivers in drivers/mmc as part of an SPL | 323 | this option to build the drivers in drivers/mmc as part of an SPL |
324 | build. | 324 | build. |
325 | 325 | ||
326 | config SPL_MPC8XXX_INIT_DDR_SUPPORT | 326 | config SPL_MPC8XXX_INIT_DDR_SUPPORT |
327 | bool "Support MPC8XXX DDR init" | 327 | bool "Support MPC8XXX DDR init" |
328 | depends on SPL | 328 | depends on SPL |
329 | help | 329 | help |
330 | Enable support for DDR-SDRAM (double-data-rate synchronous dynamic | 330 | Enable support for DDR-SDRAM (double-data-rate synchronous dynamic |
331 | random-access memory) on the MPC8XXX family within SPL. This | 331 | random-access memory) on the MPC8XXX family within SPL. This |
332 | allows DRAM to be set up before loading U-Boot into that DRAM, | 332 | allows DRAM to be set up before loading U-Boot into that DRAM, |
333 | where it can run. | 333 | where it can run. |
334 | 334 | ||
335 | config SPL_MTD_SUPPORT | 335 | config SPL_MTD_SUPPORT |
336 | bool "Support MTD drivers" | 336 | bool "Support MTD drivers" |
337 | depends on SPL | 337 | depends on SPL |
338 | help | 338 | help |
339 | Enable support for MTD (Memory Technology Device) within SPL. MTD | 339 | Enable support for MTD (Memory Technology Device) within SPL. MTD |
340 | provides a block interface over raw NAND and can also be used with | 340 | provides a block interface over raw NAND and can also be used with |
341 | SPI flash. This allows SPL to load U-Boot from supported MTD | 341 | SPI flash. This allows SPL to load U-Boot from supported MTD |
342 | devices. See SPL_NAND_SUPPORT and SPL_ONENAND_SUPPORT for how | 342 | devices. See SPL_NAND_SUPPORT and SPL_ONENAND_SUPPORT for how |
343 | to enable specific MTD drivers. | 343 | to enable specific MTD drivers. |
344 | 344 | ||
345 | config SPL_MUSB_NEW_SUPPORT | 345 | config SPL_MUSB_NEW_SUPPORT |
346 | bool "Support new Mentor Graphics USB" | 346 | bool "Support new Mentor Graphics USB" |
347 | depends on SPL | 347 | depends on SPL |
348 | help | 348 | help |
349 | Enable support for Mentor Graphics USB in SPL. This is a new | 349 | Enable support for Mentor Graphics USB in SPL. This is a new |
350 | driver used by some boards. Enable this option to build | 350 | driver used by some boards. Enable this option to build |
351 | the drivers in drivers/usb/musb-new as part of an SPL build. The | 351 | the drivers in drivers/usb/musb-new as part of an SPL build. The |
352 | old drivers are in drivers/usb/musb. | 352 | old drivers are in drivers/usb/musb. |
353 | 353 | ||
354 | config SPL_NAND_SUPPORT | 354 | config SPL_NAND_SUPPORT |
355 | bool "Support NAND flash" | 355 | bool "Support NAND flash" |
356 | depends on SPL | 356 | depends on SPL |
357 | help | 357 | help |
358 | Enable support for NAND (Negative AND) flash in SPL. NAND flash | 358 | Enable support for NAND (Negative AND) flash in SPL. NAND flash |
359 | can be used to allow SPL to load U-Boot from supported devices. | 359 | can be used to allow SPL to load U-Boot from supported devices. |
360 | This enables the drivers in drivers/mtd/nand as part of an SPL | 360 | This enables the drivers in drivers/mtd/nand as part of an SPL |
361 | build. | 361 | build. |
362 | 362 | ||
363 | config SPL_NET_SUPPORT | 363 | config SPL_NET_SUPPORT |
364 | bool "Support networking" | 364 | bool "Support networking" |
365 | depends on SPL | 365 | depends on SPL |
366 | help | 366 | help |
367 | Enable support for network devices (such as Ethernet) in SPL. | 367 | Enable support for network devices (such as Ethernet) in SPL. |
368 | This permits SPL to load U-Boot over a network link rather than | 368 | This permits SPL to load U-Boot over a network link rather than |
369 | from an on-board peripheral. Environment support is required since | 369 | from an on-board peripheral. Environment support is required since |
370 | the network stack uses a number of environment variables. See also | 370 | the network stack uses a number of environment variables. See also |
371 | SPL_ETH_SUPPORT. | 371 | SPL_ETH_SUPPORT. |
372 | 372 | ||
373 | if SPL_NET_SUPPORT | 373 | if SPL_NET_SUPPORT |
374 | config SPL_NET_VCI_STRING | 374 | config SPL_NET_VCI_STRING |
375 | string "BOOTP Vendor Class Identifier string sent by SPL" | 375 | string "BOOTP Vendor Class Identifier string sent by SPL" |
376 | help | 376 | help |
377 | As defined by RFC 2132 the vendor class identifier field can be | 377 | As defined by RFC 2132 the vendor class identifier field can be |
378 | sent by the client to identify the vendor type and configuration | 378 | sent by the client to identify the vendor type and configuration |
379 | of a client. This is often used in practice to allow for the DHCP | 379 | of a client. This is often used in practice to allow for the DHCP |
380 | server to specify different files to load depending on if the ROM, | 380 | server to specify different files to load depending on if the ROM, |
381 | SPL or U-Boot itself makes the request | 381 | SPL or U-Boot itself makes the request |
382 | endif # if SPL_NET_SUPPORT | 382 | endif # if SPL_NET_SUPPORT |
383 | 383 | ||
384 | config SPL_NO_CPU_SUPPORT | 384 | config SPL_NO_CPU_SUPPORT |
385 | bool "Drop CPU code in SPL" | 385 | bool "Drop CPU code in SPL" |
386 | depends on SPL | 386 | depends on SPL |
387 | help | 387 | help |
388 | This is specific to the ARM926EJ-S CPU. It disables the standard | 388 | This is specific to the ARM926EJ-S CPU. It disables the standard |
389 | start.S start-up code, presumably so that a replacement can be | 389 | start.S start-up code, presumably so that a replacement can be |
390 | used on that CPU. You should not enable it unless you know what | 390 | used on that CPU. You should not enable it unless you know what |
391 | you are doing. | 391 | you are doing. |
392 | 392 | ||
393 | config SPL_NOR_SUPPORT | 393 | config SPL_NOR_SUPPORT |
394 | bool "Support NOR flash" | 394 | bool "Support NOR flash" |
395 | depends on SPL | 395 | depends on SPL |
396 | help | 396 | help |
397 | Enable support for loading U-Boot from memory-mapped NOR (Negative | 397 | Enable support for loading U-Boot from memory-mapped NOR (Negative |
398 | OR) flash in SPL. NOR flash is slow to write but fast to read, and | 398 | OR) flash in SPL. NOR flash is slow to write but fast to read, and |
399 | a memory-mapped device makes it very easy to access. Loading from | 399 | a memory-mapped device makes it very easy to access. Loading from |
400 | NOR is typically achieved with just a memcpy(). | 400 | NOR is typically achieved with just a memcpy(). |
401 | 401 | ||
402 | config SPL_ONENAND_SUPPORT | 402 | config SPL_ONENAND_SUPPORT |
403 | bool "Support OneNAND flash" | 403 | bool "Support OneNAND flash" |
404 | depends on SPL | 404 | depends on SPL |
405 | help | 405 | help |
406 | Enable support for OneNAND (Negative AND) flash in SPL. OneNAND is | 406 | Enable support for OneNAND (Negative AND) flash in SPL. OneNAND is |
407 | a type of NAND flash and therefore can be used to allow SPL to | 407 | a type of NAND flash and therefore can be used to allow SPL to |
408 | load U-Boot from supported devices. This enables the drivers in | 408 | load U-Boot from supported devices. This enables the drivers in |
409 | drivers/mtd/onenand as part of an SPL build. | 409 | drivers/mtd/onenand as part of an SPL build. |
410 | 410 | ||
411 | config SPL_OS_BOOT | 411 | config SPL_OS_BOOT |
412 | bool "Activate Falcon Mode" | 412 | bool "Activate Falcon Mode" |
413 | depends on SPL && !TI_SECURE_DEVICE | 413 | depends on SPL && !TI_SECURE_DEVICE |
414 | default n | 414 | default n |
415 | help | 415 | help |
416 | Enable booting directly to an OS from SPL. | 416 | Enable booting directly to an OS from SPL. |
417 | for more info read doc/README.falcon | 417 | for more info read doc/README.falcon |
418 | 418 | ||
419 | if SPL_OS_BOOT | 419 | if SPL_OS_BOOT |
420 | config SYS_OS_BASE | 420 | config SYS_OS_BASE |
421 | hex "addr, where OS is found" | 421 | hex "addr, where OS is found" |
422 | depends on SPL && SPL_NOR_SUPPORT | 422 | depends on SPL && SPL_NOR_SUPPORT |
423 | help | 423 | help |
424 | Specify the address, where the OS image is found, which | 424 | Specify the address, where the OS image is found, which |
425 | gets booted. | 425 | gets booted. |
426 | 426 | ||
427 | endif # SPL_OS_BOOT | 427 | endif # SPL_OS_BOOT |
428 | 428 | ||
429 | config SPL_POST_MEM_SUPPORT | 429 | config SPL_POST_MEM_SUPPORT |
430 | bool "Support POST drivers" | 430 | bool "Support POST drivers" |
431 | depends on SPL | 431 | depends on SPL |
432 | help | 432 | help |
433 | Enable support for POST (Power-on Self Test) in SPL. POST is a | 433 | Enable support for POST (Power-on Self Test) in SPL. POST is a |
434 | procedure that checks that the hardware (CPU or board) appears to | 434 | procedure that checks that the hardware (CPU or board) appears to |
435 | be functionally correctly. It is a sanity check that can be | 435 | be functionally correctly. It is a sanity check that can be |
436 | performed before booting. This enables the drivers in post/drivers | 436 | performed before booting. This enables the drivers in post/drivers |
437 | as part of an SPL build. | 437 | as part of an SPL build. |
438 | 438 | ||
439 | config SPL_POWER_SUPPORT | 439 | config SPL_POWER_SUPPORT |
440 | bool "Support power drivers" | 440 | bool "Support power drivers" |
441 | depends on SPL | 441 | depends on SPL |
442 | help | 442 | help |
443 | Enable support for power control in SPL. This includes support | 443 | Enable support for power control in SPL. This includes support |
444 | for PMICs (Power-management Integrated Circuits) and some of the | 444 | for PMICs (Power-management Integrated Circuits) and some of the |
445 | features provided by PMICs. In particular, voltage regulators can | 445 | features provided by PMICs. In particular, voltage regulators can |
446 | be used to enable/disable power and vary its voltage. That can be | 446 | be used to enable/disable power and vary its voltage. That can be |
447 | useful in SPL to turn on boot peripherals and adjust CPU voltage | 447 | useful in SPL to turn on boot peripherals and adjust CPU voltage |
448 | so that the clock speed can be increased. This enables the drivers | 448 | so that the clock speed can be increased. This enables the drivers |
449 | in drivers/power, drivers/power/pmic and drivers/power/regulator | 449 | in drivers/power, drivers/power/pmic and drivers/power/regulator |
450 | as part of an SPL build. | 450 | as part of an SPL build. |
451 | 451 | ||
452 | config SPL_SATA_SUPPORT | 452 | config SPL_SATA_SUPPORT |
453 | bool "Support loading from SATA" | 453 | bool "Support loading from SATA" |
454 | depends on SPL | 454 | depends on SPL |
455 | help | 455 | help |
456 | Enable support for SATA (Serial AT attachment) in SPL. This allows | 456 | Enable support for SATA (Serial AT attachment) in SPL. This allows |
457 | use of SATA devices such as hard drives and flash drivers for | 457 | use of SATA devices such as hard drives and flash drivers for |
458 | loading U-Boot. SATA is used in higher-end embedded systems and | 458 | loading U-Boot. SATA is used in higher-end embedded systems and |
459 | can provide higher performance than MMC , at somewhat higher | 459 | can provide higher performance than MMC , at somewhat higher |
460 | expense and power consumption. This enables loading from SATA | 460 | expense and power consumption. This enables loading from SATA |
461 | using a configured device. | 461 | using a configured device. |
462 | 462 | ||
463 | config SPL_SERIAL_SUPPORT | 463 | config SPL_SERIAL_SUPPORT |
464 | bool "Support serial" | 464 | bool "Support serial" |
465 | depends on SPL | 465 | depends on SPL |
466 | help | 466 | help |
467 | Enable support for serial in SPL. This allows use of a serial UART | 467 | Enable support for serial in SPL. This allows use of a serial UART |
468 | for displaying messages while SPL is running. It also brings in | 468 | for displaying messages while SPL is running. It also brings in |
469 | printf() and panic() functions. This should normally be enabled | 469 | printf() and panic() functions. This should normally be enabled |
470 | unless there are space reasons not to. Even then, consider | 470 | unless there are space reasons not to. Even then, consider |
471 | enabling USE_TINY_PRINTF which is a small printf() version. | 471 | enabling USE_TINY_PRINTF which is a small printf() version. |
472 | 472 | ||
473 | config SPL_SPI_FLASH_SUPPORT | 473 | config SPL_SPI_FLASH_SUPPORT |
474 | bool "Support SPI flash drivers" | 474 | bool "Support SPI flash drivers" |
475 | depends on SPL | 475 | depends on SPL |
476 | help | 476 | help |
477 | Enable support for using SPI flash in SPL, and loading U-Boot from | 477 | Enable support for using SPI flash in SPL, and loading U-Boot from |
478 | SPI flash. SPI flash (Serial Peripheral Bus flash) is named after | 478 | SPI flash. SPI flash (Serial Peripheral Bus flash) is named after |
479 | the SPI bus that is used to connect it to a system. It is a simple | 479 | the SPI bus that is used to connect it to a system. It is a simple |
480 | but fast bidirectional 4-wire bus (clock, chip select and two data | 480 | but fast bidirectional 4-wire bus (clock, chip select and two data |
481 | lines). This enables the drivers in drivers/mtd/spi as part of an | 481 | lines). This enables the drivers in drivers/mtd/spi as part of an |
482 | SPL build. This normally requires SPL_SPI_SUPPORT. | 482 | SPL build. This normally requires SPL_SPI_SUPPORT. |
483 | 483 | ||
484 | config SPL_SPI_SUPPORT | 484 | config SPL_SPI_SUPPORT |
485 | bool "Support SPI drivers" | 485 | bool "Support SPI drivers" |
486 | depends on SPL | 486 | depends on SPL |
487 | help | 487 | help |
488 | Enable support for using SPI in SPL. This is used for connecting | 488 | Enable support for using SPI in SPL. This is used for connecting |
489 | to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for | 489 | to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for |
490 | more details on that. The SPI driver provides the transport for | 490 | more details on that. The SPI driver provides the transport for |
491 | data between the SPI flash and the CPU. This option can be used to | 491 | data between the SPI flash and the CPU. This option can be used to |
492 | enable SPI drivers that are needed for other purposes also, such | 492 | enable SPI drivers that are needed for other purposes also, such |
493 | as a SPI PMIC. | 493 | as a SPI PMIC. |
494 | 494 | ||
495 | config SPL_USBETH_SUPPORT | 495 | config SPL_USBETH_SUPPORT |
496 | bool "Support USB Ethernet drivers" | 496 | bool "Support USB Ethernet drivers" |
497 | depends on SPL | 497 | depends on SPL |
498 | help | 498 | help |
499 | Enable access to the USB network subsystem and associated | 499 | Enable access to the USB network subsystem and associated |
500 | drivers in SPL. This permits SPL to load U-Boot over a | 500 | drivers in SPL. This permits SPL to load U-Boot over a |
501 | USB-connected Ethernet link (such as a USB Ethernet dongle) rather | 501 | USB-connected Ethernet link (such as a USB Ethernet dongle) rather |
502 | than from an onboard peripheral. Environment support is required | 502 | than from an onboard peripheral. Environment support is required |
503 | since the network stack uses a number of environment variables. | 503 | since the network stack uses a number of environment variables. |
504 | See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT. | 504 | See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT. |
505 | 505 | ||
506 | config SPL_USB_HOST_SUPPORT | 506 | config SPL_USB_HOST_SUPPORT |
507 | bool "Support USB host drivers" | 507 | bool "Support USB host drivers" |
508 | depends on SPL | 508 | depends on SPL |
509 | help | 509 | help |
510 | Enable access to USB (Universal Serial Bus) host devices so that | 510 | Enable access to USB (Universal Serial Bus) host devices so that |
511 | SPL can load U-Boot from a connected USB peripheral, such as a USB | 511 | SPL can load U-Boot from a connected USB peripheral, such as a USB |
512 | flash stick. While USB takes a little longer to start up than most | 512 | flash stick. While USB takes a little longer to start up than most |
513 | buses, it is very flexible since many different types of storage | 513 | buses, it is very flexible since many different types of storage |
514 | device can be attached. This option enables the drivers in | 514 | device can be attached. This option enables the drivers in |
515 | drivers/usb/host as part of an SPL build. | 515 | drivers/usb/host as part of an SPL build. |
516 | 516 | ||
517 | config SPL_USB_SUPPORT | 517 | config SPL_USB_SUPPORT |
518 | bool "Support loading from USB" | 518 | bool "Support loading from USB" |
519 | depends on SPL_USB_HOST_SUPPORT | 519 | depends on SPL_USB_HOST_SUPPORT |
520 | help | 520 | help |
521 | Enable support for USB devices in SPL. This allows use of USB | 521 | Enable support for USB devices in SPL. This allows use of USB |
522 | devices such as hard drives and flash drivers for loading U-Boot. | 522 | devices such as hard drives and flash drivers for loading U-Boot. |
523 | The actual drivers are enabled separately using the normal U-Boot | 523 | The actual drivers are enabled separately using the normal U-Boot |
524 | config options. This enables loading from USB using a configured | 524 | config options. This enables loading from USB using a configured |
525 | device. | 525 | device. |
526 | 526 | ||
527 | config SPL_DFU_SUPPORT | ||
528 | bool "Support DFU (Device Firmware Upgarde)" | ||
529 | depends on SPL | ||
530 | select SPL_HASH_SUPPORT | ||
531 | help | ||
532 | This feature enables the DFU (Device Firmware Upgarde) in SPL with | ||
533 | RAM memory device support. The ROM code will load and execute | ||
534 | the SPL built with dfu. The user can load binaries (u-boot/kernel) to | ||
535 | selected device partition from host-pc using dfu-utils. | ||
536 | This feature is useful to flash the binaries to factory or bare-metal | ||
537 | boards using USB interface. | ||
538 | |||
539 | choice | ||
540 | bool "DFU device selection" | ||
541 | depends on SPL_DFU_SUPPORT | ||
542 | |||
543 | config SPL_DFU_RAM | ||
544 | bool "RAM device" | ||
545 | depends on SPL_DFU_SUPPORT | ||
546 | help | ||
547 | select RAM/DDR memory device for loading binary images | ||
548 | (u-boot/kernel) to the selected device partition using | ||
549 | DFU and execute the u-boot/kernel from RAM. | ||
550 | |||
551 | endchoice | ||
552 | |||
527 | config SPL_WATCHDOG_SUPPORT | 553 | config SPL_WATCHDOG_SUPPORT |
528 | bool "Support watchdog drivers" | 554 | bool "Support watchdog drivers" |
529 | depends on SPL | 555 | depends on SPL |
530 | help | 556 | help |
531 | Enable support for watchdog drivers in SPL. A watchdog is | 557 | Enable support for watchdog drivers in SPL. A watchdog is |
532 | typically a hardware peripheral which can reset the system when it | 558 | typically a hardware peripheral which can reset the system when it |
533 | detects no activity for a while (such as a software crash). This | 559 | detects no activity for a while (such as a software crash). This |
534 | enables the drivers in drivers/watchdog as part of an SPL build. | 560 | enables the drivers in drivers/watchdog as part of an SPL build. |
535 | 561 | ||
536 | config SPL_YMODEM_SUPPORT | 562 | config SPL_YMODEM_SUPPORT |
537 | bool "Support loading using Ymodem" | 563 | bool "Support loading using Ymodem" |
538 | depends on SPL | 564 | depends on SPL |
539 | help | 565 | help |
540 | While loading from serial is slow it can be a useful backup when | 566 | While loading from serial is slow it can be a useful backup when |
541 | there is no other option. The Ymodem protocol provides a reliable | 567 | there is no other option. The Ymodem protocol provides a reliable |
542 | means of transmitting U-Boot over a serial line for using in SPL, | 568 | means of transmitting U-Boot over a serial line for using in SPL, |
543 | with a checksum to ensure correctness. | 569 | with a checksum to ensure correctness. |
544 | 570 | ||
545 | config TPL_ENV_SUPPORT | 571 | config TPL_ENV_SUPPORT |
546 | bool "Support an environment" | 572 | bool "Support an environment" |
547 | depends on TPL | 573 | depends on TPL |
548 | help | 574 | help |
549 | Enable environment support in TPL. See SPL_ENV_SUPPORT for details. | 575 | Enable environment support in TPL. See SPL_ENV_SUPPORT for details. |
550 | 576 | ||
551 | config TPL_I2C_SUPPORT | 577 | config TPL_I2C_SUPPORT |
552 | bool "Support I2C" | 578 | bool "Support I2C" |
553 | depends on TPL | 579 | depends on TPL |
554 | help | 580 | help |
555 | Enable support for the I2C bus in SPL. See SPL_I2C_SUPPORT for | 581 | Enable support for the I2C bus in SPL. See SPL_I2C_SUPPORT for |
556 | details. | 582 | details. |
557 | 583 | ||
558 | config TPL_LIBCOMMON_SUPPORT | 584 | config TPL_LIBCOMMON_SUPPORT |
559 | bool "Support common libraries" | 585 | bool "Support common libraries" |
560 | depends on TPL | 586 | depends on TPL |
561 | help | 587 | help |
562 | Enable support for common U-Boot libraries within TPL. See | 588 | Enable support for common U-Boot libraries within TPL. See |
563 | SPL_LIBCOMMON_SUPPORT for details. | 589 | SPL_LIBCOMMON_SUPPORT for details. |
564 | 590 | ||
565 | config TPL_LIBGENERIC_SUPPORT | 591 | config TPL_LIBGENERIC_SUPPORT |
566 | bool "Support generic libraries" | 592 | bool "Support generic libraries" |
567 | depends on TPL | 593 | depends on TPL |
568 | help | 594 | help |
569 | Enable support for generic U-Boot libraries within TPL. See | 595 | Enable support for generic U-Boot libraries within TPL. See |
570 | SPL_LIBGENERIC_SUPPORT for details. | 596 | SPL_LIBGENERIC_SUPPORT for details. |
571 | 597 | ||
572 | config TPL_MPC8XXX_INIT_DDR_SUPPORT | 598 | config TPL_MPC8XXX_INIT_DDR_SUPPORT |
573 | bool "Support MPC8XXX DDR init" | 599 | bool "Support MPC8XXX DDR init" |
574 | depends on TPL | 600 | depends on TPL |
575 | help | 601 | help |
576 | Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See | 602 | Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See |
577 | SPL_MPC8XXX_INIT_DDR_SUPPORT for details. | 603 | SPL_MPC8XXX_INIT_DDR_SUPPORT for details. |
578 | 604 | ||
579 | config TPL_MMC_SUPPORT | 605 | config TPL_MMC_SUPPORT |
580 | bool "Support MMC" | 606 | bool "Support MMC" |
581 | depends on TPL | 607 | depends on TPL |
582 | help | 608 | help |
583 | Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details. | 609 | Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details. |
584 | 610 | ||
585 | config TPL_NAND_SUPPORT | 611 | config TPL_NAND_SUPPORT |
586 | bool "Support NAND flash" | 612 | bool "Support NAND flash" |
587 | depends on TPL | 613 | depends on TPL |
588 | help | 614 | help |
589 | Enable support for NAND in SPL. See SPL_NAND_SUPPORT for details. | 615 | Enable support for NAND in SPL. See SPL_NAND_SUPPORT for details. |
590 | 616 | ||
591 | config TPL_SERIAL_SUPPORT | 617 | config TPL_SERIAL_SUPPORT |
592 | bool "Support serial" | 618 | bool "Support serial" |
593 | depends on TPL | 619 | depends on TPL |
594 | help | 620 | help |
595 | Enable support for serial in SPL. See SPL_SERIAL_SUPPORT for | 621 | Enable support for serial in SPL. See SPL_SERIAL_SUPPORT for |
596 | details. | 622 | details. |
597 | 623 | ||
598 | config TPL_SPI_FLASH_SUPPORT | 624 | config TPL_SPI_FLASH_SUPPORT |
599 | bool "Support SPI flash drivers" | 625 | bool "Support SPI flash drivers" |
600 | depends on TPL | 626 | depends on TPL |
601 | help | 627 | help |
602 | Enable support for using SPI flash in SPL. See SPL_SPI_FLASH_SUPPORT | 628 | Enable support for using SPI flash in SPL. See SPL_SPI_FLASH_SUPPORT |
603 | for details. | 629 | for details. |
604 | 630 | ||
605 | config TPL_SPI_SUPPORT | 631 | config TPL_SPI_SUPPORT |
606 | bool "Support SPI drivers" | 632 | bool "Support SPI drivers" |
607 | depends on TPL | 633 | depends on TPL |
608 | help | 634 | help |
609 | Enable support for using SPI in SPL. See SPL_SPI_SUPPORT for | 635 | Enable support for using SPI in SPL. See SPL_SPI_SUPPORT for |
610 | details. | 636 | details. |
611 | 637 | ||
612 | endmenu | 638 | endmenu |
613 | 639 |
drivers/Makefile
1 | # | 1 | # |
2 | # SPDX-License-Identifier: GPL-2.0+ | 2 | # SPDX-License-Identifier: GPL-2.0+ |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_$(SPL_)DM) += core/ | 5 | obj-$(CONFIG_$(SPL_)DM) += core/ |
6 | obj-$(CONFIG_$(SPL_)CLK) += clk/ | 6 | obj-$(CONFIG_$(SPL_)CLK) += clk/ |
7 | obj-$(CONFIG_$(SPL_)LED) += led/ | 7 | obj-$(CONFIG_$(SPL_)LED) += led/ |
8 | obj-$(CONFIG_$(SPL_)PINCTRL) += pinctrl/ | 8 | obj-$(CONFIG_$(SPL_)PINCTRL) += pinctrl/ |
9 | obj-$(CONFIG_$(SPL_)RAM) += ram/ | 9 | obj-$(CONFIG_$(SPL_)RAM) += ram/ |
10 | 10 | ||
11 | ifdef CONFIG_SPL_BUILD | 11 | ifdef CONFIG_SPL_BUILD |
12 | 12 | ||
13 | obj-$(CONFIG_SPL_CRYPTO_SUPPORT) += crypto/ | 13 | obj-$(CONFIG_SPL_CRYPTO_SUPPORT) += crypto/ |
14 | obj-$(CONFIG_SPL_I2C_SUPPORT) += i2c/ | 14 | obj-$(CONFIG_SPL_I2C_SUPPORT) += i2c/ |
15 | obj-$(CONFIG_SPL_GPIO_SUPPORT) += gpio/ | 15 | obj-$(CONFIG_SPL_GPIO_SUPPORT) += gpio/ |
16 | obj-$(CONFIG_SPL_MMC_SUPPORT) += mmc/ | 16 | obj-$(CONFIG_SPL_MMC_SUPPORT) += mmc/ |
17 | obj-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/fsl/ | 17 | obj-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/fsl/ |
18 | obj-$(CONFIG_ARMADA_38X) += ddr/marvell/a38x/ | 18 | obj-$(CONFIG_ARMADA_38X) += ddr/marvell/a38x/ |
19 | obj-$(CONFIG_ARMADA_XP) += ddr/marvell/axp/ | 19 | obj-$(CONFIG_ARMADA_XP) += ddr/marvell/axp/ |
20 | obj-$(CONFIG_ALTERA_SDRAM) += ddr/altera/ | 20 | obj-$(CONFIG_ALTERA_SDRAM) += ddr/altera/ |
21 | obj-$(CONFIG_SPL_SERIAL_SUPPORT) += serial/ | 21 | obj-$(CONFIG_SPL_SERIAL_SUPPORT) += serial/ |
22 | obj-$(CONFIG_SPL_SPI_SUPPORT) += spi/ | 22 | obj-$(CONFIG_SPL_SPI_SUPPORT) += spi/ |
23 | obj-$(CONFIG_SPL_POWER_SUPPORT) += power/ power/pmic/ | 23 | obj-$(CONFIG_SPL_POWER_SUPPORT) += power/ power/pmic/ |
24 | obj-$(CONFIG_SPL_POWER_SUPPORT) += power/regulator/ | 24 | obj-$(CONFIG_SPL_POWER_SUPPORT) += power/regulator/ |
25 | obj-$(CONFIG_SPL_DRIVERS_MISC_SUPPORT) += misc/ sysreset/ | 25 | obj-$(CONFIG_SPL_DRIVERS_MISC_SUPPORT) += misc/ sysreset/ |
26 | obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd/ | 26 | obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd/ |
27 | obj-$(CONFIG_SPL_NAND_SUPPORT) += mtd/nand/ | 27 | obj-$(CONFIG_SPL_NAND_SUPPORT) += mtd/nand/ |
28 | obj-$(CONFIG_SPL_ONENAND_SUPPORT) += mtd/onenand/ | 28 | obj-$(CONFIG_SPL_ONENAND_SUPPORT) += mtd/onenand/ |
29 | obj-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += mtd/spi/ | 29 | obj-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += mtd/spi/ |
30 | obj-$(CONFIG_SPL_UBI) += mtd/ubispl/ | 30 | obj-$(CONFIG_SPL_UBI) += mtd/ubispl/ |
31 | obj-$(CONFIG_SPL_DMA_SUPPORT) += dma/ | 31 | obj-$(CONFIG_SPL_DMA_SUPPORT) += dma/ |
32 | obj-$(CONFIG_SPL_ETH_SUPPORT) += net/ | 32 | obj-$(CONFIG_SPL_ETH_SUPPORT) += net/ |
33 | obj-$(CONFIG_SPL_ETH_SUPPORT) += net/phy/ | 33 | obj-$(CONFIG_SPL_ETH_SUPPORT) += net/phy/ |
34 | obj-$(CONFIG_SPL_USBETH_SUPPORT) += net/phy/ | 34 | obj-$(CONFIG_SPL_USBETH_SUPPORT) += net/phy/ |
35 | obj-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += usb/musb-new/ | 35 | obj-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += usb/musb-new/ |
36 | obj-$(CONFIG_SPL_USBETH_SUPPORT) += usb/gadget/ | 36 | obj-$(CONFIG_SPL_USBETH_SUPPORT) += usb/gadget/ |
37 | obj-$(CONFIG_SPL_DFU_SUPPORT) += usb/gadget/ | ||
38 | obj-$(CONFIG_SPL_DFU_SUPPORT) += usb/gadget/udc/ | ||
39 | obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu/ | ||
37 | obj-$(CONFIG_SPL_WATCHDOG_SUPPORT) += watchdog/ | 40 | obj-$(CONFIG_SPL_WATCHDOG_SUPPORT) += watchdog/ |
38 | obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += usb/host/ | 41 | obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += usb/host/ |
39 | obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ | 42 | obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ |
40 | obj-$(CONFIG_SPL_SATA_SUPPORT) += block/ | 43 | obj-$(CONFIG_SPL_SATA_SUPPORT) += block/ |
41 | obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/ | 44 | obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/ |
42 | obj-$(CONFIG_SPL_MMC_SUPPORT) += block/ | 45 | obj-$(CONFIG_SPL_MMC_SUPPORT) += block/ |
43 | endif | 46 | endif |
44 | 47 | ||
45 | ifdef CONFIG_TPL_BUILD | 48 | ifdef CONFIG_TPL_BUILD |
46 | 49 | ||
47 | obj-$(CONFIG_TPL_I2C_SUPPORT) += i2c/ | 50 | obj-$(CONFIG_TPL_I2C_SUPPORT) += i2c/ |
48 | obj-$(CONFIG_TPL_DRIVERS_MISC_SUPPORT) += misc/ sysreset/ | 51 | obj-$(CONFIG_TPL_DRIVERS_MISC_SUPPORT) += misc/ sysreset/ |
49 | obj-$(CONFIG_TPL_MMC_SUPPORT) += mmc/ | 52 | obj-$(CONFIG_TPL_MMC_SUPPORT) += mmc/ |
50 | obj-$(CONFIG_TPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/fsl/ | 53 | obj-$(CONFIG_TPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/fsl/ |
51 | obj-$(CONFIG_TPL_NAND_SUPPORT) += mtd/nand/ | 54 | obj-$(CONFIG_TPL_NAND_SUPPORT) += mtd/nand/ |
52 | obj-$(CONFIG_TPL_SERIAL_SUPPORT) += serial/ | 55 | obj-$(CONFIG_TPL_SERIAL_SUPPORT) += serial/ |
53 | obj-$(CONFIG_TPL_SPI_FLASH_SUPPORT) += mtd/spi/ | 56 | obj-$(CONFIG_TPL_SPI_FLASH_SUPPORT) += mtd/spi/ |
54 | obj-$(CONFIG_TPL_SPI_SUPPORT) += spi/ | 57 | obj-$(CONFIG_TPL_SPI_SUPPORT) += spi/ |
55 | 58 | ||
56 | endif | 59 | endif |
57 | 60 | ||
58 | ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),) | 61 | ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),) |
59 | 62 | ||
60 | obj-y += adc/ | 63 | obj-y += adc/ |
61 | obj-$(CONFIG_DM_DEMO) += demo/ | 64 | obj-$(CONFIG_DM_DEMO) += demo/ |
62 | obj-$(CONFIG_BIOSEMU) += bios_emulator/ | 65 | obj-$(CONFIG_BIOSEMU) += bios_emulator/ |
63 | obj-y += block/ | 66 | obj-y += block/ |
64 | obj-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount/ | 67 | obj-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount/ |
65 | obj-$(CONFIG_CPU) += cpu/ | 68 | obj-$(CONFIG_CPU) += cpu/ |
66 | obj-y += crypto/ | 69 | obj-y += crypto/ |
67 | obj-$(CONFIG_FPGA) += fpga/ | 70 | obj-$(CONFIG_FPGA) += fpga/ |
68 | obj-y += hwmon/ | 71 | obj-y += hwmon/ |
69 | obj-y += misc/ | 72 | obj-y += misc/ |
70 | obj-y += pcmcia/ | 73 | obj-y += pcmcia/ |
71 | obj-y += dfu/ | 74 | obj-y += dfu/ |
72 | obj-$(CONFIG_X86) += pch/ | 75 | obj-$(CONFIG_X86) += pch/ |
73 | obj-y += phy/marvell/ | 76 | obj-y += phy/marvell/ |
74 | obj-y += rtc/ | 77 | obj-y += rtc/ |
75 | obj-y += sound/ | 78 | obj-y += sound/ |
76 | obj-y += spmi/ | 79 | obj-y += spmi/ |
77 | obj-y += sysreset/ | 80 | obj-y += sysreset/ |
78 | obj-y += timer/ | 81 | obj-y += timer/ |
79 | obj-y += tpm/ | 82 | obj-y += tpm/ |
80 | obj-y += twserial/ | 83 | obj-y += twserial/ |
81 | obj-y += video/ | 84 | obj-y += video/ |
82 | obj-y += watchdog/ | 85 | obj-y += watchdog/ |
83 | obj-$(CONFIG_QE) += qe/ | 86 | obj-$(CONFIG_QE) += qe/ |
84 | obj-$(CONFIG_U_QE) += qe/ | 87 | obj-$(CONFIG_U_QE) += qe/ |
85 | obj-y += mailbox/ | 88 | obj-y += mailbox/ |
86 | obj-y += memory/ | 89 | obj-y += memory/ |
87 | obj-y += pwm/ | 90 | obj-y += pwm/ |
88 | obj-y += reset/ | 91 | obj-y += reset/ |
89 | obj-y += input/ | 92 | obj-y += input/ |
90 | # SOC specific infrastructure drivers. | 93 | # SOC specific infrastructure drivers. |
91 | obj-y += soc/ | 94 | obj-y += soc/ |
92 | obj-$(CONFIG_REMOTEPROC) += remoteproc/ | 95 | obj-$(CONFIG_REMOTEPROC) += remoteproc/ |
93 | obj-y += thermal/ | 96 | obj-y += thermal/ |
94 | 97 | ||
95 | obj-$(CONFIG_MACH_PIC32) += ddr/microchip/ | 98 | obj-$(CONFIG_MACH_PIC32) += ddr/microchip/ |
96 | endif | 99 | endif |
97 | 100 |
drivers/usb/gadget/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2007 | 2 | # (C) Copyright 2000-2007 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o | 8 | obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o |
9 | obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o | 9 | obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o |
10 | 10 | ||
11 | ifdef CONFIG_SPL_BUILD | ||
12 | obj-$(CONFIG_SPL_DFU_SUPPORT) += f_dfu.o | ||
13 | endif | ||
14 | |||
11 | # new USB gadget layer dependencies | 15 | # new USB gadget layer dependencies |
12 | ifdef CONFIG_USB_GADGET | 16 | ifdef CONFIG_USB_GADGET |
13 | obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o | 17 | obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o |
14 | obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o | 18 | obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o |
15 | obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o | 19 | obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o |
16 | obj-$(CONFIG_USB_GADGET_DWC2_OTG) += dwc2_udc_otg.o | 20 | obj-$(CONFIG_USB_GADGET_DWC2_OTG) += dwc2_udc_otg.o |
17 | obj-$(CONFIG_USB_GADGET_DWC2_OTG_PHY) += dwc2_udc_otg_phy.o | 21 | obj-$(CONFIG_USB_GADGET_DWC2_OTG_PHY) += dwc2_udc_otg_phy.o |
18 | obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o | 22 | obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o |
19 | obj-$(CONFIG_CI_UDC) += ci_udc.o | 23 | obj-$(CONFIG_CI_UDC) += ci_udc.o |
20 | obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o | 24 | obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o |
21 | obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o | ||
22 | ifndef CONFIG_SPL_BUILD | 25 | ifndef CONFIG_SPL_BUILD |
26 | obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o | ||
23 | obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o | 27 | obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o |
24 | endif | ||
25 | obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o | 28 | obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o |
26 | obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o | 29 | obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o |
30 | endif | ||
27 | endif | 31 | endif |
28 | ifdef CONFIG_USB_ETHER | 32 | ifdef CONFIG_USB_ETHER |
29 | obj-y += ether.o | 33 | obj-y += ether.o |
30 | obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o | 34 | obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o |
31 | obj-$(CONFIG_CI_UDC) += ci_udc.o | 35 | obj-$(CONFIG_CI_UDC) += ci_udc.o |
32 | obj-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o | 36 | obj-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o |
33 | else | 37 | else |
34 | # Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE | 38 | # Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE |
35 | ifdef CONFIG_USB_DEVICE | 39 | ifdef CONFIG_USB_DEVICE |
36 | obj-y += core.o | 40 | obj-y += core.o |
37 | obj-y += ep0.o | 41 | obj-y += ep0.o |
38 | obj-$(CONFIG_DW_UDC) += designware_udc.o | 42 | obj-$(CONFIG_DW_UDC) += designware_udc.o |
39 | obj-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o | 43 | obj-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o |
40 | obj-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o | 44 | obj-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o |
41 | endif | 45 | endif |
include/configs/dra7xx_evm.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2013 | 2 | * (C) Copyright 2013 |
3 | * Texas Instruments Incorporated. | 3 | * Texas Instruments Incorporated. |
4 | * Lokesh Vutla <lokeshvutla@ti.com> | 4 | * Lokesh Vutla <lokeshvutla@ti.com> |
5 | * | 5 | * |
6 | * Configuration settings for the TI DRA7XX board. | 6 | * Configuration settings for the TI DRA7XX board. |
7 | * See ti_omap5_common.h for omap5 common settings. | 7 | * See ti_omap5_common.h for omap5 common settings. |
8 | * | 8 | * |
9 | * SPDX-License-Identifier: GPL-2.0+ | 9 | * SPDX-License-Identifier: GPL-2.0+ |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef __CONFIG_DRA7XX_EVM_H | 12 | #ifndef __CONFIG_DRA7XX_EVM_H |
13 | #define __CONFIG_DRA7XX_EVM_H | 13 | #define __CONFIG_DRA7XX_EVM_H |
14 | 14 | ||
15 | #define CONFIG_DRA7XX | 15 | #define CONFIG_DRA7XX |
16 | #define CONFIG_BOARD_EARLY_INIT_F | 16 | #define CONFIG_BOARD_EARLY_INIT_F |
17 | 17 | ||
18 | #ifdef CONFIG_SPL_BUILD | 18 | #ifdef CONFIG_SPL_BUILD |
19 | #define CONFIG_IODELAY_RECALIBRATION | 19 | #define CONFIG_IODELAY_RECALIBRATION |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #define CONFIG_VERY_BIG_RAM | 22 | #define CONFIG_VERY_BIG_RAM |
23 | #define CONFIG_NR_DRAM_BANKS 2 | 23 | #define CONFIG_NR_DRAM_BANKS 2 |
24 | #define CONFIG_MAX_MEM_MAPPED 0x80000000 | 24 | #define CONFIG_MAX_MEM_MAPPED 0x80000000 |
25 | 25 | ||
26 | #ifndef CONFIG_QSPI_BOOT | 26 | #ifndef CONFIG_QSPI_BOOT |
27 | /* MMC ENV related defines */ | 27 | /* MMC ENV related defines */ |
28 | #define CONFIG_ENV_IS_IN_MMC | 28 | #define CONFIG_ENV_IS_IN_MMC |
29 | #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ | 29 | #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */ |
30 | #define CONFIG_ENV_SIZE (128 << 10) | 30 | #define CONFIG_ENV_SIZE (128 << 10) |
31 | #define CONFIG_ENV_OFFSET 0xE0000 | 31 | #define CONFIG_ENV_OFFSET 0xE0000 |
32 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) | 32 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
33 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT | 33 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #if (CONFIG_CONS_INDEX == 1) | 36 | #if (CONFIG_CONS_INDEX == 1) |
37 | #define CONSOLEDEV "ttyO0" | 37 | #define CONSOLEDEV "ttyO0" |
38 | #elif (CONFIG_CONS_INDEX == 3) | 38 | #elif (CONFIG_CONS_INDEX == 3) |
39 | #define CONSOLEDEV "ttyO2" | 39 | #define CONSOLEDEV "ttyO2" |
40 | #endif | 40 | #endif |
41 | #define CONFIG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */ | 41 | #define CONFIG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */ |
42 | #define CONFIG_SYS_NS16550_COM2 UART2_BASE /* UART2 */ | 42 | #define CONFIG_SYS_NS16550_COM2 UART2_BASE /* UART2 */ |
43 | #define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */ | 43 | #define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */ |
44 | #define CONFIG_BAUDRATE 115200 | 44 | #define CONFIG_BAUDRATE 115200 |
45 | 45 | ||
46 | #define CONFIG_SYS_OMAP_ABE_SYSCK | 46 | #define CONFIG_SYS_OMAP_ABE_SYSCK |
47 | 47 | ||
48 | #ifndef CONFIG_SPL_BUILD | 48 | #ifndef CONFIG_SPL_BUILD |
49 | /* Define the default GPT table for eMMC */ | 49 | /* Define the default GPT table for eMMC */ |
50 | #define PARTS_DEFAULT \ | 50 | #define PARTS_DEFAULT \ |
51 | /* Linux partitions */ \ | 51 | /* Linux partitions */ \ |
52 | "uuid_disk=${uuid_gpt_disk};" \ | 52 | "uuid_disk=${uuid_gpt_disk};" \ |
53 | "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \ | 53 | "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \ |
54 | /* Android partitions */ \ | 54 | /* Android partitions */ \ |
55 | "partitions_android=" \ | 55 | "partitions_android=" \ |
56 | "uuid_disk=${uuid_gpt_disk};" \ | 56 | "uuid_disk=${uuid_gpt_disk};" \ |
57 | "name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \ | 57 | "name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \ |
58 | "name=bootloader,size=768K,uuid=${uuid_gpt_bootloader};" \ | 58 | "name=bootloader,size=768K,uuid=${uuid_gpt_bootloader};" \ |
59 | "name=environment,size=128K,uuid=${uuid_gpt_environment};" \ | 59 | "name=environment,size=128K,uuid=${uuid_gpt_environment};" \ |
60 | "name=misc,size=128K,uuid=${uuid_gpt_misc};" \ | 60 | "name=misc,size=128K,uuid=${uuid_gpt_misc};" \ |
61 | "name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \ | 61 | "name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \ |
62 | "name=efs,size=16M,uuid=${uuid_gpt_efs};" \ | 62 | "name=efs,size=16M,uuid=${uuid_gpt_efs};" \ |
63 | "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \ | 63 | "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \ |
64 | "name=recovery,size=10M,uuid=${uuid_gpt_recovery};" \ | 64 | "name=recovery,size=10M,uuid=${uuid_gpt_recovery};" \ |
65 | "name=boot,size=10M,uuid=${uuid_gpt_boot};" \ | 65 | "name=boot,size=10M,uuid=${uuid_gpt_boot};" \ |
66 | "name=system,size=768M,uuid=${uuid_gpt_system};" \ | 66 | "name=system,size=768M,uuid=${uuid_gpt_system};" \ |
67 | "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ | 67 | "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ |
68 | "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \ | 68 | "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \ |
69 | "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \ | 69 | "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \ |
70 | "name=userdata,size=-,uuid=${uuid_gpt_userdata}" | 70 | "name=userdata,size=-,uuid=${uuid_gpt_userdata}" |
71 | 71 | ||
72 | #define DFU_ALT_INFO_MMC \ | 72 | #define DFU_ALT_INFO_MMC \ |
73 | "dfu_alt_info_mmc=" \ | 73 | "dfu_alt_info_mmc=" \ |
74 | "boot part 0 1;" \ | 74 | "boot part 0 1;" \ |
75 | "rootfs part 0 2;" \ | 75 | "rootfs part 0 2;" \ |
76 | "MLO fat 0 1;" \ | 76 | "MLO fat 0 1;" \ |
77 | "MLO.raw raw 0x100 0x100;" \ | 77 | "MLO.raw raw 0x100 0x100;" \ |
78 | "u-boot.img.raw raw 0x300 0x400;" \ | 78 | "u-boot.img.raw raw 0x300 0x400;" \ |
79 | "spl-os-args.raw raw 0x80 0x80;" \ | 79 | "spl-os-args.raw raw 0x80 0x80;" \ |
80 | "spl-os-image.raw raw 0x900 0x2000;" \ | 80 | "spl-os-image.raw raw 0x900 0x2000;" \ |
81 | "spl-os-args fat 0 1;" \ | 81 | "spl-os-args fat 0 1;" \ |
82 | "spl-os-image fat 0 1;" \ | 82 | "spl-os-image fat 0 1;" \ |
83 | "u-boot.img fat 0 1;" \ | 83 | "u-boot.img fat 0 1;" \ |
84 | "uEnv.txt fat 0 1\0" | 84 | "uEnv.txt fat 0 1\0" |
85 | 85 | ||
86 | #define DFU_ALT_INFO_EMMC \ | 86 | #define DFU_ALT_INFO_EMMC \ |
87 | "dfu_alt_info_emmc=" \ | 87 | "dfu_alt_info_emmc=" \ |
88 | "rawemmc raw 0 3751936;" \ | 88 | "rawemmc raw 0 3751936;" \ |
89 | "boot part 1 1;" \ | 89 | "boot part 1 1;" \ |
90 | "rootfs part 1 2;" \ | 90 | "rootfs part 1 2;" \ |
91 | "MLO fat 1 1;" \ | 91 | "MLO fat 1 1;" \ |
92 | "MLO.raw raw 0x100 0x100;" \ | 92 | "MLO.raw raw 0x100 0x100;" \ |
93 | "u-boot.img.raw raw 0x300 0x400;" \ | 93 | "u-boot.img.raw raw 0x300 0x400;" \ |
94 | "spl-os-args.raw raw 0x80 0x80;" \ | 94 | "spl-os-args.raw raw 0x80 0x80;" \ |
95 | "spl-os-image.raw raw 0x900 0x2000;" \ | 95 | "spl-os-image.raw raw 0x900 0x2000;" \ |
96 | "spl-os-args fat 1 1;" \ | 96 | "spl-os-args fat 1 1;" \ |
97 | "spl-os-image fat 1 1;" \ | 97 | "spl-os-image fat 1 1;" \ |
98 | "u-boot.img fat 1 1;" \ | 98 | "u-boot.img fat 1 1;" \ |
99 | "uEnv.txt fat 1 1\0" | 99 | "uEnv.txt fat 1 1\0" |
100 | 100 | ||
101 | #define DFU_ALT_INFO_RAM \ | 101 | #define DFU_ALT_INFO_RAM \ |
102 | "dfu_alt_info_ram=" \ | 102 | "dfu_alt_info_ram=" \ |
103 | "kernel ram 0x80200000 0x4000000;" \ | 103 | "kernel ram 0x80200000 0x4000000;" \ |
104 | "fdt ram 0x80f80000 0x80000;" \ | 104 | "fdt ram 0x80f80000 0x80000;" \ |
105 | "ramdisk ram 0x81000000 0x4000000\0" | 105 | "ramdisk ram 0x81000000 0x4000000\0" |
106 | 106 | ||
107 | #define DFU_ALT_INFO_QSPI \ | 107 | #define DFU_ALT_INFO_QSPI \ |
108 | "dfu_alt_info_qspi=" \ | 108 | "dfu_alt_info_qspi=" \ |
109 | "MLO raw 0x0 0x040000;" \ | 109 | "MLO raw 0x0 0x040000;" \ |
110 | "u-boot.img raw 0x040000 0x0100000;" \ | 110 | "u-boot.img raw 0x040000 0x0100000;" \ |
111 | "u-boot-spl-os raw 0x140000 0x080000;" \ | 111 | "u-boot-spl-os raw 0x140000 0x080000;" \ |
112 | "u-boot-env raw 0x1C0000 0x010000;" \ | 112 | "u-boot-env raw 0x1C0000 0x010000;" \ |
113 | "u-boot-env.backup raw 0x1D0000 0x010000;" \ | 113 | "u-boot-env.backup raw 0x1D0000 0x010000;" \ |
114 | "kernel raw 0x1E0000 0x800000\0" | 114 | "kernel raw 0x1E0000 0x800000\0" |
115 | 115 | ||
116 | #define DFUARGS \ | 116 | #define DFUARGS \ |
117 | "dfu_bufsiz=0x10000\0" \ | 117 | "dfu_bufsiz=0x10000\0" \ |
118 | DFU_ALT_INFO_MMC \ | 118 | DFU_ALT_INFO_MMC \ |
119 | DFU_ALT_INFO_EMMC \ | 119 | DFU_ALT_INFO_EMMC \ |
120 | DFU_ALT_INFO_RAM \ | 120 | DFU_ALT_INFO_RAM \ |
121 | DFU_ALT_INFO_QSPI | 121 | DFU_ALT_INFO_QSPI |
122 | #else | 122 | #else |
123 | /* Discard fastboot in SPL build, to spare some space */ | 123 | /* Discard fastboot in SPL build, to spare some space */ |
124 | #undef CONFIG_FASTBOOT | 124 | #undef CONFIG_FASTBOOT |
125 | #undef CONFIG_USB_FUNCTION_FASTBOOT | 125 | #undef CONFIG_USB_FUNCTION_FASTBOOT |
126 | #undef CONFIG_CMD_FASTBOOT | 126 | #undef CONFIG_CMD_FASTBOOT |
127 | #undef CONFIG_ANDROID_BOOT_IMAGE | 127 | #undef CONFIG_ANDROID_BOOT_IMAGE |
128 | #undef CONFIG_FASTBOOT_BUF_ADDR | 128 | #undef CONFIG_FASTBOOT_BUF_ADDR |
129 | #undef CONFIG_FASTBOOT_BUF_SIZE | 129 | #undef CONFIG_FASTBOOT_BUF_SIZE |
130 | #undef CONFIG_FASTBOOT_FLASH | 130 | #undef CONFIG_FASTBOOT_FLASH |
131 | #endif | 131 | #endif |
132 | 132 | ||
133 | #ifdef CONFIG_SPL_BUILD | 133 | #ifdef CONFIG_SPL_BUILD |
134 | #undef CONFIG_CMD_BOOTD | 134 | #undef CONFIG_CMD_BOOTD |
135 | #ifdef CONFIG_SPL_DFU_SUPPORT | 135 | #ifdef CONFIG_SPL_DFU_SUPPORT |
136 | #define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80200000 | 136 | #define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80200000 |
137 | #define CONFIG_SPL_HASH_SUPPORT | ||
138 | #define DFU_ALT_INFO_RAM \ | 137 | #define DFU_ALT_INFO_RAM \ |
139 | "dfu_alt_info_ram=" \ | 138 | "dfu_alt_info_ram=" \ |
140 | "kernel ram 0x80200000 0x4000000;" \ | 139 | "kernel ram 0x80200000 0x4000000;" \ |
141 | "fdt ram 0x80f80000 0x80000;" \ | 140 | "fdt ram 0x80f80000 0x80000;" \ |
142 | "ramdisk ram 0x81000000 0x4000000\0" | 141 | "ramdisk ram 0x81000000 0x4000000\0" |
143 | #define DFUARGS \ | 142 | #define DFUARGS \ |
144 | "dfu_bufsiz=0x10000\0" \ | 143 | "dfu_bufsiz=0x10000\0" \ |
145 | DFU_ALT_INFO_RAM | 144 | DFU_ALT_INFO_RAM |
146 | #endif | 145 | #endif |
147 | #endif | 146 | #endif |
148 | 147 | ||
149 | #include <configs/ti_omap5_common.h> | 148 | #include <configs/ti_omap5_common.h> |
150 | 149 | ||
151 | /* Enhance our eMMC support / experience. */ | 150 | /* Enhance our eMMC support / experience. */ |
152 | #define CONFIG_CMD_GPT | 151 | #define CONFIG_CMD_GPT |
153 | #define CONFIG_EFI_PARTITION | 152 | #define CONFIG_EFI_PARTITION |
154 | #define CONFIG_RANDOM_UUID | 153 | #define CONFIG_RANDOM_UUID |
155 | #define CONFIG_HSMMC2_8BIT | 154 | #define CONFIG_HSMMC2_8BIT |
156 | 155 | ||
157 | /* CPSW Ethernet */ | 156 | /* CPSW Ethernet */ |
158 | #define CONFIG_BOOTP_DNS /* Configurable parts of CMD_DHCP */ | 157 | #define CONFIG_BOOTP_DNS /* Configurable parts of CMD_DHCP */ |
159 | #define CONFIG_BOOTP_DNS2 | 158 | #define CONFIG_BOOTP_DNS2 |
160 | #define CONFIG_BOOTP_SEND_HOSTNAME | 159 | #define CONFIG_BOOTP_SEND_HOSTNAME |
161 | #define CONFIG_BOOTP_GATEWAY | 160 | #define CONFIG_BOOTP_GATEWAY |
162 | #define CONFIG_BOOTP_SUBNETMASK | 161 | #define CONFIG_BOOTP_SUBNETMASK |
163 | #define CONFIG_NET_RETRY_COUNT 10 | 162 | #define CONFIG_NET_RETRY_COUNT 10 |
164 | #define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ | 163 | #define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ |
165 | #define CONFIG_MII /* Required in net/eth.c */ | 164 | #define CONFIG_MII /* Required in net/eth.c */ |
166 | #define CONFIG_PHY_GIGE /* per-board part of CPSW */ | 165 | #define CONFIG_PHY_GIGE /* per-board part of CPSW */ |
167 | #define CONFIG_PHYLIB | 166 | #define CONFIG_PHYLIB |
168 | #define CONFIG_PHY_TI | 167 | #define CONFIG_PHY_TI |
169 | 168 | ||
170 | /* SPI */ | 169 | /* SPI */ |
171 | #undef CONFIG_OMAP3_SPI | 170 | #undef CONFIG_OMAP3_SPI |
172 | #define CONFIG_TI_SPI_MMAP | 171 | #define CONFIG_TI_SPI_MMAP |
173 | #define CONFIG_SF_DEFAULT_SPEED 76800000 | 172 | #define CONFIG_SF_DEFAULT_SPEED 76800000 |
174 | #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 | 173 | #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 |
175 | #define CONFIG_QSPI_QUAD_SUPPORT | 174 | #define CONFIG_QSPI_QUAD_SUPPORT |
176 | 175 | ||
177 | #ifdef CONFIG_SPL_BUILD | 176 | #ifdef CONFIG_SPL_BUILD |
178 | #undef CONFIG_DM_SPI | 177 | #undef CONFIG_DM_SPI |
179 | #undef CONFIG_DM_SPI_FLASH | 178 | #undef CONFIG_DM_SPI_FLASH |
180 | #endif | 179 | #endif |
181 | 180 | ||
182 | /* | 181 | /* |
183 | * Default to using SPI for environment, etc. | 182 | * Default to using SPI for environment, etc. |
184 | * 0x000000 - 0x040000 : QSPI.SPL (256KiB) | 183 | * 0x000000 - 0x040000 : QSPI.SPL (256KiB) |
185 | * 0x040000 - 0x140000 : QSPI.u-boot (1MiB) | 184 | * 0x040000 - 0x140000 : QSPI.u-boot (1MiB) |
186 | * 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB) | 185 | * 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB) |
187 | * 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB) | 186 | * 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB) |
188 | * 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB) | 187 | * 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB) |
189 | * 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB) | 188 | * 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB) |
190 | * 0x9E0000 - 0x2000000 : USERLAND | 189 | * 0x9E0000 - 0x2000000 : USERLAND |
191 | */ | 190 | */ |
192 | #define CONFIG_SYS_SPI_KERNEL_OFFS 0x1E0000 | 191 | #define CONFIG_SYS_SPI_KERNEL_OFFS 0x1E0000 |
193 | #define CONFIG_SYS_SPI_ARGS_OFFS 0x140000 | 192 | #define CONFIG_SYS_SPI_ARGS_OFFS 0x140000 |
194 | #define CONFIG_SYS_SPI_ARGS_SIZE 0x80000 | 193 | #define CONFIG_SYS_SPI_ARGS_SIZE 0x80000 |
195 | #if defined(CONFIG_QSPI_BOOT) | 194 | #if defined(CONFIG_QSPI_BOOT) |
196 | #define CONFIG_ENV_IS_IN_SPI_FLASH | 195 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
197 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT | 196 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
198 | #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED | 197 | #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED |
199 | #define CONFIG_ENV_SIZE (64 << 10) | 198 | #define CONFIG_ENV_SIZE (64 << 10) |
200 | #define CONFIG_ENV_SECT_SIZE (64 << 10) /* 64 KB sectors */ | 199 | #define CONFIG_ENV_SECT_SIZE (64 << 10) /* 64 KB sectors */ |
201 | #define CONFIG_ENV_OFFSET 0x1C0000 | 200 | #define CONFIG_ENV_OFFSET 0x1C0000 |
202 | #define CONFIG_ENV_OFFSET_REDUND 0x1D0000 | 201 | #define CONFIG_ENV_OFFSET_REDUND 0x1D0000 |
203 | #endif | 202 | #endif |
204 | 203 | ||
205 | /* SPI SPL */ | 204 | /* SPI SPL */ |
206 | #define CONFIG_TI_EDMA3 | 205 | #define CONFIG_TI_EDMA3 |
207 | #define CONFIG_SPL_SPI_LOAD | 206 | #define CONFIG_SPL_SPI_LOAD |
208 | #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000 | 207 | #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000 |
209 | 208 | ||
210 | #define CONFIG_SUPPORT_EMMC_BOOT | 209 | #define CONFIG_SUPPORT_EMMC_BOOT |
211 | 210 | ||
212 | /* USB xHCI HOST */ | 211 | /* USB xHCI HOST */ |
213 | #define CONFIG_USB_XHCI_OMAP | 212 | #define CONFIG_USB_XHCI_OMAP |
214 | #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 | 213 | #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 |
215 | 214 | ||
216 | #define CONFIG_OMAP_USB_PHY | 215 | #define CONFIG_OMAP_USB_PHY |
217 | #define CONFIG_OMAP_USB2PHY2_HOST | 216 | #define CONFIG_OMAP_USB2PHY2_HOST |
218 | 217 | ||
219 | /* SATA */ | 218 | /* SATA */ |
220 | #define CONFIG_BOARD_LATE_INIT | 219 | #define CONFIG_BOARD_LATE_INIT |
221 | #define CONFIG_SCSI | 220 | #define CONFIG_SCSI |
222 | #define CONFIG_LIBATA | 221 | #define CONFIG_LIBATA |
223 | #define CONFIG_SCSI_AHCI | 222 | #define CONFIG_SCSI_AHCI |
224 | #define CONFIG_SCSI_AHCI_PLAT | 223 | #define CONFIG_SCSI_AHCI_PLAT |
225 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 | 224 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 |
226 | #define CONFIG_SYS_SCSI_MAX_LUN 1 | 225 | #define CONFIG_SYS_SCSI_MAX_LUN 1 |
227 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ | 226 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ |
228 | CONFIG_SYS_SCSI_MAX_LUN) | 227 | CONFIG_SYS_SCSI_MAX_LUN) |
229 | 228 | ||
230 | /* NAND support */ | 229 | /* NAND support */ |
231 | #ifdef CONFIG_NAND | 230 | #ifdef CONFIG_NAND |
232 | /* NAND: device related configs */ | 231 | /* NAND: device related configs */ |
233 | #define CONFIG_SYS_NAND_PAGE_SIZE 2048 | 232 | #define CONFIG_SYS_NAND_PAGE_SIZE 2048 |
234 | #define CONFIG_SYS_NAND_OOBSIZE 64 | 233 | #define CONFIG_SYS_NAND_OOBSIZE 64 |
235 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) | 234 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) |
236 | #define CONFIG_SYS_NAND_BUSWIDTH_16BIT | 235 | #define CONFIG_SYS_NAND_BUSWIDTH_16BIT |
237 | #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ | 236 | #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ |
238 | CONFIG_SYS_NAND_PAGE_SIZE) | 237 | CONFIG_SYS_NAND_PAGE_SIZE) |
239 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE | 238 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
240 | /* NAND: driver related configs */ | 239 | /* NAND: driver related configs */ |
241 | #define CONFIG_NAND_OMAP_GPMC | 240 | #define CONFIG_NAND_OMAP_GPMC |
242 | #define CONFIG_NAND_OMAP_ELM | 241 | #define CONFIG_NAND_OMAP_ELM |
243 | #define CONFIG_SYS_NAND_ONFI_DETECTION | 242 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
244 | #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW | 243 | #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW |
245 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS | 244 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS |
246 | #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ | 245 | #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ |
247 | 10, 11, 12, 13, 14, 15, 16, 17, \ | 246 | 10, 11, 12, 13, 14, 15, 16, 17, \ |
248 | 18, 19, 20, 21, 22, 23, 24, 25, \ | 247 | 18, 19, 20, 21, 22, 23, 24, 25, \ |
249 | 26, 27, 28, 29, 30, 31, 32, 33, \ | 248 | 26, 27, 28, 29, 30, 31, 32, 33, \ |
250 | 34, 35, 36, 37, 38, 39, 40, 41, \ | 249 | 34, 35, 36, 37, 38, 39, 40, 41, \ |
251 | 42, 43, 44, 45, 46, 47, 48, 49, \ | 250 | 42, 43, 44, 45, 46, 47, 48, 49, \ |
252 | 50, 51, 52, 53, 54, 55, 56, 57, } | 251 | 50, 51, 52, 53, 54, 55, 56, 57, } |
253 | #define CONFIG_SYS_NAND_ECCSIZE 512 | 252 | #define CONFIG_SYS_NAND_ECCSIZE 512 |
254 | #define CONFIG_SYS_NAND_ECCBYTES 14 | 253 | #define CONFIG_SYS_NAND_ECCBYTES 14 |
255 | #define MTDIDS_DEFAULT "nand0=nand.0" | 254 | #define MTDIDS_DEFAULT "nand0=nand.0" |
256 | #define MTDPARTS_DEFAULT "mtdparts=nand.0:" \ | 255 | #define MTDPARTS_DEFAULT "mtdparts=nand.0:" \ |
257 | "128k(NAND.SPL)," \ | 256 | "128k(NAND.SPL)," \ |
258 | "128k(NAND.SPL.backup1)," \ | 257 | "128k(NAND.SPL.backup1)," \ |
259 | "128k(NAND.SPL.backup2)," \ | 258 | "128k(NAND.SPL.backup2)," \ |
260 | "128k(NAND.SPL.backup3)," \ | 259 | "128k(NAND.SPL.backup3)," \ |
261 | "256k(NAND.u-boot-spl-os)," \ | 260 | "256k(NAND.u-boot-spl-os)," \ |
262 | "1m(NAND.u-boot)," \ | 261 | "1m(NAND.u-boot)," \ |
263 | "128k(NAND.u-boot-env)," \ | 262 | "128k(NAND.u-boot-env)," \ |
264 | "128k(NAND.u-boot-env.backup1)," \ | 263 | "128k(NAND.u-boot-env.backup1)," \ |
265 | "8m(NAND.kernel)," \ | 264 | "8m(NAND.kernel)," \ |
266 | "-(NAND.file-system)" | 265 | "-(NAND.file-system)" |
267 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x000c0000 | 266 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x000c0000 |
268 | /* NAND: SPL related configs */ | 267 | /* NAND: SPL related configs */ |
269 | #ifdef CONFIG_SPL_NAND_SUPPORT | 268 | #ifdef CONFIG_SPL_NAND_SUPPORT |
270 | #define CONFIG_SPL_NAND_AM33XX_BCH | 269 | #define CONFIG_SPL_NAND_AM33XX_BCH |
271 | #endif | 270 | #endif |
272 | /* NAND: SPL falcon mode configs */ | 271 | /* NAND: SPL falcon mode configs */ |
273 | #ifdef CONFIG_SPL_OS_BOOT | 272 | #ifdef CONFIG_SPL_OS_BOOT |
274 | #define CONFIG_CMD_SPL_NAND_OFS 0x00080000 /* os-boot params*/ | 273 | #define CONFIG_CMD_SPL_NAND_OFS 0x00080000 /* os-boot params*/ |
275 | #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00200000 /* kernel offset */ | 274 | #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00200000 /* kernel offset */ |
276 | #define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 | 275 | #define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 |
277 | #endif | 276 | #endif |
278 | #endif /* !CONFIG_NAND */ | 277 | #endif /* !CONFIG_NAND */ |
279 | 278 | ||
280 | /* Parallel NOR Support */ | 279 | /* Parallel NOR Support */ |
281 | #if defined(CONFIG_NOR) | 280 | #if defined(CONFIG_NOR) |
282 | /* NOR: device related configs */ | 281 | /* NOR: device related configs */ |
283 | #define CONFIG_SYS_MAX_FLASH_SECT 512 | 282 | #define CONFIG_SYS_MAX_FLASH_SECT 512 |
284 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT | 283 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT |
285 | #define CONFIG_SYS_FLASH_SIZE (64 * 1024 * 1024) /* 64 MB */ | 284 | #define CONFIG_SYS_FLASH_SIZE (64 * 1024 * 1024) /* 64 MB */ |
286 | /* #define CONFIG_INIT_IGNORE_ERROR */ | 285 | /* #define CONFIG_INIT_IGNORE_ERROR */ |
287 | #undef CONFIG_SYS_NO_FLASH | 286 | #undef CONFIG_SYS_NO_FLASH |
288 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE | 287 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE |
289 | #define CONFIG_SYS_FLASH_PROTECTION | 288 | #define CONFIG_SYS_FLASH_PROTECTION |
290 | #define CONFIG_SYS_FLASH_CFI | 289 | #define CONFIG_SYS_FLASH_CFI |
291 | #define CONFIG_FLASH_CFI_DRIVER | 290 | #define CONFIG_FLASH_CFI_DRIVER |
292 | #define CONFIG_FLASH_CFI_MTD | 291 | #define CONFIG_FLASH_CFI_MTD |
293 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 | 292 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 |
294 | #define CONFIG_SYS_FLASH_BASE (0x08000000) | 293 | #define CONFIG_SYS_FLASH_BASE (0x08000000) |
295 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE | 294 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
296 | /* Reduce SPL size by removing unlikey targets */ | 295 | /* Reduce SPL size by removing unlikey targets */ |
297 | #ifdef CONFIG_NOR_BOOT | 296 | #ifdef CONFIG_NOR_BOOT |
298 | #define CONFIG_ENV_IS_IN_FLASH | 297 | #define CONFIG_ENV_IS_IN_FLASH |
299 | #define CONFIG_ENV_SECT_SIZE (128 * 1024) /* 128 KiB */ | 298 | #define CONFIG_ENV_SECT_SIZE (128 * 1024) /* 128 KiB */ |
300 | #define MTDIDS_DEFAULT "nor0=physmap-flash.0" | 299 | #define MTDIDS_DEFAULT "nor0=physmap-flash.0" |
301 | #define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:" \ | 300 | #define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:" \ |
302 | "128k(NOR.SPL)," \ | 301 | "128k(NOR.SPL)," \ |
303 | "128k(NOR.SPL.backup1)," \ | 302 | "128k(NOR.SPL.backup1)," \ |
304 | "128k(NOR.SPL.backup2)," \ | 303 | "128k(NOR.SPL.backup2)," \ |
305 | "128k(NOR.SPL.backup3)," \ | 304 | "128k(NOR.SPL.backup3)," \ |
306 | "256k(NOR.u-boot-spl-os)," \ | 305 | "256k(NOR.u-boot-spl-os)," \ |
307 | "1m(NOR.u-boot)," \ | 306 | "1m(NOR.u-boot)," \ |
308 | "128k(NOR.u-boot-env)," \ | 307 | "128k(NOR.u-boot-env)," \ |
309 | "128k(NOR.u-boot-env.backup1)," \ | 308 | "128k(NOR.u-boot-env.backup1)," \ |
310 | "8m(NOR.kernel)," \ | 309 | "8m(NOR.kernel)," \ |
311 | "-(NOR.rootfs)" | 310 | "-(NOR.rootfs)" |
312 | #define CONFIG_ENV_OFFSET 0x001c0000 | 311 | #define CONFIG_ENV_OFFSET 0x001c0000 |
313 | #define CONFIG_ENV_OFFSET_REDUND 0x001e0000 | 312 | #define CONFIG_ENV_OFFSET_REDUND 0x001e0000 |
314 | #endif | 313 | #endif |
315 | #endif /* NOR support */ | 314 | #endif /* NOR support */ |
316 | 315 | ||
317 | /* EEPROM */ | 316 | /* EEPROM */ |
318 | #define CONFIG_EEPROM_CHIP_ADDRESS 0x50 | 317 | #define CONFIG_EEPROM_CHIP_ADDRESS 0x50 |
319 | #define CONFIG_EEPROM_BUS_ADDRESS 0 | 318 | #define CONFIG_EEPROM_BUS_ADDRESS 0 |
320 | 319 | ||
321 | #endif /* __CONFIG_DRA7XX_EVM_H */ | 320 | #endif /* __CONFIG_DRA7XX_EVM_H */ |
322 | 321 |
scripts/Makefile.spl
1 | # | 1 | # |
2 | # (C) Copyright 2000-2011 | 2 | # (C) Copyright 2000-2011 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # (C) Copyright 2011 | 5 | # (C) Copyright 2011 |
6 | # Daniel Schwierzeck, daniel.schwierzeck@googlemail.com. | 6 | # Daniel Schwierzeck, daniel.schwierzeck@googlemail.com. |
7 | # | 7 | # |
8 | # (C) Copyright 2011 | 8 | # (C) Copyright 2011 |
9 | # Texas Instruments Incorporated - http://www.ti.com/ | 9 | # Texas Instruments Incorporated - http://www.ti.com/ |
10 | # Aneesh V <aneesh@ti.com> | 10 | # Aneesh V <aneesh@ti.com> |
11 | # | 11 | # |
12 | # SPDX-License-Identifier: GPL-2.0+ | 12 | # SPDX-License-Identifier: GPL-2.0+ |
13 | # | 13 | # |
14 | # Based on top-level Makefile. | 14 | # Based on top-level Makefile. |
15 | # | 15 | # |
16 | 16 | ||
17 | src := $(obj) | 17 | src := $(obj) |
18 | 18 | ||
19 | # Create output directory if not already present | 19 | # Create output directory if not already present |
20 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | 20 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) |
21 | 21 | ||
22 | include $(srctree)/scripts/Kbuild.include | 22 | include $(srctree)/scripts/Kbuild.include |
23 | 23 | ||
24 | -include include/config/auto.conf | 24 | -include include/config/auto.conf |
25 | -include $(obj)/include/autoconf.mk | 25 | -include $(obj)/include/autoconf.mk |
26 | 26 | ||
27 | KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD | 27 | KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD |
28 | ifeq ($(CONFIG_TPL_BUILD),y) | 28 | ifeq ($(CONFIG_TPL_BUILD),y) |
29 | KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD | 29 | KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD |
30 | endif | 30 | endif |
31 | 31 | ||
32 | ifeq ($(CONFIG_TPL_BUILD),y) | 32 | ifeq ($(CONFIG_TPL_BUILD),y) |
33 | SPL_BIN := u-boot-tpl | 33 | SPL_BIN := u-boot-tpl |
34 | else | 34 | else |
35 | SPL_BIN := u-boot-spl | 35 | SPL_BIN := u-boot-spl |
36 | endif | 36 | endif |
37 | 37 | ||
38 | include $(srctree)/config.mk | 38 | include $(srctree)/config.mk |
39 | include $(srctree)/arch/$(ARCH)/Makefile | 39 | include $(srctree)/arch/$(ARCH)/Makefile |
40 | 40 | ||
41 | # Enable garbage collection of un-used sections for SPL | 41 | # Enable garbage collection of un-used sections for SPL |
42 | KBUILD_CFLAGS += -ffunction-sections -fdata-sections | 42 | KBUILD_CFLAGS += -ffunction-sections -fdata-sections |
43 | LDFLAGS_FINAL += --gc-sections | 43 | LDFLAGS_FINAL += --gc-sections |
44 | 44 | ||
45 | # FIX ME | 45 | # FIX ME |
46 | cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \ | 46 | cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \ |
47 | $(NOSTDINC_FLAGS) | 47 | $(NOSTDINC_FLAGS) |
48 | c_flags := $(KBUILD_CFLAGS) $(cpp_flags) | 48 | c_flags := $(KBUILD_CFLAGS) $(cpp_flags) |
49 | 49 | ||
50 | HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) | 50 | HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) |
51 | 51 | ||
52 | libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/) | 52 | libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/) |
53 | libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ | 53 | libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ |
54 | 54 | ||
55 | libs-$(CONFIG_SPL_FRAMEWORK) += common/spl/ | 55 | libs-$(CONFIG_SPL_FRAMEWORK) += common/spl/ |
56 | libs-y += common/init/ | 56 | libs-y += common/init/ |
57 | 57 | ||
58 | # Special handling for a few options which support SPL/TPL | 58 | # Special handling for a few options which support SPL/TPL |
59 | ifeq ($(CONFIG_TPL_BUILD),y) | 59 | ifeq ($(CONFIG_TPL_BUILD),y) |
60 | libs-$(CONFIG_TPL_LIBCOMMON_SUPPORT) += common/ cmd/ | 60 | libs-$(CONFIG_TPL_LIBCOMMON_SUPPORT) += common/ cmd/ |
61 | libs-$(CONFIG_TPL_LIBGENERIC_SUPPORT) += lib/ | 61 | libs-$(CONFIG_TPL_LIBGENERIC_SUPPORT) += lib/ |
62 | else | 62 | else |
63 | libs-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/ cmd/ | 63 | libs-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/ cmd/ |
64 | libs-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/ | 64 | libs-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/ |
65 | endif | 65 | endif |
66 | 66 | ||
67 | libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/ | 67 | libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/ |
68 | libs-y += drivers/ | 68 | libs-y += drivers/ |
69 | libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/dfu/ | ||
70 | libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/gadget/ | ||
71 | libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/gadget/udc/ | ||
72 | libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/dwc3/ | 69 | libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/dwc3/ |
73 | libs-y += dts/ | 70 | libs-y += dts/ |
74 | libs-y += fs/ | 71 | libs-y += fs/ |
75 | libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/ | 72 | libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/ |
76 | libs-$(CONFIG_SPL_NET_SUPPORT) += net/ | 73 | libs-$(CONFIG_SPL_NET_SUPPORT) += net/ |
77 | 74 | ||
78 | head-y := $(addprefix $(obj)/,$(head-y)) | 75 | head-y := $(addprefix $(obj)/,$(head-y)) |
79 | libs-y := $(addprefix $(obj)/,$(libs-y)) | 76 | libs-y := $(addprefix $(obj)/,$(libs-y)) |
80 | u-boot-spl-dirs := $(patsubst %/,%,$(filter %/, $(libs-y))) | 77 | u-boot-spl-dirs := $(patsubst %/,%,$(filter %/, $(libs-y))) |
81 | 78 | ||
82 | libs-y := $(patsubst %/, %/built-in.o, $(libs-y)) | 79 | libs-y := $(patsubst %/, %/built-in.o, $(libs-y)) |
83 | 80 | ||
84 | # Add GCC lib | 81 | # Add GCC lib |
85 | ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y) | 82 | ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y) |
86 | PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a | 83 | PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a |
87 | PLATFORM_LIBS := $(filter-out %/lib.a, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC) | 84 | PLATFORM_LIBS := $(filter-out %/lib.a, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC) |
88 | endif | 85 | endif |
89 | 86 | ||
90 | u-boot-spl-init := $(head-y) | 87 | u-boot-spl-init := $(head-y) |
91 | u-boot-spl-main := $(libs-y) | 88 | u-boot-spl-main := $(libs-y) |
92 | ifdef CONFIG_SPL_OF_PLATDATA | 89 | ifdef CONFIG_SPL_OF_PLATDATA |
93 | u-boot-spl-platdata := $(obj)/dts/dt-platdata.o | 90 | u-boot-spl-platdata := $(obj)/dts/dt-platdata.o |
94 | endif | 91 | endif |
95 | 92 | ||
96 | # Linker Script | 93 | # Linker Script |
97 | ifdef CONFIG_SPL_LDSCRIPT | 94 | ifdef CONFIG_SPL_LDSCRIPT |
98 | # need to strip off double quotes | 95 | # need to strip off double quotes |
99 | LDSCRIPT := $(addprefix $(srctree)/,$(CONFIG_SPL_LDSCRIPT:"%"=%)) | 96 | LDSCRIPT := $(addprefix $(srctree)/,$(CONFIG_SPL_LDSCRIPT:"%"=%)) |
100 | endif | 97 | endif |
101 | 98 | ||
102 | ifeq ($(wildcard $(LDSCRIPT)),) | 99 | ifeq ($(wildcard $(LDSCRIPT)),) |
103 | LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot-spl.lds | 100 | LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot-spl.lds |
104 | endif | 101 | endif |
105 | ifeq ($(wildcard $(LDSCRIPT)),) | 102 | ifeq ($(wildcard $(LDSCRIPT)),) |
106 | LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot-spl.lds | 103 | LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot-spl.lds |
107 | endif | 104 | endif |
108 | ifeq ($(wildcard $(LDSCRIPT)),) | 105 | ifeq ($(wildcard $(LDSCRIPT)),) |
109 | LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot-spl.lds | 106 | LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot-spl.lds |
110 | endif | 107 | endif |
111 | ifeq ($(wildcard $(LDSCRIPT)),) | 108 | ifeq ($(wildcard $(LDSCRIPT)),) |
112 | $(error could not find linker script) | 109 | $(error could not find linker script) |
113 | endif | 110 | endif |
114 | 111 | ||
115 | # Special flags for CPP when processing the linker script. | 112 | # Special flags for CPP when processing the linker script. |
116 | # Pass the version down so we can handle backwards compatibility | 113 | # Pass the version down so we can handle backwards compatibility |
117 | # on the fly. | 114 | # on the fly. |
118 | LDPPFLAGS += \ | 115 | LDPPFLAGS += \ |
119 | -include $(srctree)/include/u-boot/u-boot.lds.h \ | 116 | -include $(srctree)/include/u-boot/u-boot.lds.h \ |
120 | -include $(objtree)/include/config.h \ | 117 | -include $(objtree)/include/config.h \ |
121 | -DCPUDIR=$(CPUDIR) \ | 118 | -DCPUDIR=$(CPUDIR) \ |
122 | $(shell $(LD) --version | \ | 119 | $(shell $(LD) --version | \ |
123 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') | 120 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') |
124 | 121 | ||
125 | quiet_cmd_mkimage = MKIMAGE $@ | 122 | quiet_cmd_mkimage = MKIMAGE $@ |
126 | cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ | 123 | cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ |
127 | $(if $(KBUILD_VERBOSE:1=), >/dev/null) | 124 | $(if $(KBUILD_VERBOSE:1=), >/dev/null) |
128 | 125 | ||
129 | MKIMAGEFLAGS_MLO = -T omapimage -a $(CONFIG_SPL_TEXT_BASE) | 126 | MKIMAGEFLAGS_MLO = -T omapimage -a $(CONFIG_SPL_TEXT_BASE) |
130 | 127 | ||
131 | MKIMAGEFLAGS_MLO.byteswap = -T omapimage -n byteswap -a $(CONFIG_SPL_TEXT_BASE) | 128 | MKIMAGEFLAGS_MLO.byteswap = -T omapimage -n byteswap -a $(CONFIG_SPL_TEXT_BASE) |
132 | 129 | ||
133 | MLO MLO.byteswap: $(obj)/u-boot-spl.bin FORCE | 130 | MLO MLO.byteswap: $(obj)/u-boot-spl.bin FORCE |
134 | $(call if_changed,mkimage) | 131 | $(call if_changed,mkimage) |
135 | 132 | ||
136 | ifeq ($(CONFIG_SYS_SOC),"at91") | 133 | ifeq ($(CONFIG_SYS_SOC),"at91") |
137 | MKIMAGEFLAGS_boot.bin = -T atmelimage | 134 | MKIMAGEFLAGS_boot.bin = -T atmelimage |
138 | 135 | ||
139 | ifeq ($(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER),y) | 136 | ifeq ($(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER),y) |
140 | MKIMAGEFLAGS_boot.bin += -n $(shell $(obj)/../tools/atmel_pmecc_params) | 137 | MKIMAGEFLAGS_boot.bin += -n $(shell $(obj)/../tools/atmel_pmecc_params) |
141 | 138 | ||
142 | boot.bin: $(obj)/../tools/atmel_pmecc_params | 139 | boot.bin: $(obj)/../tools/atmel_pmecc_params |
143 | endif | 140 | endif |
144 | 141 | ||
145 | boot.bin: $(obj)/u-boot-spl.bin FORCE | 142 | boot.bin: $(obj)/u-boot-spl.bin FORCE |
146 | $(call if_changed,mkimage) | 143 | $(call if_changed,mkimage) |
147 | else | 144 | else |
148 | ifdef CONFIG_ARCH_ZYNQ | 145 | ifdef CONFIG_ARCH_ZYNQ |
149 | MKIMAGEFLAGS_boot.bin = -T zynqimage -R $(srctree)/$(CONFIG_BOOT_INIT_FILE) | 146 | MKIMAGEFLAGS_boot.bin = -T zynqimage -R $(srctree)/$(CONFIG_BOOT_INIT_FILE) |
150 | endif | 147 | endif |
151 | ifdef CONFIG_ARCH_ZYNQMP | 148 | ifdef CONFIG_ARCH_ZYNQMP |
152 | MKIMAGEFLAGS_boot.bin = -T zynqmpimage -R $(srctree)/$(CONFIG_BOOT_INIT_FILE) | 149 | MKIMAGEFLAGS_boot.bin = -T zynqmpimage -R $(srctree)/$(CONFIG_BOOT_INIT_FILE) |
153 | endif | 150 | endif |
154 | 151 | ||
155 | spl/boot.bin: $(obj)/u-boot-spl.bin FORCE | 152 | spl/boot.bin: $(obj)/u-boot-spl.bin FORCE |
156 | $(call if_changed,mkimage) | 153 | $(call if_changed,mkimage) |
157 | endif | 154 | endif |
158 | 155 | ||
159 | ALL-y += $(obj)/$(SPL_BIN).bin | 156 | ALL-y += $(obj)/$(SPL_BIN).bin |
160 | 157 | ||
161 | ifdef CONFIG_SAMSUNG | 158 | ifdef CONFIG_SAMSUNG |
162 | ALL-y += $(obj)/$(BOARD)-spl.bin | 159 | ALL-y += $(obj)/$(BOARD)-spl.bin |
163 | endif | 160 | endif |
164 | 161 | ||
165 | ifdef CONFIG_ARCH_SOCFPGA | 162 | ifdef CONFIG_ARCH_SOCFPGA |
166 | ALL-y += $(obj)/$(SPL_BIN).sfp | 163 | ALL-y += $(obj)/$(SPL_BIN).sfp |
167 | endif | 164 | endif |
168 | 165 | ||
169 | ifdef CONFIG_ARCH_SUNXI | 166 | ifdef CONFIG_ARCH_SUNXI |
170 | ALL-y += $(obj)/sunxi-spl.bin | 167 | ALL-y += $(obj)/sunxi-spl.bin |
171 | endif | 168 | endif |
172 | 169 | ||
173 | ifeq ($(CONFIG_SYS_SOC),"at91") | 170 | ifeq ($(CONFIG_SYS_SOC),"at91") |
174 | ALL-y += boot.bin | 171 | ALL-y += boot.bin |
175 | endif | 172 | endif |
176 | 173 | ||
177 | ALL-$(CONFIG_ARCH_ZYNQ) += $(obj)/boot.bin | 174 | ALL-$(CONFIG_ARCH_ZYNQ) += $(obj)/boot.bin |
178 | ALL-$(CONFIG_ARCH_ZYNQMP) += $(obj)/boot.bin | 175 | ALL-$(CONFIG_ARCH_ZYNQMP) += $(obj)/boot.bin |
179 | 176 | ||
180 | all: $(ALL-y) | 177 | all: $(ALL-y) |
181 | 178 | ||
182 | quiet_cmd_cat = CAT $@ | 179 | quiet_cmd_cat = CAT $@ |
183 | cmd_cat = cat $(filter-out $(PHONY), $^) > $@ | 180 | cmd_cat = cat $(filter-out $(PHONY), $^) > $@ |
184 | 181 | ||
185 | quiet_cmd_copy = COPY $@ | 182 | quiet_cmd_copy = COPY $@ |
186 | cmd_copy = cp $< $@ | 183 | cmd_copy = cp $< $@ |
187 | 184 | ||
188 | ifeq ($(CONFIG_SPL_OF_CONTROL)$(CONFIG_OF_SEPARATE)$(CONFIG_SPL_OF_PLATDATA),yy) | 185 | ifeq ($(CONFIG_SPL_OF_CONTROL)$(CONFIG_OF_SEPARATE)$(CONFIG_SPL_OF_PLATDATA),yy) |
189 | $(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN)-nodtb.bin $(obj)/$(SPL_BIN)-pad.bin \ | 186 | $(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN)-nodtb.bin $(obj)/$(SPL_BIN)-pad.bin \ |
190 | $(obj)/$(SPL_BIN).dtb FORCE | 187 | $(obj)/$(SPL_BIN).dtb FORCE |
191 | $(call if_changed,cat) | 188 | $(call if_changed,cat) |
192 | 189 | ||
193 | $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-dtb.bin FORCE | 190 | $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-dtb.bin FORCE |
194 | $(call if_changed,copy) | 191 | $(call if_changed,copy) |
195 | else | 192 | else |
196 | $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-nodtb.bin FORCE | 193 | $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-nodtb.bin FORCE |
197 | $(call if_changed,copy) | 194 | $(call if_changed,copy) |
198 | endif | 195 | endif |
199 | 196 | ||
200 | # Create a file that pads from the end of u-boot-spl-nodtb.bin to bss_end | 197 | # Create a file that pads from the end of u-boot-spl-nodtb.bin to bss_end |
201 | $(obj)/$(SPL_BIN)-pad.bin: $(obj)/$(SPL_BIN) | 198 | $(obj)/$(SPL_BIN)-pad.bin: $(obj)/$(SPL_BIN) |
202 | @bss_size_str=$(shell $(NM) $< | awk 'BEGIN {size = 0} /__bss_size/ {size = $$1} END {print "ibase=16; " toupper(size)}' | bc); \ | 199 | @bss_size_str=$(shell $(NM) $< | awk 'BEGIN {size = 0} /__bss_size/ {size = $$1} END {print "ibase=16; " toupper(size)}' | bc); \ |
203 | dd if=/dev/zero of=$@ bs=1 count=$${bss_size_str} 2>/dev/null; | 200 | dd if=/dev/zero of=$@ bs=1 count=$${bss_size_str} 2>/dev/null; |
204 | 201 | ||
205 | # Pass the original device tree file through fdtgrep twice. The first pass | 202 | # Pass the original device tree file through fdtgrep twice. The first pass |
206 | # removes any unwanted nodes (i.e. those which don't have the | 203 | # removes any unwanted nodes (i.e. those which don't have the |
207 | # 'u-boot,dm-pre-reloc' property and thus are not needed by SPL. The second | 204 | # 'u-boot,dm-pre-reloc' property and thus are not needed by SPL. The second |
208 | # pass removes various unused properties from the remaining nodes. | 205 | # pass removes various unused properties from the remaining nodes. |
209 | # The output is typically a much smaller device tree file. | 206 | # The output is typically a much smaller device tree file. |
210 | quiet_cmd_fdtgrep = FDTGREP $@ | 207 | quiet_cmd_fdtgrep = FDTGREP $@ |
211 | cmd_fdtgrep = $(objtree)/tools/fdtgrep -b u-boot,dm-pre-reloc -RT $< \ | 208 | cmd_fdtgrep = $(objtree)/tools/fdtgrep -b u-boot,dm-pre-reloc -RT $< \ |
212 | -n /chosen -O dtb | \ | 209 | -n /chosen -O dtb | \ |
213 | $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \ | 210 | $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \ |
214 | $(addprefix -P ,$(subst $\",,$(CONFIG_OF_SPL_REMOVE_PROPS))) | 211 | $(addprefix -P ,$(subst $\",,$(CONFIG_OF_SPL_REMOVE_PROPS))) |
215 | 212 | ||
216 | $(obj)/$(SPL_BIN).dtb: dts/dt.dtb $(objtree)/tools/fdtgrep FORCE | 213 | $(obj)/$(SPL_BIN).dtb: dts/dt.dtb $(objtree)/tools/fdtgrep FORCE |
217 | $(call if_changed,fdtgrep) | 214 | $(call if_changed,fdtgrep) |
218 | 215 | ||
219 | pythonpath = PYTHONPATH=tools | 216 | pythonpath = PYTHONPATH=tools |
220 | 217 | ||
221 | quiet_cmd_dtocc = DTOC C $@ | 218 | quiet_cmd_dtocc = DTOC C $@ |
222 | cmd_dtocc = $(pythonpath) $(srctree)/tools/dtoc/dtoc -d $(obj)/$(SPL_BIN).dtb -o $@ platdata | 219 | cmd_dtocc = $(pythonpath) $(srctree)/tools/dtoc/dtoc -d $(obj)/$(SPL_BIN).dtb -o $@ platdata |
223 | 220 | ||
224 | quiet_cmd_dtoch = DTOC H $@ | 221 | quiet_cmd_dtoch = DTOC H $@ |
225 | cmd_dtoch = $(pythonpath) $(srctree)/tools/dtoc/dtoc -d $(obj)/$(SPL_BIN).dtb -o $@ struct | 222 | cmd_dtoch = $(pythonpath) $(srctree)/tools/dtoc/dtoc -d $(obj)/$(SPL_BIN).dtb -o $@ struct |
226 | 223 | ||
227 | quiet_cmd_plat = PLAT $@ | 224 | quiet_cmd_plat = PLAT $@ |
228 | cmd_plat = $(CC) $(c_flags) -c $< -o $@ | 225 | cmd_plat = $(CC) $(c_flags) -c $< -o $@ |
229 | 226 | ||
230 | $(obj)/dts/dt-platdata.o: $(obj)/dts/dt-platdata.c include/generated/dt-structs.h | 227 | $(obj)/dts/dt-platdata.o: $(obj)/dts/dt-platdata.c include/generated/dt-structs.h |
231 | $(call if_changed,plat) | 228 | $(call if_changed,plat) |
232 | 229 | ||
233 | PHONY += dts_dir | 230 | PHONY += dts_dir |
234 | dts_dir: | 231 | dts_dir: |
235 | $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts) | 232 | $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts) |
236 | 233 | ||
237 | include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir dtoc | 234 | include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir dtoc |
238 | $(call if_changed,dtoch) | 235 | $(call if_changed,dtoch) |
239 | 236 | ||
240 | $(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir dtoc | 237 | $(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir dtoc |
241 | $(call if_changed,dtocc) | 238 | $(call if_changed,dtocc) |
242 | 239 | ||
243 | dtoc: #$(objtree)/tools/_libfdt.so | 240 | dtoc: #$(objtree)/tools/_libfdt.so |
244 | 241 | ||
245 | ifdef CONFIG_SAMSUNG | 242 | ifdef CONFIG_SAMSUNG |
246 | ifdef CONFIG_VAR_SIZE_SPL | 243 | ifdef CONFIG_VAR_SIZE_SPL |
247 | VAR_SIZE_PARAM = --vs | 244 | VAR_SIZE_PARAM = --vs |
248 | else | 245 | else |
249 | VAR_SIZE_PARAM = | 246 | VAR_SIZE_PARAM = |
250 | endif | 247 | endif |
251 | $(obj)/$(BOARD)-spl.bin: $(obj)/u-boot-spl.bin | 248 | $(obj)/$(BOARD)-spl.bin: $(obj)/u-boot-spl.bin |
252 | $(if $(wildcard $(objtree)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl),\ | 249 | $(if $(wildcard $(objtree)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl),\ |
253 | $(objtree)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl,\ | 250 | $(objtree)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl,\ |
254 | $(objtree)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@ | 251 | $(objtree)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@ |
255 | endif | 252 | endif |
256 | 253 | ||
257 | quiet_cmd_objcopy = OBJCOPY $@ | 254 | quiet_cmd_objcopy = OBJCOPY $@ |
258 | cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ | 255 | cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ |
259 | 256 | ||
260 | OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary | 257 | OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary |
261 | 258 | ||
262 | $(obj)/$(SPL_BIN)-nodtb.bin: $(obj)/$(SPL_BIN) FORCE | 259 | $(obj)/$(SPL_BIN)-nodtb.bin: $(obj)/$(SPL_BIN) FORCE |
263 | $(call if_changed,objcopy) | 260 | $(call if_changed,objcopy) |
264 | 261 | ||
265 | LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL) | 262 | LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL) |
266 | ifneq ($(CONFIG_SPL_TEXT_BASE),) | 263 | ifneq ($(CONFIG_SPL_TEXT_BASE),) |
267 | LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) | 264 | LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) |
268 | endif | 265 | endif |
269 | 266 | ||
270 | MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage | 267 | MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage |
271 | $(obj)/$(SPL_BIN).sfp: $(obj)/$(SPL_BIN).bin FORCE | 268 | $(obj)/$(SPL_BIN).sfp: $(obj)/$(SPL_BIN).bin FORCE |
272 | $(call if_changed,mkimage) | 269 | $(call if_changed,mkimage) |
273 | 270 | ||
274 | quiet_cmd_mksunxiboot = MKSUNXI $@ | 271 | quiet_cmd_mksunxiboot = MKSUNXI $@ |
275 | cmd_mksunxiboot = $(objtree)/tools/mksunxiboot $< $@ | 272 | cmd_mksunxiboot = $(objtree)/tools/mksunxiboot $< $@ |
276 | $(obj)/sunxi-spl.bin: $(obj)/$(SPL_BIN).bin FORCE | 273 | $(obj)/sunxi-spl.bin: $(obj)/$(SPL_BIN).bin FORCE |
277 | $(call if_changed,mksunxiboot) | 274 | $(call if_changed,mksunxiboot) |
278 | 275 | ||
279 | # Rule to link u-boot-spl | 276 | # Rule to link u-boot-spl |
280 | # May be overridden by arch/$(ARCH)/config.mk | 277 | # May be overridden by arch/$(ARCH)/config.mk |
281 | quiet_cmd_u-boot-spl ?= LD $@ | 278 | quiet_cmd_u-boot-spl ?= LD $@ |
282 | cmd_u-boot-spl ?= (cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ | 279 | cmd_u-boot-spl ?= (cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ |
283 | $(patsubst $(obj)/%,%,$(u-boot-spl-init)) --start-group \ | 280 | $(patsubst $(obj)/%,%,$(u-boot-spl-init)) --start-group \ |
284 | $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \ | 281 | $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \ |
285 | $(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) \ | 282 | $(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) \ |
286 | --end-group \ | 283 | --end-group \ |
287 | $(PLATFORM_LIBS) -Map $(SPL_BIN).map -o $(SPL_BIN)) | 284 | $(PLATFORM_LIBS) -Map $(SPL_BIN).map -o $(SPL_BIN)) |
288 | 285 | ||
289 | $(obj)/$(SPL_BIN): $(u-boot-spl-platdata) $(u-boot-spl-init) \ | 286 | $(obj)/$(SPL_BIN): $(u-boot-spl-platdata) $(u-boot-spl-init) \ |
290 | $(u-boot-spl-main) $(obj)/u-boot-spl.lds FORCE | 287 | $(u-boot-spl-main) $(obj)/u-boot-spl.lds FORCE |
291 | $(call if_changed,u-boot-spl) | 288 | $(call if_changed,u-boot-spl) |
292 | 289 | ||
293 | $(sort $(u-boot-spl-init) $(u-boot-spl-main)): $(u-boot-spl-dirs) ; | 290 | $(sort $(u-boot-spl-init) $(u-boot-spl-main)): $(u-boot-spl-dirs) ; |
294 | 291 | ||
295 | PHONY += $(u-boot-spl-dirs) | 292 | PHONY += $(u-boot-spl-dirs) |
296 | $(u-boot-spl-dirs): $(u-boot-spl-platdata) | 293 | $(u-boot-spl-dirs): $(u-boot-spl-platdata) |
297 | $(Q)$(MAKE) $(build)=$@ | 294 | $(Q)$(MAKE) $(build)=$@ |
298 | 295 | ||
299 | quiet_cmd_cpp_lds = LDS $@ | 296 | quiet_cmd_cpp_lds = LDS $@ |
300 | cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \ | 297 | cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \ |
301 | -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $< | 298 | -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $< |
302 | 299 | ||
303 | $(obj)/u-boot-spl.lds: $(LDSCRIPT) FORCE | 300 | $(obj)/u-boot-spl.lds: $(LDSCRIPT) FORCE |
304 | $(call if_changed_dep,cpp_lds) | 301 | $(call if_changed_dep,cpp_lds) |
305 | 302 | ||
306 | # read all saved command lines | 303 | # read all saved command lines |
307 | 304 | ||
308 | targets := $(wildcard $(sort $(targets))) | 305 | targets := $(wildcard $(sort $(targets))) |
309 | cmd_files := $(wildcard $(obj)/.*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) | 306 | cmd_files := $(wildcard $(obj)/.*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) |
310 | 307 | ||
311 | ifneq ($(cmd_files),) | 308 | ifneq ($(cmd_files),) |
312 | $(cmd_files): ; # Do not try to update included dependency files | 309 | $(cmd_files): ; # Do not try to update included dependency files |
313 | include $(cmd_files) | 310 | include $(cmd_files) |
314 | endif | 311 | endif |
315 | 312 | ||
316 | PHONY += FORCE | 313 | PHONY += FORCE |
317 | FORCE: | 314 | FORCE: |
318 | 315 | ||
319 | # Declare the contents of the .PHONY variable as phony. We keep that | 316 | # Declare the contents of the .PHONY variable as phony. We keep that |
320 | # information in a variable so we can use it in if_changed and friends. | 317 | # information in a variable so we can use it in if_changed and friends. |
321 | .PHONY: $(PHONY) | 318 | .PHONY: $(PHONY) |
322 | 319 |