xref: /OK3568_Linux_fs/buildroot/boot/uboot/Config.in (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1config BR2_TARGET_UBOOT
2	bool "U-Boot"
3	help
4	  Build "Das U-Boot" Boot Monitor
5
6	  https://www.denx.de/wiki/U-Boot
7
8if BR2_TARGET_UBOOT
9choice
10	prompt "Build system"
11	default BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG if BR2_TARGET_UBOOT_LATEST_VERSION
12	default BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
13
14config BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
15	bool "Kconfig"
16	help
17	  Select this option if you use a recent U-Boot version (2015.04
18	  or newer), so that we use the Kconfig build system.
19
20config BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
21	bool "Legacy"
22	help
23	  Select this option if you use an old U-Boot (older than
24	  2015.04), so that we use the old build system.
25
26endchoice
27
28if BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
29config BR2_TARGET_UBOOT_BOARDNAME
30	string "U-Boot board name"
31	help
32	  One of U-Boot supported boards to be built.
33	  This will be suffixed with _config to meet U-Boot standard
34	  naming. See boards.cfg in U-Boot source code for the list of
35	  available configurations.
36endif
37
38choice
39	prompt "U-Boot Version"
40	help
41	  Select the specific U-Boot version you want to use
42
43config BR2_TARGET_UBOOT_LATEST_VERSION
44	bool "2021.10"
45
46config BR2_TARGET_UBOOT_CUSTOM_VERSION
47	bool "Custom version"
48	help
49	  This option allows to use a specific official versions
50
51config BR2_TARGET_UBOOT_CUSTOM_TARBALL
52	bool "Custom tarball"
53
54config BR2_TARGET_UBOOT_CUSTOM_GIT
55	bool "Custom Git repository"
56
57config BR2_TARGET_UBOOT_CUSTOM_HG
58	bool "Custom Mercurial repository"
59
60config BR2_TARGET_UBOOT_CUSTOM_SVN
61	bool "Custom Subversion repository"
62
63endchoice
64
65config BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE
66	string "U-Boot version"
67	depends on BR2_TARGET_UBOOT_CUSTOM_VERSION
68
69config BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION
70	string "URL of custom U-Boot tarball"
71	depends on BR2_TARGET_UBOOT_CUSTOM_TARBALL
72
73if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG || BR2_TARGET_UBOOT_CUSTOM_SVN
74
75config BR2_TARGET_UBOOT_CUSTOM_REPO_URL
76	string "URL of custom repository"
77
78config BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION
79	string "Custom repository version"
80	help
81	  Revision to use in the typical format used by
82	  Git/Mercurial/Subversion E.G. a sha id, a tag, branch, ..
83
84endif
85
86config BR2_TARGET_UBOOT_VERSION
87	string
88	default "2021.10"	if BR2_TARGET_UBOOT_LATEST_VERSION
89	default BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE \
90		if BR2_TARGET_UBOOT_CUSTOM_VERSION
91	default "custom"	if BR2_TARGET_UBOOT_CUSTOM_TARBALL
92	default BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION \
93		if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG || BR2_TARGET_UBOOT_CUSTOM_SVN
94
95config BR2_TARGET_UBOOT_PATCH
96	string "Custom U-Boot patches"
97	default BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR if BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR != ""  # legacy
98	help
99	  A space-separated list of patches to apply to U-Boot.
100	  Each patch can be described as an URL, a local file path,
101	  or a directory. In the case of a directory, all files
102	  matching *.patch in the directory will be applied.
103
104	  Most users may leave this empty
105
106if BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
107choice
108	prompt "U-Boot configuration"
109	default BR2_TARGET_UBOOT_USE_DEFCONFIG
110
111config BR2_TARGET_UBOOT_USE_DEFCONFIG
112	bool "Using an in-tree board defconfig file"
113
114config BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG
115	bool "Using a custom board (def)config file"
116
117endchoice
118
119config BR2_TARGET_UBOOT_BOARD_DEFCONFIG
120	string "Board defconfig"
121	depends on BR2_TARGET_UBOOT_USE_DEFCONFIG
122	help
123	  Name of the board for which U-Boot should be built, without
124	  the _defconfig suffix.
125
126config BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE
127	string "Configuration file path"
128	depends on BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG
129	help
130	  Path to the U-Boot configuration file.
131
132config BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES
133	string "Additional configuration fragment files"
134	help
135	  A space-separated list of configuration fragment files,
136	  that will be merged to the main U-Boot configuration file.
137endif
138
139config BR2_TARGET_UBOOT_NEEDS_DTC
140	bool "U-Boot needs dtc"
141	select BR2_PACKAGE_HOST_DTC
142	help
143	  Select this option if your U-Boot board configuration
144	  requires the Device Tree compiler to be available.
145
146config BR2_TARGET_UBOOT_NEEDS_PYTHON
147	bool
148
149choice
150	bool "U-Boot needs host Python"
151
152config BR2_TARGET_UBOOT_NEEDS_PYTHON_NONE
153	bool "no"
154	depends on !BR2_TARGET_UBOOT_NEEDS_PYTHON
155	help
156	  Select this option if U-Boot does not need any
157	  host python to build.
158
159config BR2_TARGET_UBOOT_NEEDS_PYTHON2
160	bool "python 2.x"
161	help
162	  Select this option if U-Boot needs a host Python 2.x
163	  interpreter. This is the case for some U-Boot
164	  configurations, prior to U-Boot 2020.01.
165
166config BR2_TARGET_UBOOT_NEEDS_PYTHON3
167	bool "python 3.x"
168	help
169	  Select this option if U-Boot needs a host Python 3.x
170	  interpreter. This is the case for some U-Boot
171	  configurations, after U-Boot 2020.01.
172
173endchoice
174
175config BR2_TARGET_UBOOT_NEEDS_PYLIBFDT
176	bool "U-Boot needs pylibfdt"
177	select BR2_TARGET_UBOOT_NEEDS_PYTHON
178	help
179	  Select this option if your U-Boot board configuration
180	  requires the Python libfdt library to be available.
181
182config BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS
183	bool "U-Boot needs pyelftools"
184	select BR2_TARGET_UBOOT_NEEDS_PYTHON
185	help
186	  Select this option if your U-Boot board configuration
187	  requires the Python pyelftools library to be available.
188	  This is used by some rockchip SOCs for elf parsing.
189	  For example: rk3399 soc boards.
190
191config BR2_TARGET_UBOOT_NEEDS_OPENSSL
192	bool "U-Boot needs OpenSSL"
193	help
194	  Select this option if your U-Boot board configuration
195	  requires OpenSSL to be available on the host. This is
196	  typically the case when the board configuration has
197	  CONFIG_FIT_SIGNATURE enabled.
198
199config BR2_TARGET_UBOOT_NEEDS_LZOP
200	bool "U-Boot needs lzop"
201	help
202	  Select this option if your U-Boot board configuration
203	  requires lzop to be available on the host. This is typically
204	  the case when the board configuration has CONFIG_SPL_LZO
205	  enabled.
206
207config BR2_TARGET_UBOOT_NEEDS_ATF_BL31
208	bool "U-Boot needs ATF BL31"
209	depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE
210	depends on !BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
211	select BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31
212	help
213	  Some specific platforms (such as Allwinner A64/H5)
214	  encapsulate the BL31 part of ATF inside U-Boot. This option
215	  makes sure ATF gets built prior to U-Boot, and that the BL31
216	  variable pointing to ATF's BL31 binary, is passed during the
217	  Buildroot build.
218
219choice
220	prompt "U-Boot ATF BL31 format"
221	default BR2_TARGET_UBOOT_NEEDS_ATF_BL31_BIN
222	depends on BR2_TARGET_UBOOT_NEEDS_ATF_BL31
223
224config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_BIN
225	bool "bl31.bin"
226
227config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF
228	bool "bl31.elf"
229
230endchoice
231
232config BR2_TARGET_UBOOT_NEEDS_OPENSBI
233	bool "U-Boot needs OpenSBI"
234	depends on BR2_TARGET_OPENSBI
235	help
236	  Some RISC-V platforms (such as SiFive HiFive Unleashed)
237	  encapsulate the OpenSBI firmware image inside U-Boot.
238	  This option makes sure OpenSBI gets built prior to U-Boot,
239	  and that the OpenSBI variable pointing to OpenSBI binary,
240	  is passed during the Buildroot build.
241
242config BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE
243	bool "U-Boot needs firmware-imx"
244	depends on BR2_PACKAGE_FIRMWARE_IMX
245	depends on BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW || \
246		BR2_PACKAGE_FIRMWARE_IMX_NEEDS_HDMI_FW
247	help
248	  Some i.MX8 platforms (such as i.MX8 M, i.MX 8M Mini, i.MX 8M
249	  Nano) encapsulate NXP specific firmware (DDR, HDMI) inside
250	  U-Boot.
251	  This option makes sure that the i.MX firmwares are copied into
252	  the U-Boot source directory.
253
254menu "U-Boot binary format"
255
256config BR2_TARGET_UBOOT_FORMAT_AIS
257	bool "u-boot.ais"
258	help
259	  AIS (Application Image Script) is a format defined by TI.
260	  It is required to load code/data on OMAP-L1 processors.
261	  u-boot.ais contains U-Boot with the SPL support.
262
263config BR2_TARGET_UBOOT_FORMAT_BIN
264	bool "u-boot.bin"
265	default y
266
267config BR2_TARGET_UBOOT_FORMAT_DTB
268	bool "u-boot.dtb"
269
270config BR2_TARGET_UBOOT_FORMAT_DTB_BIN
271	bool "u-boot-dtb.bin"
272
273config BR2_TARGET_UBOOT_FORMAT_NAND_BIN
274	bool "u-boot-nand.bin"
275
276config BR2_TARGET_UBOOT_FORMAT_ELF
277	bool "u-boot.elf"
278
279config BR2_TARGET_UBOOT_FORMAT_IMG
280	bool "u-boot.img"
281
282config BR2_TARGET_UBOOT_FORMAT_DTB_IMG
283	bool "u-boot-dtb.img"
284
285config BR2_TARGET_UBOOT_FORMAT_IMX
286	bool "u-boot.imx"
287
288config BR2_TARGET_UBOOT_FORMAT_DTB_IMX
289	bool "u-boot-dtb.imx"
290
291config BR2_TARGET_UBOOT_FORMAT_ITB
292	bool "u-boot.itb"
293
294config BR2_TARGET_UBOOT_FORMAT_KWB
295	bool "u-boot.kwb (Marvell)"
296	depends on BR2_arm
297
298config BR2_TARGET_UBOOT_FORMAT_NAND
299	bool "u-boot.nand (Freescale i.MX28)"
300	depends on BR2_arm
301	help
302	  This is Freescale i.MX28 BootStream format (.sb), with a
303	  header for booting from a NAND flash.
304
305	  U-Boot includes an mxsboot tool to generate this format,
306	  starting from 2011.12.
307
308	  There are two possibilities when preparing an image writable
309	  to NAND flash:
310	  1) The NAND was not written at all yet or the BCB (Boot
311	  Control Blocks) is broken. In this case, the NAND image
312	  'u-boot.nand' needs to written.
313	  2) The NAND flash was already written with a good BCB. This
314	  applies after 'u-boot.nand' was correctly written. There is no
315	  need to write the BCB again. In this case, the bootloader can
316	  be upgraded by writing 'u-boot.sb'.
317
318	  To satisfy both cases, the 'u-boot.nand' image obtained from
319	  mxsboot as well as the U-Boot make target 'u-boot.sb' are
320	  copied to the binaries directory.
321
322	  See doc/README.mxs (or doc/README.mx28_common before 2013.07)
323
324if BR2_TARGET_UBOOT_FORMAT_NAND
325
326config BR2_TARGET_UBOOT_FORMAT_NAND_PAGE_SIZE
327	int "NAND page size"
328	default 2048
329	help
330	  The NAND page size of the targets NAND flash in bytes as a
331	  decimal integer value.
332
333	  The value provided here is passed to the -w option of mxsboot.
334
335config BR2_TARGET_UBOOT_FORMAT_NAND_OOB_SIZE
336	int "NAND OOB size"
337	default 64
338	help
339	  The NAND OOB size of the targets NAND flash in bytes as a
340	  decimal integer value.
341
342	  The value provided here is passed to the -o option of mxsboot.
343
344config BR2_TARGET_UBOOT_FORMAT_NAND_ERASE_SIZE
345	int "NAND erase size"
346	default 131072
347	help
348	  The NAND eraseblock size of the targets NAND flash in bytes as
349	  a decimal integer value.
350
351	  The value provided here is passed to the -e option of mxsboot.
352
353endif
354
355config BR2_TARGET_UBOOT_FORMAT_SB
356	bool "u-boot.sb (Freescale i.MX28)"
357	depends on BR2_arm
358
359config BR2_TARGET_UBOOT_FORMAT_SD
360	bool "u-boot.sd (Freescale i.MX28)"
361	depends on BR2_arm
362	help
363	  This is Freescale i.MX28 SB format, with a header for booting
364	  from an SD card.
365
366	  U-Boot includes an mxsboot tool to generate this format,
367	  starting from 2011.12.
368
369	  See doc/README.mxs (or doc/README.mx28_common before 2013.07)
370
371config BR2_TARGET_UBOOT_FORMAT_STM32
372	bool "u-boot.stm32"
373	depends on BR2_arm
374
375config BR2_TARGET_UBOOT_FORMAT_CUSTOM
376	bool "Custom (specify below)"
377	help
378	  On some platforms, the standard U-Boot binary is not called
379	  u-boot.bin, but u-boot<something>.bin. If this is your case,
380	  you should select this option and specify the correct name(s)
381	  in BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME.
382
383config BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME
384	string "U-Boot binary format: custom names"
385	depends on BR2_TARGET_UBOOT_FORMAT_CUSTOM
386	help
387	  In case the U-Boot binary for the target platform is not among
388	  the default names, one or more custom names can be listed
389	  here.
390	  Use space to separate multiple names.
391	  Example:
392	  u-boot_magic.bin
393
394endmenu
395
396config BR2_TARGET_UBOOT_OMAP_IFT
397	bool "produce a .ift signed image (OMAP)"
398	depends on BR2_TARGET_UBOOT_FORMAT_BIN
399	depends on BR2_arm || BR2_armeb
400	select BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS
401	help
402	  Use gpsign to produce an image of u-boot.bin signed with
403	  a Configuration Header for booting on OMAP processors.
404	  This allows U-Boot to boot without the need for an
405	  intermediate bootloader (e.g. x-loader) if it is written
406	  on the first sector of the boot medium.
407	  This only works for some media, such as NAND. Check your
408	  chip documentation for details. You might also want to
409	  read the documentation of gpsign, the tool that generates
410	  the .ift image, at:
411	  https://github.com/nmenon/omap-u-boot-utils/blob/master/README
412
413if BR2_TARGET_UBOOT_OMAP_IFT
414
415config BR2_TARGET_UBOOT_OMAP_IFT_CONFIG
416	string "gpsign Configuration Header config file"
417	help
418	  The Configuration Header (CH) config file defines the
419	  desired content of the CH for the signed image.
420	  It usually contains external RAM settings and
421	  possibly other external devices initialization.
422	  The omap-u-boot-utils software contains example
423	  configuration files for some boards:
424	  https://github.com/nmenon/omap-u-boot-utils/tree/master/configs
425
426endif
427
428config BR2_TARGET_UBOOT_SPL
429	bool "Install U-Boot SPL binary image"
430	depends on !BR2_TARGET_XLOADER
431	help
432	  Install the U-Boot SPL binary image to the images
433	  directory.
434	  SPL is a first stage bootloader loaded into internal
435	  memory in charge of enabling and configuring the
436	  external memory (DDR), and load the u-boot program
437	  into DDR.
438
439config BR2_TARGET_UBOOT_SPL_NAME
440	string "U-Boot SPL/TPL binary image name(s)"
441	default "spl/u-boot-spl.bin"
442	depends on BR2_TARGET_UBOOT_SPL
443	help
444	  A space-separated list of SPL/TPL binaries, generated during
445	  u-boot build. For most platform SPL name is spl/u-boot-spl.bin
446	  and TPL name is tpl/u-boot-tpl.bin but not always. SPL name is
447	  MLO on OMAP and SPL on i.MX6 for example.
448
449config BR2_TARGET_UBOOT_ZYNQ_IMAGE
450	bool "Generate image for Xilinx Zynq"
451	depends on BR2_arm
452	depends on BR2_TARGET_UBOOT_SPL
453	depends on BR2_TARGET_UBOOT_FORMAT_DTB_IMG
454	help
455	  Generate the BOOT.BIN file from U-Boot's SPL. The image
456	  boots the Xilinx Zynq chip without any FPGA bitstream.
457	  A bitstream can be loaded by the U-Boot. The SPL searchs
458	  for u-boot-dtb.img file so this U-Boot format is required
459	  to be set.
460
461config BR2_TARGET_UBOOT_ZYNQMP
462	bool "Boot on the Xilinx ZynqMP SoCs"
463	depends on BR2_aarch64
464	help
465	  Enable options specific to the Xilinx ZynqMP family of SoCs.
466
467if BR2_TARGET_UBOOT_ZYNQMP
468
469config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
470	string "PMU firmware location"
471	depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
472	help
473	  Location of a PMU firmware binary.
474
475	  If not empty, instructs the U-Boot build process to generate
476	  a boot.bin (to be loaded by the ZynqMP boot ROM) containing
477	  both the U-Boot SPL and the PMU firmware in the
478	  Xilinx-specific boot format.
479
480	  The value can be an absolute or relative path, and will be
481	  used directly from where it is located, or an URI
482	  (e.g. http://...), and it will be downloaded and used from
483	  the download directory.
484
485	  If empty, the generated boot.bin will not contain a PMU
486	  firmware.
487
488	  This feature requires U-Boot >= 2018.07.
489
490config BR2_TARGET_UBOOT_ZYNQMP_PM_CFG
491	string "PMU configuration location"
492	depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
493	help
494	  Location of a PMU configuration file.
495
496	  If not empty, Buildroot will convert the PMU configuration
497	  file into a loadable blob and pass it to U-Boot. The blob gets
498	  embedded into the U-Boot SPL and is used to configure the PMU
499	  during board initialization.
500
501	  Unlike the PMU firmware, the PMU configuration file is unique
502	  to each board configuration. A PMU configuration file can be
503	  generated by building your Xilinx SDK BSP. It can be found in
504	  the BSP source, for example at
505	    ./psu_cortexa53_0/libsrc/xilpm_v2_4/src/pm_cfg_obj.c
506
507	  Leave this option empty if your PMU firmware has a hard-coded
508	  configuration object or you are loading it by any other means.
509
510	  This feature requires U-Boot >= v2019.10.
511
512config BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE
513	string "Custom psu_init_gpl file"
514	depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
515	help
516	  On ZynqMP the booloader is responsible for some basic
517	  initializations, such as enabling peripherals and
518	  configuring pinmuxes. The psu_init_gpl.c file (and,
519	  optionally, psu_init_gpl.h) contains the code for such
520	  initializations.
521
522	  Although U-Boot contains psu_init_gpl.c files for some
523	  boards, each of them describes only one specific
524	  configuration. Users of a different board, or needing a
525	  different configuration, can generate custom files using the
526	  Xilinx development tools.
527
528	  Set this variable to the path to your psu_init_gpl.c file
529	  (e.g. "board/myboard/psu_init_gpl.c"). psu_init_gpl.h, if
530	  needed, should be in the same directory. U-Boot will build
531	  and link the user-provided file instead of the built-in one.
532
533	  Leave empty to use the files provided by U-Boot.
534
535	  This feature requires commit
536	  6da4f67ad09cd8b311d77b2b04e557b7ef65b56c from upstream
537	  U-Boot, available from versions after 2018.07.
538
539endif
540
541config BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC
542	bool "CRC image for Altera SoC FPGA (mkpimage)"
543	depends on BR2_arm
544	depends on BR2_TARGET_UBOOT_SPL || BR2_TARGET_UBOOT_FORMAT_DTB_BIN
545	help
546	  Pass the U-Boot image through the mkpimage tool to enable
547	  booting on the Altera SoC FPGA based platforms.
548
549	  On some platforms, it's the SPL that needs to be passed
550	  through mkpimage. On some other platforms there is no SPL
551	  because the internal SRAM is big enough to store the full
552	  U-Boot. In this case, it's directly the full U-Boot image
553	  that is passed through mkpimage.
554
555	  If BR2_TARGET_UBOOT_SPL is enabled then
556	  BR2_TARGET_UBOOT_SPL_NAME is converted by mkpimage using
557	  header version 0.
558
559	  Otherwise the full u-boot-dtb.bin is converted using
560	  mkpimage header version 1.
561
562	  In either case the resulting file will be given a .crc
563	  extension.
564
565if BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
566
567config BR2_TARGET_UBOOT_CUSTOM_DTS_PATH
568	string "Device Tree Source file paths"
569	help
570	  Space-separated list of paths to device tree source files
571	  that will be copied to arch/ARCH/dts/ before starting the
572	  build.
573
574	  To use this device tree source file, the U-Boot configuration
575	  file must refer to it.
576
577endif
578
579config BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS
580	string "Custom make options"
581	help
582	  List of custom make options passed at build time. Can be
583	  used for example to pass a DEVICE_TREE= value.
584
585endif # BR2_TARGET_UBOOT
586