summaryrefslogtreecommitdiff
path: root/common/Kconfig
blob: dba6aa43fd3343d9110d970609f48a64098db942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
# SPDX-License-Identifier: GPL-2.0-only

source "common/boards/Kconfig"

config GREGORIAN_CALENDER
	bool

config HAS_KALLSYMS
	bool

config HAS_MODULES
	bool

config HAS_CACHE
	bool
	help
	  This allows you to run "make ARCH=sandbox allyesconfig".

	  Drivers that depend on a cache implementation can depend on this
	  config, so that you don't get a compilation error.

config HAS_DMA
	bool
	help
	  This allows you to run "make ARCH=sandbox allyesconfig".

	  Drivers that depend on a DMA implementation can depend on this
	  config, so that you don't get a compilation error.

config HAS_ARCH_SJLJ
	bool
	help
	  Architecture has support implemented for setjmp()/longjmp()/initjmp()

config GENERIC_GPIO
	bool

config BLOCK
	bool

config BLOCK_WRITE
	bool

config USE_COMPRESSED_DTB
	bool
	depends on ARM || RISCV
	select UNCOMPRESS
	select LZO_DECOMPRESS

config FILETYPE
	bool

config BINFMT
	bool
	select FILETYPE

config UIMAGE
	select UNCOMPRESS
	select CRC32
	bool

config FITIMAGE
	bool
	select OFTREE
	select DIGEST

config FITIMAGE_SIGNATURE
	select CRYPTO_RSA
	bool

config LOGBUF
	bool

config STDDEV
	bool

config MENUTREE
	bool
	select GLOB
	select GLOB_SORT

config ARCH_DMA_ADDR_T_64BIT
	bool

config BAREBOX_UPDATE_IMX_NAND_FCB
	bool
	depends on ARCH_IMX6 || ARCH_IMX28
	depends on BAREBOX_UPDATE
	depends on MTD_WRITE
	depends on NAND_MXS
	select BCH if ARCH_IMX6
	default y

config UBIFORMAT
	bool
	select LIBSCAN
	select LIBUBIGEN
	depends on MTD_UBI
	default y

config USBGADGET_START
	bool
	depends on CMD_USBGADGET || USB_GADGET_AUTOSTART
	select ENVIRONMENT_VARIABLES
	default y

config BOOT
	select GLOB
	bool

config FASTBOOT_BASE
	bool

menu "General Settings"

config LOCALVERSION
	string "Local version - append to the version string"
	help
	  Append an extra string to the end of your version string.
	  The string you set here will be appended after the contents of
	  any files with a filename matching localversion* in your
	  object and source tree, in that order. Your total string can
	  be a maximum of 64 characters.

config LOCALVERSION_AUTO
	bool "Automatically append version information to the version string"
	default y
	help
	  This will try to automatically determine if the current tree is a
	  release tree by looking for git tags that belong to the current
	  top of tree revision.

	  A string of the format -gxxxxxxxx will be added to the localversion
	  if a git-based tree is found. The string generated by this will be
	  appended after any matching localversion* files, and after the value
	  set in CONFIG_LOCALVERSION.

	  (The actual string used here is the first eight characters produced
	  by running the command:

	    $ git rev-parse --verify HEAD

	  which is done within the script "scripts/setlocalversion".)

config BANNER
	bool "display banner"
	default y

config MEMINFO
	bool "display memory info"
	default y

config ENVIRONMENT_VARIABLES
	bool "environment variables support"

config GLOBALVAR
	bool "global environment variables support"
	default y if !SHELL_NONE
	select FNMATCH
	help
	  Global environment variables begin with "global.". Unlike normal
	  shell variables they have the same values in all contexts. Global
	  variables are used to control several aspects of the system behaviour.
	  If unsure, say yes here.

config NVVAR
	bool "Non volatile global environment variables support"
	default y if !SHELL_NONE && ENV_HANDLING
	depends on GLOBALVAR
	select FNMATCH
	help
	  Non volatile environment variables begin with "nv.". They behave like
	  global variables above, but when CONFIG_ENV_HANDLING is enabled, they
	  can be stored in the environment storage with 'saveenv' and thus
	  persisted over restarts. nv variables are coupled with global
	  variables of the same name. Setting "nv.foo" results in "global.foo"
	  changed also (but not the other way round: setting "global.foo" leaves
	  "nv.foo" untouched). The idea is that nv variables can store defaults
	  while global variables can be changed during runtime without changing
	  the default.

menu "memory layout"

source "pbl/Kconfig"

config MMU
	bool "Enable MMU"
	depends on !CPU_ARM946E
	help
	  Saying yes here enables the MMU. This is useful on some architectures
	  to enable the data cache which depends on the MMU. See Documentation/mmu.txt
	  for further information.

config MMU_EARLY
	bool "Enable MMU early"
	depends on ARM
	depends on MMU
	default y
	help
	  This enables the MMU during early startup. This speeds up things during startup
	  of barebox, but may lead to harder to debug code. If unsure say yes here.

config HAVE_CONFIGURABLE_TEXT_BASE
	bool

config TEXT_BASE
	depends on HAVE_CONFIGURABLE_TEXT_BASE
	prompt "TEXT_BASE"
	hex
	default ARCH_TEXT_BASE
	help
	  The Address barebox gets linked at.

config BAREBOX_MAX_IMAGE_SIZE
	prompt "Maximum size of barebox"
	hex
	default 0xffffffff
	help
	  Define the maximum size of barebox

config BAREBOX_MAX_PBL_SIZE
	depends on PBL_IMAGE
	prompt "Maximum pre-bootloader size"
	hex
	default 0xffffffff
	help
	  On some hardware the ROM code can load the pbl into SRAM, but not
	  the whole image. This option specifies how big the pbl may get.

config BAREBOX_MAX_BARE_INIT_SIZE
	prompt "Maximum bare_init size"
	hex
	default 0xffffffff
	help
	  Define the maximum size of bare_init
	  this will allow your bare_init to fit in SRAM as example
	  ARCH can overwrite it via ARCH_BAREBOX_MAX_BARE_INIT_SIZE

config HAVE_CONFIGURABLE_MEMORY_LAYOUT
	bool

choice
	prompt "select memory layout"
	depends on HAVE_CONFIGURABLE_MEMORY_LAYOUT
	default MEMORY_LAYOUT_DEFAULT

config MEMORY_LAYOUT_DEFAULT
	bool "use default memory layout"
	help
	  select this option to use bareboxs standard memory layout:

	  stack
	  -----
	  malloc heap
	  -----
	  TEXT_BASE

config MEMORY_LAYOUT_FIXED
	bool "manually assign a memory layout"
	help
	  select this option to manually assign stack base and malloc
	  heap base

endchoice

config STACK_BASE
	depends on MEMORY_LAYOUT_FIXED
	hex
	prompt "STACK_BASE"

config STACK_SIZE
	hex
	default 0x8000
	prompt "Stack size"

config MALLOC_BASE
	depends on MEMORY_LAYOUT_FIXED
	hex
	prompt "MALLOC_BASE"

config MALLOC_SIZE
	hex
	default 0x400000
	prompt "malloc area size"
endmenu

config BROKEN
	bool

config EXPERIMENTAL
	bool
	prompt "Prompt for experimental code"

choice
	prompt "malloc implementation"

config MALLOC_DLMALLOC
	bool "dlmalloc"

config MALLOC_TLSF
	bool "tlsf"

config MALLOC_DUMMY
	bool "dummy malloc"
	depends on SHELL_NONE
	help
	  select this option to use a dummy malloc implementation. With this
	  memory is never freed. This is suitable for well tested noninteractive
	  environments only.

config MALLOC_LIBC
	bool "libc malloc"
	depends on SANDBOX
	help
	  select this option to use the libc malloc implementation in the sandbox.
	  This is benefecial for testing with external memory integrity tools.

endchoice

config MODULES
	depends on HAS_MODULES
	depends on EXPERIMENTAL
	bool "module support"
	modules
	help
	  This option enables support for loadable modules via insmod. Module
	  support is quite experimental at the moment. There is no convenient
	  way to compile modules and the list of exported symbols to actually
	  make use of modules is short to nonexistent

config HAVE_MOD_ARCH_SPECIFIC
	bool
	help
	  The arch uses struct mod_arch_specific to store data.  Many arches
	  just need a simple module loader without arch specific data - those
	  should not enable this.

config KALLSYMS
	depends on HAS_KALLSYMS
	bool "kallsyms"
	help
	  With Kallsyms enabled all symbols are compiled into the barebox image.
	  This is useful to print a nice backtrace when an exception occurs.

config RELOCATABLE
	depends on PPC || ARM || RISCV
	bool "generate relocatable barebox binary"
	help
	  A non relocatable barebox binary will run at it's compiled in
	  link address in RAM. This leads to smaller image sizes but may
	  put barebox just in the middle of RAM. With this option enabled
	  instead barebox can determine this address at runtime and thus
	  allowing it to relocate to the end of the available RAM. This
	  way you have the whole memory in a single piece.

config PANIC_HANG
	bool "hang the system in case of a fatal error"
	help
	  This option enables stop of the system in case of a
	  fatal error, so that you have to reset it manually.
	  This is probably NOT a good idea for an embedded
	  system where you want the system to reboot
	  automatically as fast as possible, but it may be
	  useful during development since you can try to debug
	  the conditions that lead to the situation.

config PROMPT
	string
	prompt "barebox command prompt"
	default "barebox:"

config BAUDRATE
	int
	prompt "Default baudrate"
	default 115200

config SIMPLE_READLINE
	bool
	default y
	depends on !CMDLINE_EDITING

config CBSIZE
	int
	prompt "Buffer size for input from the Console"
	default 1024

config FIRMWARE
	bool

choice
	prompt "Select your shell"

	config SHELL_HUSH
		bool "hush parser"
		select ENVIRONMENT_VARIABLES
		select COMMAND_SUPPORT
		select PARAMETER
		select BINFMT
		select STDDEV
		select GLOB
		help
		  Enable hush support. This is the most advanced shell available
		  for barebox.

	config SHELL_SIMPLE
		bool "Simple parser"
		select ENVIRONMENT_VARIABLES
		select COMMAND_SUPPORT
		select PARAMETER
		select STDDEV
		select CMD_SETENV
		select GLOB
		help
		  simple shell. No if/then, no return values from commands, no loops

	config SHELL_NONE
		bool "no shell (noninteractive build)"
		help
		  No shell at all. This means no shell is started and your board has
		  to overwrite the barebox_main function pointer which is then called
		  at the end of the barebox startup process.
endchoice

config MAXARGS
	int
	depends on SHELL_SIMPLE
	prompt "max. Number of arguments accepted for monitor commands"
	default 16

config GLOB
	bool
	select FNMATCH
	prompt "globbing support"
	help
	  If you want to use wildcards like * or ? say y here.

	  Globbing can be used in the HUSH shell, but is also used
	  internally in the menutree command.

config GLOB_SORT
	select QSORT
	bool
	prompt "glob sort support"
	depends on GLOB

config PROMPT_HUSH_PS2
	string
	depends on SHELL_HUSH
	prompt "hush PS2"
	default "> "

config HUSH_FANCY_PROMPT
	bool
	depends on SHELL_HUSH
	select PROCESS_ESCAPE_SEQUENCE
	prompt "allow fancy hush prompts"
	help
	  Allow to set PS1 from the command line. PS1 can have several escaped commands
	  like \h for the 'model' string or \w for the current working directory.

config CMDLINE_EDITING
	depends on !SHELL_NONE
	bool
	prompt "Enable command line editing"

config AUTO_COMPLETE
	bool
	depends on CMDLINE_EDITING
	prompt "Enable auto completion"

config MENU
	bool
	prompt "Menu Framework"
	depends on !SHELL_NONE
	select PROCESS_ESCAPE_SEQUENCE
	help
	  a menu framework that allow us to create list menu to simplify
	  barebox and make it more user-friendly

config PASSWORD
	bool
	prompt "Password Framework"
	select DIGEST
	help
	  allow you to have password protection framework

config PASSWORD_DEFAULT
	string
	prompt "Password default file"
	depends on PASSWORD
	help
	  Set this to a file which is used as default password file. This file
	  has to contain the passwd encoded with the selected password digest.
	  i.e.:
	  echo -ne "MyPassword" | md5sum | while read a b; do echo $a > passwdfile; done


if PASSWORD

choice
	prompt "passwd checksum"

config PASSWD_SUM_MD5
	bool "MD5"
	select DIGEST_MD5_GENERIC

config PASSWD_SUM_SHA1
	bool "SHA1"
	select DIGEST_SHA1_GENERIC

config PASSWD_SUM_SHA256
	bool "SHA256"
	select DIGEST_SHA256_GENERIC

config PASSWD_SUM_SHA512
	bool "SHA512"
	select DIGEST_SHA512_GENERIC

config PASSWD_CRYPTO_PBKDF2
	bool "PBKDF2"
	select CRYPTO_PBKDF2

endchoice

endif

config DYNAMIC_CRC_TABLE
	bool
	depends on CRC32
	prompt "Generate the crc32 table dynamically"
	default y
	help
	  Saying yes to this option saves around 800 bytes of binary size.
	  If unsure say yes.

config ERRNO_MESSAGES
	bool
	prompt "print error values as text"
	default y

config TIMESTAMP
	bool
	default y
	select GREGORIAN_CALENDER
	prompt "print timestamp information from images"
	help
	  When CONFIG_TIMESTAMP is selected, the timestamp
	  (date and time) of an image is printed by image
	  commands like bootm or iminfo. This option is
	  automatically enabled when you select CFG_CMD_DATE .

menuconfig BOOTM
	select UIMAGE
	default y if COMMAND_SUPPORT
	bool "bootm support"

config BOOTM_SHOW_TYPE
	bool
	depends on BOOTM
	prompt "show image information"
	help
	  Displays some tags from the uImage:

	  - OS type
	  - architecture,
	  - type
	  - compression method.

config BOOTM_VERBOSE
	bool
	prompt "verbose support"
	depends on BOOTM
	help
	  Adds the verbose (-v switch) command line option.

config BOOTM_INITRD
	bool
	prompt "initial RAM disk (initrd) support"
	depends on BOOTM
	help
	  Adds support for initial RAM disk and this two command line options:

	  -r INITRD  specify an initrd image
	  -L ADDR    specify initrd load address

config BOOTM_OFTREE
	bool
	depends on BOOTM
	select OFTREE
	prompt "device tree (oftree) support"
	help
	  Add support to pass a device tree (a.k.a Open Firmware Tree, oftree). Adds
	  this command line option:

	  -o DTS  specify device tree

config BOOTM_OFTREE_UIMAGE
	bool
	prompt "support passing device tree (oftree) uImages"
	depends on BOOTM_OFTREE
	help
	  Support using oftree uImages. Without this only raw oftree
	  blobs can be used.

config BOOTM_AIMAGE
	bool
	prompt "Android image support"
	depends on BOOTM && ARM
	help
	  Support using Android Images.

config ELF
	bool "ELF Support" if COMPILE_TEST

config BOOTM_ELF
	bool
	depends on BOOTM
	select ELF
	prompt "elf loading support"
	help
	  Add support to load elf file with bootm.

config BOOTM_FITIMAGE
	bool
	prompt "FIT image support"
	select FITIMAGE
	depends on BOOTM && ARM
	help
	  Support using Flattened Image Tree (FIT) images. FIT is an image
	  format introduced by U-Boot. A FIT image contains one or multiple
	  kernels, device trees and initrds. The FIT image itself is a flattened
	  device tree binary. Have a look at the u-boot source tree
	  in the "doc/uImage.FIT" folder for more information:
	  http://git.denx.de/?p=u-boot.git;a=tree;f=doc/uImage.FIT

config BOOTM_FITIMAGE_SIGNATURE
	bool
	prompt "support verifying signed FIT images"
	depends on BOOTM_FITIMAGE
	select FITIMAGE_SIGNATURE
	help
	  Support verifying signed FIT images. This requires FIT images
	  as described in:
	  http://git.denx.de/?p=u-boot.git;a=blob;f=doc/uImage.FIT/signature.txt
	  Additionally the barebox device tree needs a /signature node with the
	  public key with which the image has been signed.

config BOOTM_FITIMAGE_PUBKEY
	string "Path to dtsi containing pubkey"
	default "../fit/pubkey.dtsi"
	depends on BOOTM_FITIMAGE_SIGNATURE
	help
	  Set Path to a dts snippet which holds the public keys for FIT images. The
	  snippet can then be included in a device tree with
	  "#include CONFIG_BOOTM_FITIMAGE_PUBKEY".

config BOOTM_FORCE_SIGNED_IMAGES
	bool
	prompt "Force booting of signed images"
	depends on BOOTM_FITIMAGE_SIGNATURE
	help
	  With this option enabled only signed images can be booted, unsigned images
	  are refused to boot. Effectively this means only FIT images can be booted
	  since they are the only supported image type that support signing.

config BLSPEC
	depends on FLEXIBLE_BOOTARGS
	depends on !SHELL_NONE
	select BOOT
	select BOOTM
	select OFTREE
	bool
	prompt "Support bootloader spec"
	help
	  Enable this to let barebox support the Freedesktop bootloader spec,
	  see: http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/
	  The bootloader spec is a standard interface between the bootloader
	  and the kernel. It allows the bootloader to discover boot options
	  on a device and it allows the Operating System to install / update
	  kernels.

config FLEXIBLE_BOOTARGS
	bool
	prompt "flexible Linux bootargs generation"
	depends on GLOBALVAR
	help
	  Select this to get a more flexible bootargs generation. With this
	  option the bootargs are concatenated together from global variables
	  beginning with 'global.linux.bootargs.' and 'global.linux.mtdparts.'
	  This allows for more flexible scripting since with it it's possible
	  to replace parts of the bootargs string without reconstructing it
	  completely.

config MMCBLKDEV_ROOTARG
	bool
	prompt "Support 'root=mmcblkXpN' cmdline appending"
	depends on FLEXIBLE_BOOTARGS
	depends on MCI
	depends on OFTREE
	help
	  Enable this option to append 'root=mmcblkXpN' to the cmdline instead
	  of 'root=PARTUUID=XYZ'. Don't enable this option if your used linux
	  kernel doesn't contain commit [1]. The first linux kernel release
	  containing that commit is v5.10-rc1.

	  The appending only happen if barebox 'linux.bootargs.bootm.appendroot'
	  variable is set or the used blspec entry contains 'linux-appendroot'.

	  Note: It is crucial that the kernel device tree and the barebox device
	  tree use the same mmc aliases.

	  [1] fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree
	      alias")

config BAREBOX_UPDATE
	bool "In-system barebox update infrastructure"

config SYSTEM_PARTITIONS
	bool "Generic system partitions support"
	depends on GLOBALVAR
	help
	  System partitions are a generic way for boards to specify the
	  partitions that should be exported for flashing.
	  Board drivers that set this directly will select this option
	  automatically.
	  Say y here if this should be configurable over the
	  global.system.partitions device parameter as well.

config IMD
	select CRC32
	bool "barebox metadata support"

choice
	prompt "console support"
	default CONSOLE_FULL

config CONSOLE_FULL
	bool
	prompt "full"
	help
	  This option enables full console support capable of
	  handling multiple consoles. Also the full console support
	  is able to store the output which comes before a console
	  is registered in a circular buffer which will be printed
	  once the first console is registered. Recommended for most
	  usecases.

config CONSOLE_SIMPLE
	bool
	prompt "simple"

config CONSOLE_NONE
	bool
	prompt "none"

endchoice

choice
	prompt "Console activation strategy"
	depends on CONSOLE_FULL
	default CONSOLE_ACTIVATE_FIRST

config CONSOLE_ACTIVATE_FIRST
	bool
	prompt "activate first console on startup"
	help
	  Normally on startup all consoles are disabled, so you won't
	  see anything from barebox starting. Enabling this option
	  enables the first console.

config CONSOLE_ACTIVATE_ALL
	bool
	prompt "activate all consoles on startup"
	help
	  Enabling this options activates all consoles on startup, so
	  you will get output and a prompt on all consoles simultaneously.
	  Only the first registered console will have the full startup
	  log though.

config CONSOLE_ACTIVATE_NONE
	prompt "leave all consoles disabled"
	bool
	help
	  Leave all consoles disabled on startup. Board code or environment
	  is responsible for enabling a console. Otherwise you'll get a working
	  barebox, you just won't see anything.

endchoice

config CONSOLE_ALLOW_COLOR
	prompt "Allow colored console output during boot"
	bool
	help
	  If enabled, colored output is allowed during boot. This is the
	  compile time default for colored console output. After boot it
	  can be controlled using global.allow_color.

config CONSOLE_DISABLE_INPUT
	prompt "Disable input on all consoles by default (non-interactive)"
	def_bool CONSOLE_NONE
	help
	  If enabled, all consoles are initially configured to not accept any input,
	  making the consoles effectively non-interactive.
	  The active device parameter can be used to override this on a per-console
	  basis.
	  CAUTION: this will also disable input devices by default, since they are
	  registered as consoles.

config PBL_CONSOLE
	depends on PBL_IMAGE
	depends on !CONSOLE_NONE
	bool "Enable console support in PBL"
	help
	  This enables printf/pr_* support in the PBL to get more
	  informational output earlier during startup. Note that
	  printf/pr_* need a valid C environment, so the binary
	  must be running at the address it's linked at and bss must
	  be cleared. On ARM that would be after setup_c().

source "common/ratp/Kconfig"

config PARTITION
	bool
	prompt "Enable Partitions"

source "common/partitions/Kconfig"

config ENV_HANDLING
	select CRC32
	bool "Support environment files storage"
	default y if !SHELL_NONE
	help
	  Enabling this option will give you environment files which can be stored
	  over reboots. The "saveenv" command will store all files under /env/ to
	  the persistent environment, the "loadenv" command (also executed during
	  startup) will bring them back. If unsure, say yes.

config DEFAULT_ENVIRONMENT
	select CRC32
	bool
	default y if ENV_HANDLING
	prompt "Compile in default environment"
	help
	  Enabling this option will give you a default environment when
	  the environment found in the environment sector is invalid or when
	  CONFIG_ENV_HANDLING is not enabled.

choice
	prompt "default compression for in-barebox binaries"
	default DEFAULT_COMPRESSION_NONE if PBL_IMAGE
	default DEFAULT_COMPRESSION_LZO if LZO_DECOMPRESS
	default DEFAULT_COMPRESSION_XZ if XZ_DECOMPRESS
	default DEFAULT_COMPRESSION_GZIP if ZLIB
	default DEFAULT_COMPRESSION_LZ4 if LZ4_DECOMPRESS
	default DEFAULT_COMPRESSION_BZIP2 if BZLIB
	help
	  Select the default compression for in-barebox binary files. Files
	  compiled into barebox like for example the default environment will
	  be compressed with this compression type.

config DEFAULT_COMPRESSION_GZIP
	bool "gzip"
	depends on ZLIB

config DEFAULT_COMPRESSION_BZIP2
	bool "bzip2"
	depends on BZLIB

config DEFAULT_COMPRESSION_LZO
	bool "lzo"
	depends on LZO_DECOMPRESS

config DEFAULT_COMPRESSION_LZ4
	bool "lz4"
	depends on LZ4_DECOMPRESS

config DEFAULT_COMPRESSION_XZ
	bool "xz"
	depends on XZ_DECOMPRESS

config DEFAULT_COMPRESSION_NONE
	bool "no compression"

endchoice

config DEFAULT_ENVIRONMENT_GENERIC_NEW
	bool "Generic environment template"
	depends on DEFAULT_ENVIRONMENT
	depends on SHELL_HUSH
	select BOOTM
	select COMMAND_SUPPORT
	select CMD_GETOPT
	select GLOB
	select GLOB_SORT
	select GLOBALVAR
	select CMD_GLOBAL
	select CMD_AUTOMOUNT
	select CMD_BASENAME
	select CMD_READLINK
	select CMD_DIRNAME
	select CMD_TEST
	select NVVAR
	select CMD_NV
	select FLEXIBLE_BOOTARGS
	select CMD_BOOT
	select NET_CMD_IFUP if NET
	select CMD_IP_ROUTE_GET if NET
	select CMD_HOST if NET
	help
	  With this option barebox will use the files found under
	  defaultenv/defaultenv-2-base/ in the source tree as a template for
	  the defaultenv. The directories specified in DEFAULT_ENVIRONMENT_PATH
	  will be added to the default environment. If a file is present in
	  both locations, the file from DEFAULT_ENVIRONMENT_PATH will overwrite
	  that from the template.

config DEFAULT_ENVIRONMENT_GENERIC
	bool "Generic environment template (old version)"
	depends on DEFAULT_ENVIRONMENT
	depends on !DEFAULT_ENVIRONMENT_GENERIC_NEW
	depends on SHELL_HUSH
	select COMMAND_SUPPORT
	select GLOBALVAR
	select CMD_GETOPT
	select CMD_CRC
	select CMD_CRC_CMP
	select CMD_GLOBAL
	help
	  Note: this option is not recommended for new boards; use
	  DEFAULT_ENVIRONMENT_GENERIC_NEW instead.

	  With this option barebox will use the old generic default environment
	  found under defaultenv/defaultenv-1/ in the source tree.
	  The directory given with DEFAULT_ENVIRONMENT_PATH
	  will be added to the default environment. This should
	  at least contain a /env/config file.
	  This will be able to overwrite the files from defaultenv.

config DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU
	bool
	depends on DEFAULT_ENVIRONMENT_GENERIC_NEW
	depends on CMD_MENUTREE
	default y
	help
	  Extend the defaultenv template with a menu that is displayed at boot.
	  The menu files are taken from defaultenv/defaultenv-2-menu/.

config DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU
	bool
	depends on DEFAULT_ENVIRONMENT_GENERIC_NEW
	depends on USB_GADGET_DFU
	default y
	help
	  Extend the defaultenv template with the 'dfu' boot entry, which
	  allows uploading the kernel and oftree over USB via the dfu protocol.

config DEFAULT_ENVIRONMENT_GENERIC_NEW_REBOOT_MODE
	bool "Generic reboot-mode handlers in the environment"
	depends on DEFAULT_ENVIRONMENT_GENERIC_NEW
	depends on REBOOT_MODE

config DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG
	bool "Ship .config as /env/data/config"
	depends on DEFAULT_ENVIRONMENT_GENERIC_NEW
	help
	  This option embeds the used barebox Kconfig .config file into the
	  environment as /env/data/config. This will increase barebox' image
	  size. If unsure, say n here.

config DEFAULT_ENVIRONMENT_PATH
	string
	depends on DEFAULT_ENVIRONMENT
	prompt "Default environment path"
	help
	  Space separated list of paths from which the default environment will
	  be taken. Relative paths will be relative to the barebox top-level
	  directory, but absolute paths are fine as well.

config HAS_SCHED
	bool

config POLLER
	bool "generic polling infrastructure"
	select HAS_SCHED

config BTHREAD
	bool "barebox co-operative (green) thread infrastructure"
	select HAS_SCHED
	depends on HAS_ARCH_SJLJ
	help
	  barebox threads are lightweight cooperative (green) threads that are
	  scheduled within delay loops and the console idle to asynchronously
	  execute actions, like checking for link up or feeding a watchdog.

config STATE
	bool "generic state infrastructure"
	select CRC32
	select ENVIRONMENT_VARIABLES
	select OFTREE
	select PARAMETER

config STATE_CRYPTO
	bool "HMAC based authentication support"
	depends on STATE
	select CRYPTO_KEYSTORE
	select DIGEST
	select DIGEST_HMAC_GENERIC
	help
	  This option enables HMAC based authentication support for
	  the state's header and data. This means the state framework
	  can verify both the data integrity and the authentication of
	  the state's header and data.

	  Don't forget to select a hash algorithm in the
	  crypto/digests menu.

	  See Documentation/devicetree/bindings/barebox/barebox,state.rst
	  for more information.

config STATE_BACKWARD_COMPATIBLE
	bool "backward compatible 'direct' storage backend"
	depends on STATE
	help
	  With this option enabled, the 'direct' storage backend keeps backward
	  compatibility with the state framework of barebox <= v2016.08.0. Newer
	  revisions expect an additional 'meta header' and fail otherwise.

config BOOTCHOOSER
	bool "bootchooser infrastructure"
	select BOOT
	select BOOTM
	select ENVIRONMENT_VARIABLES
	select OFTREE
	select PARAMETER

config RESET_SOURCE
	bool "detect Reset cause"
	depends on GLOBALVAR
	help
	  Provide a global variable at runtime which reflects the possible cause
	  of the reset and why the bootloader is currently running. It can be
	  useful for any kind of system recovery or repair.

config MACHINE_ID
	bool "compute unique machine-id"
	depends on FLEXIBLE_BOOTARGS
	depends on HAVE_DIGEST_SHA1
	help
	  Compute a persistent machine-specific id and store it to $global.machine_id.
	  The id is a hash of device-specific information added via
	  machine_id_set_hashable(). If multiple sources are available, the
	  information provided by the last call prior to the late initcall
	  set_machine_id() is used to generate the machine id from. Thus when
	  updating barebox the machine id might change.

	  global.bootm.provide_machine_id may be used to automatically set
	  the linux.bootargs.machine_id global variable with a value of
	  systemd.machine_id=${global.machine_id}

	  Note: if no hashable information is available no machine id will be passed
	  to the kernel.

config SYSTEMD_OF_WATCHDOG
	bool "inform devicetree-enabled kernel of used watchdog"
	depends on WATCHDOG && OFTREE && FLEXIBLE_BOOTARGS
	help
	  Sets the linux.bootargs.dyn.watchdog global variable with a value of
	  systemd.watchdog-device=/dev/WDOG if barebox succeeded in enabling
	  the watchdog WDOG prior to boot. WDOG is the alias of the watchdog
	  in the kernel device tree. If the kernel is booted without a device
	  tree or with one that lacks aliases, nothing is added.

config EXTERNAL_DTS_FRAGMENTS
	string "external dts file fragments"
	depends on OFTREE
	help
	  List of dts fragment files that will be appended to Barebox's device
	  tree(s) source when building the dtb file(s).  If multiple files are
	  listed, they will be appended in order.  Relative filenames will use
	  the dtc include search path.

	  A preprocessor macro based on the name of the main dts will be
	  defined, which allows the dts fragments to be based on which image of
	  a multi image build they are being used in. Given the dts filename
	  used for a board is "foo-board.dts" the external dts usage can be
	  limited to that board with

	  #ifdef foo_board_dts
	  ...
	  #endif

	  It is not intended that this is put into Barebox' defconfig files.
	  Instead, it's an external build system's job, like Yocto or buildroot,
	  to add dts fragments from outside the Barebox source tree into the
	  Barebox build.

menu "OP-TEE loading"

config OPTEE_SIZE
	hex
	default 0x02000000
	prompt "OP-TEE Memory Size"
	depends on BOOTM_OPTEE || PBL_OPTEE
	help
	  Size to reserve in main memory for OP-TEE.
	  Can be smaller than the actual size used by OP-TEE, this is used to prevent
	  barebox from allocating memory in this area.

config BOOTM_OPTEE
	bool
	prompt "support booting OP-TEE"
	depends on BOOTM && ARM
	help
	  OP-TEE is a trusted execution environment (TEE). With this option
	  enabled barebox supports starting optee_os as part of the bootm command.
	  Instead of the kernel bootm starts the optee_os binary which then starts
	  the kernel in nonsecure mode. Pass the optee_os binary with the -t option
	  or in the global.bootm.tee variable.

config PBL_OPTEE
	bool "Enable OP-TEE early start"
	depends on ARM
	depends on !THUMB2_BAREBOX
	help
	  Allows starting OP-TEE during lowlevel initialization of the PBL.
	  Requires explicit support in the board's lowlevel file.

endmenu

if FASTBOOT_BASE

menu "Android Fastboot"

config FASTBOOT_SPARSE
	bool
	select IMAGE_SPARSE
	prompt "Enable Fastboot sparse image support"
	help
	  Sparse images are a way for the fastboot protocol to write
	  images that are bigger than the available memory. If unsure,
	  say yes here.

config FASTBOOT_CMD_OEM
	bool
	prompt "Enable OEM commands"
	help
	  This option enables the fastboot "oem" group of commands. They allow to
	  executing arbitrary barebox commands and may be disabled in secure
	  environments.

endmenu

endif

endmenu

menu "Debugging"

config COMPILE_LOGLEVEL
	int "compile loglevel"
	default 6
	help
	  This defines the maximum loglevel compiled into the binary. Less important
	  messages will be compiled away resulting in a smaller binary.

	  0    system is unusable (emerg)
	  1    action must be taken immediately (alert)
	  2    critical conditions (crit)
	  3    error conditions (err)
	  4    warning conditions (warn)
	  5    normal but significant condition (notice)
	  6    informational (info)
	  7    debug-level messages (debug)
	  8    verbose debug messages (vdebug)

config DEFAULT_LOGLEVEL
	int "default loglevel"
	default 7
	help
	  This defines the default runtime loglevel. It can be changed using the
	  global.loglevel variable. Available logelevels are:

	  0    system is unusable (emerg)
	  1    action must be taken immediately (alert)
	  2    critical conditions (crit)
	  3    error conditions (err)
	  4    warning conditions (warn)
	  5    normal but significant condition (notice)
	  6    informational (info)
	  7    debug-level messages (debug)
	  8    verbose debug messages (vdebug)

config DEBUG_LL
	bool
	depends on HAS_DEBUG_LL
	prompt "Low level debug messages (read help)"
	help
	  Enable this to get low level debug messages during barebox
	  initialization. This is helpful if you are debugging code that
	  executes before the console is initialized.

	  This requires SoC specific support. Most SoCs require the
	  debug UART to be initialized by a debugger or first stage
	  bootloader.

	  Note that selecting this option will limit barebox to a single
	  UART definition, as specified below under "low-level debugging
	  port". Attempting to boot the resulting image on a different
	  platform *will not work*, so this option should not be enabled
	  for builds that are intended to be portable.

config ARCH_WANT_FRAME_POINTERS
	bool

config FRAME_POINTER
	bool "Compile barebox with frame pointers" if COMPILE_TEST
	default y if ARCH_WANT_FRAME_POINTERS
	help
	  Selected by platforms that expect frame pointer usage, e.g.
	  when stack unwinding is enabled. The resulting barebox image
	  will be slightly larger and slower, but it can give precise
	  debugging information when print stack traces.

choice
	prompt "Kernel low-level debugging port"
	depends on DEBUG_LL

config DEBUG_IMX1_UART
	bool "i.MX1 Debug UART"
	depends on ARCH_IMX1
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX1.

config DEBUG_IMX21_UART
	bool "i.MX21 Debug UART"
	depends on ARCH_IMX21
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX21.

config DEBUG_IMX25_UART
	bool "i.MX25 Debug UART"
	depends on ARCH_IMX25
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX25.

config DEBUG_IMX27_UART
	bool "i.MX27 Debug UART"
	depends on ARCH_IMX27
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX27.

config DEBUG_IMX31_UART
	bool "i.MX31 Debug UART"
	depends on ARCH_IMX31
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX31.

config DEBUG_IMX35_UART
	bool "i.MX35 Debug UART"
	depends on ARCH_IMX35
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX35.

config DEBUG_IMX50_UART
	bool "i.MX50 Debug UART"
	depends on ARCH_IMX50
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX50.

config DEBUG_IMX51_UART
	bool "i.MX51 Debug UART"
	depends on ARCH_IMX51
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX51.

config DEBUG_IMX53_UART
	bool "i.MX53 Debug UART"
	depends on ARCH_IMX53
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX53.

config DEBUG_IMX6Q_UART
	bool "i.MX6Q Debug UART"
	depends on ARCH_IMX6
	help
	  Say Y here if you want kernel low-level debugging support
	  on i.MX6Q.

config DEBUG_IMX7D_UART
	bool "i.MX7D Debug UART"
	depends on ARCH_IMX7
	help
	  Say Y here if you want barebox low-level debugging support
	  on i.MX7D.

config DEBUG_IMX8M_UART
	bool "i.MX8M Debug UART"
	depends on ARCH_IMX8M
	help
	  Say Y here if you want barebox low-level debugging support
	  on i.MX8M*.

config DEBUG_VF610_UART
	bool "VF610 Debug UART"
	depends on ARCH_VF610
	help
	  Say Y here if you want kernel low-level debugging support
	  on VF610.

config DEBUG_OMAP3_UART
	bool "OMAP3 Debug UART"
	depends on ARCH_OMAP3
	help
	  Say Y here if you want kernel low-level debugging support
	  on OMAP3.

config DEBUG_OMAP4_UART
	bool "OMAP4 Debug UART"
	depends on ARCH_OMAP4
	help
	  Say Y here if you want kernel low-level debugging support
	  on OMAP4.

config DEBUG_AM33XX_UART
	bool "AM33XX Debug UART"
	depends on ARCH_AM33XX
	help
	  Say Y here if you want kernel low-level debugging support
	  on AM33XX.

config DEBUG_ROCKCHIP_RK3188_UART
	bool "RK3188 Debug UART"
	depends on ARCH_RK3188
	help
	  Say Y here if you want kernel low-level debugging support
	  on RK3188.

config DEBUG_ROCKCHIP_RK3288_UART
	bool "RK3288 Debug UART"
	depends on ARCH_RK3288
	help
	  Say Y here if you want kernel low-level debugging support
	  on RK3288.

config DEBUG_ROCKCHIP_RK3568_UART
	bool "RK3568 Debug UART"
	depends on ARCH_RK3568
	help
	  Say Y here if you want kernel low-level debugging support
	  on RK3568.

config DEBUG_ROCKCHIP_RK3399_UART
	bool "RK3399 Debug UART"
	depends on ARCH_RK3399
	help
	  Say Y here if you want kernel low-level debugging support
	  on RK3399.

config DEBUG_SOCFPGA_UART0
	bool "Use SOCFPGA UART0 for low-level debug"
	depends on ARCH_SOCFPGA
	help
	  Say Y here if you want kernel low-level debugging support
	  on SOCFPGA(Cyclone 5 and Arria 5) based platforms.

config DEBUG_SOCFPGA_UART1
	bool "Use SOCFPGA UART1 for low-level debug"
	depends on ARCH_SOCFPGA
	help
	  Say Y here if you want kernel low-level debugging support
	  on SOCFPGA(Arria 10) based platforms.

config DEBUG_RPI1_UART
	bool "RaspberryPi 1 PL011 UART"
	depends on ARCH_BCM283X
	help
	  Say Y here if you want low-level debugging support on
	  RaspberryPi 1 boards.

config DEBUG_AT91_UART
	bool "AT91 Debug UART"
	depends on ARCH_AT91
	help
	  Say Y here if you want barebox low-level debugging support
	  on AT91 based platforms.

config DEBUG_RPI2_3_UART
	bool "RaspberryPi 2/3 PL011 UART"
	depends on ARCH_BCM283X
	help
	  Say Y here if you want low-level debugging support on
	  RaspberryPi 2 and 3 boards.

config DEBUG_RPI3_MINI_UART
	bool "RaspberryPi 3 mini UART"
	depends on ARCH_BCM283X
	help
	  Say Y here if you want low-level debugging support on
	  RaspberryPi 3 board mini UART.

config DEBUG_ERIZO
	bool "Erizo ns16550 port"
	depends on SOC_ERIZO
	select DEBUG_LL_NS16550

config DEBUG_STARFIVE
	bool "Starfive ns16550 serial0 port"
	depends on SOC_STARFIVE
	select DEBUG_LL_NS16550

config DEBUG_RISCV_VIRT
	bool "RISC-V Virt ns16550 port"
	depends on SOC_VIRT
	select DEBUG_LL_NS16550

config DEBUG_RISCVEMU_HTIF
	bool "riscvemu HTIF port"
	depends on SOC_VIRT
	help
	  When run without graphics support, tinyemu will expose access
	  to the Virt I/O console as HTIF blocking console device as well.
	  This is useful for low level debugging before Virt I/O DMA is
	  initialized.

config DEBUG_SIFIVE
	bool "SiFive serial0 port"
	depends on SOC_SIFIVE

config DEBUG_LITEX
	bool "LiteX serial port"
	depends on SOC_LITEX

endchoice

config DEBUG_LL_NS16550
	bool
	help
	  Selected by RISC-V platforms that use ns16550 for debug_ll

config DEBUG_IMX_UART_PORT
	int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \
						DEBUG_IMX21_UART || \
						DEBUG_IMX25_UART || \
						DEBUG_IMX27_UART || \
						DEBUG_IMX31_UART || \
						DEBUG_IMX35_UART || \
						DEBUG_IMX51_UART || \
						DEBUG_IMX53_UART || \
						DEBUG_IMX6Q_UART || \
						DEBUG_IMX7D_UART || \
						DEBUG_IMX8M_UART || \
						DEBUG_VF610_UART
	default 1
	depends on ARCH_IMX
	help
	  Choose UART port on which kernel low-level debug messages
	  should be output.

config DEBUG_OMAP_UART_PORT
	int "OMAP Debug UART Port Selection" if DEBUG_OMAP3_UART || \
						DEBUG_OMAP4_UART || \
						DEBUG_AM33XX_UART
	default 1
	depends on ARCH_OMAP
	help
	  Choose UART port on which kernel low-level debug messages
	  should be output. Possible values are:
	  OMAP3: 1 - 3
	  OMAP4: 1 - 3
	  AM33XX: 0 - 2

config DEBUG_ROCKCHIP_UART_PORT
	int "RK3xxx UART debug port" if DEBUG_ROCKCHIP_RK3188_UART || \
				DEBUG_ROCKCHIP_RK3288_UART || \
				DEBUG_ROCKCHIP_RK3568_UART || \
				DEBUG_ROCKCHIP_RK3399_UART
	default 2
	depends on ARCH_ROCKCHIP
	help
	  Choose UART port on which kernel low-level debug messages
	  should be output.

config DEBUG_SOCFPGA_UART_PHYS_ADDR
	hex "Physical base address of debug UART" if DEBUG_LL
	default 0xffc02000 if DEBUG_SOCFPGA_UART0
	default 0xffc02100 if DEBUG_SOCFPGA_UART1
	depends on ARCH_SOCFPGA

config DEBUG_SOCFPGA_UART_CLOCK
	int "SoCFPGA UART debug clock" if DEBUG_LL
	default 100000000 if ARCH_SOCFPGA_CYCLONE5
	default  50000000 if ARCH_SOCFPGA_ARRIA10
	depends on ARCH_SOCFPGA
	help
	  Choose UART root clock.


config DEBUG_LAYERSCAPE_UART_PORT
	int "Layerscape UART port selection"
	depends on ARCH_LAYERSCAPE
	default 1
	help
	  Select the UART port number used for early debugging here. Port
	  numbers start counting from 1.

config DEBUG_AT91_UART_BASE
	hex "AT91 Debug UART Port Selection" if DEBUG_AT91_UART
	default 0xfffff200 if SOC_AT91RM9200  || SOC_AT91SAM9260 \
	                   || SOC_AT91SAM9261 || SOC_AT91SAM9X5  \
			   || SOC_AT91SAM9N12
	default 0xffffee00 if SOC_AT91SAM9263 || SOC_AT91SAM9G45 || SOC_SAMA5D3
	default 0xfc069000 if SOC_SAMA5D4
	default 0xf8020000 if SOC_SAMA5D2
	default 0xfffff200
	depends on ARCH_AT91
	help
	  Specify UART port base address on which barebox low-level
	  debug messages should be output.

config DEBUG_INITCALLS
	bool "Trace initcalls"
	help
	  If enabled this will print initcall traces.

config DEBUG_PROBES
	bool "Trace driver probes/removes"
	help
	  If enabled this will log driver probe and remove traces. If DEBUG_LL is enabled,
	  probes will be printed even before registering consoles. If it's disabled, they
	  will be collected in the log and written out once a console is active.

	  Removes are written to the log and will be printed as long as consoles exist.
	  Most consoles do not implement a remove callback to remain operable until
	  the very end. Consoles using DMA, however, must be removed.

config PBL_BREAK
	bool "Execute software break on pbl start"
	depends on ARM && (!CPU_32v4T && !ARCH_TEGRA)
	help
	  If enabled, barebox will be compiled with BKPT instruction
	  on early pbl init. This option should be used only with JTAG debugger!

config PRINTF_FULL
	bool "Support all extended printf format specifiers"
	help
	  Adds support for lesser used format specifiers like UUIDs and
	  hex strings. Code requiring them should select it directly,
	  so this is mainly for debugging. If unsure, say no.

source "lib/Kconfig.ubsan"
source "lib/kasan/Kconfig"

config ASAN
	bool "ASAN: runtime memory debugger"
	depends on HAVE_ARCH_ASAN
	help
	  Enables ASAN (AddressSANitizer) - runtime memory debugger,
	  designed to find out-of-bounds accesses and use-after-free bugs.

config COMPILE_TEST
	bool "compile-test drivers of other platforms"
	default n
	help
	  Some drivers can be compiled on a different platform than they are
	  intended to be run on. Despite they cannot be used there due to
	  missing HW support, developers still, opposing to users, might want
	  to build such drivers to compile-test them.

	  If you are a developer and want to build as much as currently possible,
	  say Y here. If you are a user, say N here to avoid being prompted for
	  inclusion of unrelated drivers.

endmenu

source "common/efi/Kconfig"

config HAS_DEBUG_LL
	bool

config HAS_ASM_DEBUG_LL
	bool
	select HAS_DEBUG_LL

config DDR_SPD
	bool
	select CRC_ITU_T

config HAVE_ARCH_ASAN
	bool