-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathKconfig
667 lines (560 loc) · 16.8 KB
/
Kconfig
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
#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.
#
mainmenu "CViTek MediaSDK Configuration"
config CUSTOMER
string "Customer define"
default "generic"
help
Customer define.
source "output/Kconfig"
config ARCH
string "Arch define"
default "arm64"
help
Arch define.
menu "Compile-time checks and compiler options"
config CROSS_COMPILE
string "Cross-compiler tool prefix for fip/uboot"
default "aarch64-linux-gnu-"
help
Same as running 'make CROSS_COMPILE=prefix-' but stored for
default make runs in this application build directory. You don't
need to set this unless you want the configured application build
directory to select the cross-compiler automatically.
config CROSS_COMPILE_KERNEL
string "Cross-compiler tool prefix for kernel"
default "aarch64-linux-gnu-" if TOOLCHAIN_GLIBC_ARM64
default "arm-linux-gnueabihf-" if TOOLCHAIN_GLIBC_ARM
default "riscv64-unknown-linux-gnu-" if TOOLCHAIN_GLIBC_RISCV64
default "riscv64-unknown-linux-musl-" if TOOLCHAIN_MUSL_RISCV64
help
Cross compile toolchain prefix for linux kernel.
You don't need to set this unless you want the configured kernel build
directory.
choice
prompt "Compiler optimization level"
default CC_OPTIMIZE_FOR_PERFORMANCE
config CC_OPTIMIZE_FOR_PERFORMANCE
bool "Optimize for performance"
help
This is the default optimization level for the kernel, building
with the "-O2" compiler flag for best performance and most
helpful compile-time warnings.
config CC_OPTIMIZE_FOR_SIZE
bool "Optimize for size"
help
Enabling this option will pass "-Os" instead of "-O2" to
your compiler resulting in a smaller kernel.
If unsure, say N.
endchoice
config KERNEL_ENTRY_HACK
bool "Set kernel entry in boot image"
default n
help
Set kernel entry in boot image.
Don't select this if you don't know what you are doning.
config KERNEL_ENTRY_HACK_ADDR
string "Set kernel entry in boot image"
depends on KERNEL_ENTRY_HACK
help
Set kernel entry in boot image.
Don't select this if you don't know what you are doning.
config DEBUG_INFO
bool "Compile the application with debug info"
help
If you say Y here the resulting application binary will include
debugging info resulting in a larger application binary.
This adds debug symbols to the application (gcc -g), and
is needed if you want to debug your application with gdb.
Say Y here only if you plan to debug the application.
If unsure, say N.
config DEBUG_INFO_REDUCED
bool "Reduce debugging information"
depends on DEBUG_INFO
help
If you say Y here gcc is instructed to generate less debugging
information for structure types. This means that tools that
need full debugging information (like gdb or systemtap) won't
be happy. But if you merely need debugging information to
resolve line numbers there is no loss. Advantage is that
build directory object sizes shrink dramatically over a full
DEBUG_INFO build and compile times are reduced too.
Only works with newer gcc versions.
config DEBUG_INFO_SPLIT
bool "Produce split debuginfo in .dwo files"
depends on DEBUG_INFO
help
Generate debug info into separate .dwo files. This significantly
reduces the build directory size for builds with DEBUG_INFO,
because it stores the information only once on disk in .dwo
files instead of multiple times in object files and executables.
In addition the debug information is also compressed.
Requires recent gcc (4.7+) and recent gdb/binutils.
Any tool that packages or reads debug information would need
to know about the .dwo files and include them.
Incompatible with older versions of ccache.
config DEBUG_INFO_DWARF4
bool "Generate dwarf4 debuginfo"
depends on DEBUG_INFO
help
Generate dwarf4 debug info. This requires recent versions
of gcc and gdb. It makes the debug information larger.
But it significantly improves the success of resolving
variables in gdb on optimized code.
config USE_CCACHE
bool "Use ccache to acceralate build time"
help
Use ccache to acceralate build time
config MTRACE
bool "mtrace test"
default n
help
mtrace test enable
endmenu
menu "SDK options"
choice
prompt "C library"
default TOOLCHAIN_GLIBC_ARM64
config TOOLCHAIN_GLIBC_ARM64
bool "glibc library for user mode application on arm64"
help
glibc library for arm64(AARCH64).
config TOOLCHAIN_GLIBC_ARM
bool "glibc library for user mode application on arm"
help
glibc library for arm(AARCH32).
config TOOLCHAIN_UCLIBC_ARM
bool "uclibc library for user mode application on arm"
help
uclibc library for arm(AARCH32).
config TOOLCHAIN_GLIBC_RISCV64
bool "glibc library for user mode application on riscv64"
help
glibc library for riscv64(RISCV64).
config TOOLCHAIN_MUSL_RISCV64
bool "musl library for user mode application on riscv64"
help
musl library for riscv64(RISCV64).
select on compiler option through menuconfig
default value is false.
endchoice
config CROSS_COMPILE_SDK
string
default "aarch64-linux-gnu-" if TOOLCHAIN_GLIBC_ARM64
default "arm-linux-gnueabihf-" if TOOLCHAIN_GLIBC_ARM
default "arm-cvitek-linux-uclibcgnueabihf-" if TOOLCHAIN_UCLIBC_ARM
default "riscv64-unknown-linux-gnu-" if TOOLCHAIN_GLIBC_RISCV64
default "riscv64-unknown-linux-musl-" if TOOLCHAIN_MUSL_RISCV64
help
Cross compile toolchain prefix for middleware.
This will modify by TOOLCHAN_XLIBC
config SDK_VER
string
default "64bit" if TOOLCHAIN_GLIBC_ARM64
default "32bit" if TOOLCHAIN_GLIBC_ARM
default "uclibc" if TOOLCHAIN_UCLIBC_ARM
default "glibc_riscv64" if TOOLCHAIN_GLIBC_RISCV64
default "musl_riscv64" if TOOLCHAIN_MUSL_RISCV64
help
Set sdk version.
config STATIC
bool "Build static binary (no shared libs)"
default n
help
If you want to build a static binary, which does not use
or require any shared libraries, enable this option.
Static binaries are larger, but do not require functioning
dynamic libraries to be present, which is important if used
as a system rescue tool.
config BUILD_FOR_DEBUG
bool "Build SDK with debug config"
default y
help
This configuration is only valid for uboot and kernel.
If you want to build SDK for release,please set BUILD_FOR_DEBUG=n.
"y":build kernel with DEBUG config(such as CONFIG_DEBUG_FS,CONFIG_DEBUG_INFO)
build uboot with commands(such as 'ping','echo','tftp').
"n":build kernel with release config(disable CONFIG_DEBUG_FS and so on)
build uboot without commands.
menuconfig BUILD_FOR_FASTBOOT
bool "Build SDK with fastboot mode"
depends on !BUILD_FOR_DEBUG
default n
if BUILD_FOR_FASTBOOT
config FSBL_FASTBOOT
bool "optimization fsbl boottime"
default y
config OPENSBI_FASTBOOT
bool "optimization opensbi boottime"
default y
config UBOOT_FASTBOOT
bool "optimization uboot boottime"
default y
select UBOOT_SPL_CUSTOM
config KERNEL_FASTBOOT
bool
default y
endif # BUILD_FOR_FASTBOOT
config ENABLE_SDK_ASAN
bool "Enable SDK sanitizer"
default n
help
Enabling this option will add extra flag -fsanitize=address to
sdk which can help to debug.
If unsure, say N.
config DISABLE_PQBIN_JSON
bool "Disable PQbin json"
default n
help
Make pqbin not include json param
config FLASH_SIZE_SHRINK
bool "Do not install sample and self test application"
default n
config CP_EXT_WIRELESS
bool "Install the osdrv/extdrv/wireless/*.ko"
depends on FLASH_SIZE_SHRINK
default n
help
Install the osdrv/extdrv/wireless/*.ko no matter
FLASH_SIZE_SHRINK is set or not.
config NO_FB
bool "Do not compile frame buffer drivers"
depends on FLASH_SIZE_SHRINK
default n
config NO_TP
bool "Select CONFIG_NO_TP to build osdrv without Touchscreen driver(extdrv/tp)"
depends on FLASH_SIZE_SHRINK
default n
help
TP: Touchscreen driver(extdrv/tp)
Do not compile Touchscreen driver(extdrv/tp) if CONFIG_NO_TP is selected.
"n": build osdrv with extdrv/tp driver.
"y": build osdrv without extdrv/tp driver.
config USB_OSDRV_CVITEK_GADGET
bool "Select CONFIG_USB_OSDRV_CVITEK_GADGET to build osdrv with usb gadget cvg"
default n
help
Say 'Y' or 'M' here to enable device controller functionality
of the Cvitek driver.
"y": build osdrv with interdrv/v2/usb driver.
"n": build osdrv without interdrv/v2/usb driver.
config BOOT_IMAGE_SINGLE_DTB
bool "Make the boot image only have one dtb"
default n
config DDR_64MB_SIZE
bool "Compile 64MB DDR size project"
default n
config AB_SYSTEM
bool "Enable ab system"
depends on !UBOOT_SPL_CUSTOM
default n
help
Enable A/B boot function.(Currently, spl boot is not supported.)
The BOOT and ROOTFS partitions are backed up to ensure that the
system can be automatically switched to the inactive partition
for boot if the related upgrade fails.
For details, see Android A/B system Description.
endmenu
menu "FIP setting"
config FSBL_SECURE_BOOT_SUPPORT
bool "Add secure boot support to FSBL"
default n
help
"y" only build FSBL with authentication and decryption function.
Still need to program eFuse to enable authentication or decryption.
choice
prompt "Select Encryption Key of ATF"
config ATF_KEY_SEL_default
bool "default"
config ATF_KEY_SEL_clear
bool "clear"
config ATF_KEY_SEL_key1
bool "key1"
config ATF_KEY_SEL_key0
bool "key0"
endchoice
config ATF_KEY_SEL
string
default "default" if ATF_KEY_SEL_default
default "clear" if ATF_KEY_SEL_clear
default "key1" if ATF_KEY_SEL_key1
default "key0" if ATF_KEY_SEL_key0
config ATF_SRC
bool "Select to build fip_pre.bin from ATF/BLD source"
default n
help
"y" Select to build fip_pre.bin from ATF/BLD source
config MULTI_FIP
bool "Enable multi FIP binary support"
default n
help
"y" Enable multi FIP binary support
config FIP_V1
def_bool y
depends on CHIP_ARCH_cv183x || CHIP_ARCH_cv182x
config FIP_V2
def_bool y
depends on CHIP_ARCH_cv181x || CHIP_ARCH_cv180x
config OD_CLK_SEL
bool "Select to build fip.bin with OD(overdrive) clock setting"
depends on CHIP_ARCH_cv181x || CHIP_ARCH_cv180x
default n
help
"y" Select to build fip.bin with OD(overdrive) clock setting
config VC_CLK_OVERDRIVE
bool "Select to build fip.bin with VC clock overdrived setting"
depends on !OD_CLK_SEL
default n
help
"y" Select to build fip.bin with VC clock overdrived setting
endmenu
menu "Storage settings"
choice
prompt "Select storage type"
config STORAGE_TYPE_none
bool "none"
config STORAGE_TYPE_emmc
bool "emmc"
select TARGET_PACKAGE_E2FSPROGS
config STORAGE_TYPE_spinand
bool "spinand"
select TARGET_PACKAGE_MTD-UTILS
config STORAGE_TYPE_spinor
bool "spinor"
config STORAGE_TYPE_sd
bool "sd"
endchoice
config STORAGE_TYPE
string
default "" if STORAGE_TYPE_none
default "emmc" if STORAGE_TYPE_emmc
default "spinand" if STORAGE_TYPE_spinand
default "spinor" if STORAGE_TYPE_spinor
default "sd" if STORAGE_TYPE_sd
config NANDFLASH_BLOCKSIZE
int "Nand flash block size"
default 131072
help
The block size of nand flash
config NANDFLASH_PAGESIZE
int "Nand flash page size"
default 2048
help
The page size of nand flash
endmenu
source "output/Kconfig.sensors"
source "output/Kconfig.panels"
menu "uboot options"
config USE_DEFAULT_ENV
bool "use defaule environment setting"
default y
help
use defaule environment setting, if you want to set environment
please disable this option.
choice
prompt "U-Boot source selection"
default UBOOT_2017_07
config UBOOT_2017_07
bool "u-boot-2017.07"
config UBOOT_2021_10
bool "u-boot-2021.10"
endchoice
config UBOOT_SRC
string
default "u-boot" if UBOOT_2017_07
default "u-boot-2021.10" if UBOOT_2021_10
config UBOOT_SPL_CUSTOM
bool "Generate the fip_spl.bin contain u-boot-spl"
default n
depends on UBOOT_2021_10
help
Set fip_spl.bin contain u-boot-spl or u-boot.
endmenu
menu "Kernel options"
choice
prompt "Kernel source selection"
config KERNEL_SRC_4_19
bool "linux 4.19.164"
config KERNEL_SRC_4_9
bool "linux 4.9.38"
config KERNEL_SRC_5.10
bool "linux 5.10"
endchoice
config KERNEL_SRC
string
default "linux-linaro-stable" if KERNEL_SRC_4_9
default "linux" if KERNEL_SRC_4_19
default "linux_5.10" if KERNEL_SRC_5.10
help
Set kernel source code.
choice
prompt "Kernel Image compress algorithm"
default KERNEL_GZIP
config KERNEL_GZIP
bool "Gzip"
help
The old and tried gzip compression. It provides a good balance
between compression ratio and decompression speed.
config KERNEL_LZMA
bool "LZMA"
help
This compression algorithm's ratio is best. Decompression speed
is between gzip and bzip2. Compression is slowest.
The kernel size is about 33% smaller with LZMA in comparison to gzip.
config KERNEL_LZ4
bool "LZ4"
help
LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding.
A preliminary version of LZ4 de/compression tool is available at
<https://code.google.com/p/lz4/>.
Its compression ratio is worse than LZO. The size of the kernel
is about 8% bigger than LZO. But the decompression speed is
faster than LZO.
config KERNEL_UNCOMPRESSED
bool "None"
help
Produce uncompressed kernel image. This option is usually not what
you want. It is useful for debugging the kernel in slow simulation
environments, where decompressing and moving the kernel is awfully
slow. This option allows early boot code to skip the decompressor
and jump right at uncompressed kernel image.
endchoice
config KERNEL_COMPRESS
string
default "none" if KERNEL_FASTBOOT
default "gzip" if KERNEL_GZIP
default "lzma" if KERNEL_LZMA
default "lz4" if KERNEL_LZ4
default "none" if KERNEL_UNCOMPRESSED
help
Set kernel source code.
config SUSPEND
bool "Suspend to RAM and standby"
default n
help
Allow the system to enter sleep states in which main memory is
powered and thus its contents are preserved, such as the
suspend-to-RAM state (e.g. the ACPI S3 state).
endmenu
menu "ROOTFS options"
config SKIP_RAMDISK
bool "Skiping mounting initramfs"
default n
help
Skiping mountpoint initramfs can decrease boot time and
boot image size.
If unsure say N.
config ROOTFS_OVERLAYFS
bool "Enable rootfs with overlayfs"
default y
help
Enable rootfs with overlayfs.
config BUILDROOT_FS
bool "Enable buildroot generate rootfs"
default n
help
Enable buildroot generate rootfs.
config USE_4K_ERASE_SIZE_FOR_JFFS2
bool "Use 4K erase size for jffs2 filesystem"
default n
help
Enable use 4K erase size for jffs2 filesystem, it's only for nor flash
endmenu
menu "Turnkey options"
config BUILD_TURNKEY_ACCESSGUARD
bool "Enable Access Guard Turnkey"
default n
help
Add turnkey Access Guard to SDK release.
config BUILD_TURNKEY_IPC
bool "Enable IP Camera Turnkey"
default n
help
Add turnkey IPC to SDK release.
endmenu
menu "RTOS options"
config ENABLE_BOOT0
bool "Enable BOOT0"
depends on CHIP_ARCH_cv181x || CHIP_ARCH_cv180x
default n
help
Enable boot0.
config ENABLE_FASTBOOT0
bool "Enable FASTBOOT0"
depends on ENABLE_BOOT0
default n
help
Enable fastboot0.
config ENABLE_FREERTOS
bool "Enable FREERTOS"
depends on CHIP_ARCH_cv181x || CHIP_ARCH_cv180x
default n
help
Enable freertos.
config ENABLE_RTOS_DUMP_PRINT
bool "Enable FREE RTOS DUMP PRINT MSG"
depends on ENABLE_FREERTOS
default n
help
Enable freertos dump print msg.
config DUMP_PRINT_SZ_IDX
int "Select dump print size idx"
depends on ENABLE_FREERTOS
default 13
help
dump print size will be 1 << IDX.
config FAST_IMAGE_TYPE
int "Select fast image type"
depends on ENABLE_FREERTOS
default 0
help
default fast image type is 0.
E_FAST_NONE : 0
E_FAST_JEPG : 1
E_FAST_H264 : 2
E_FAST_H265 : 3
choice
prompt "Alios source selection"
default DISABLE_ALIOS
config DISABLE_ALIOS
bool "disable alios"
help
Disable alios update tool
We usually choose this configuration
This configuration is required to compile the boot kernel uboot
This configuration does not support alios upgrades
config ENABLE_ALIOS_UPDATE
bool "mars/phobos alios update"
help
Enable alios update tool
We don't usually choose this configuration
This configuration is required to compile the tools that update mars/phobos alios
This configuration does not support booting the kernel
config ENABLE_ALIOS
bool "mercury alios"
help
Enable mercury alios update tool
We don't usually choose this configuration
This configuration is required to compile the tools that update mercury alios
This configuration does not support booting the kernel
endchoice
config ALIOS_SOURCE
string
default "mars_alios" if ENABLE_ALIOS_UPDATE
default "alios" if ENABLE_ALIOS
default "" if DISABLE_ALIOS
help
Select build alios source.
config ALIOS_SOLUTION
string
default "helloworld" if ENABLE_ALIOS_UPDATE
default "cv182x_helloworld" if ENABLE_ALIOS
default "" if DISABLE_ALIOS
help
Select solution to build alios.
endmenu
menu "Rootfs packages"
osource "../ramdisk/rootfs/public/Kconfig"
endmenu