Kconfig 11.1 KB
Newer Older
M
mamingshuai 已提交
1 2
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
W
wenjun 已提交
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
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
#    conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
#    of conditions and the following disclaimer in the documentation and/or other materials
#    provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
#    to endorse or promote products derived from this software without specific prior written
#    permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
C
Caoruihong 已提交
29

W
wenjun 已提交
30 31 32 33
mainmenu "Huawei LiteOS Configuration"

menu "Compiler"
choice
C
Caoruihong 已提交
34
    prompt "Compiler type"
W
wenjun 已提交
35 36
    default COMPILER_CLANG_LLVM
    help
C
Caoruihong 已提交
37 38 39 40
      Choose compiler type.

config COMPILER_GCC
    bool "GCC"
W
wenjun 已提交
41

C
Caoruihong 已提交
42 43 44 45
config CROSS_COMPILE
    string "GCC cross-compile toolchain prefix"
    depends on COMPILER_GCC
    default "arm-linux-ohoseabi-" if ARCH_ARM_AARCH32
W
wenjun 已提交
46 47

config COMPILER_CLANG_LLVM
C
Caoruihong 已提交
48 49 50 51 52 53
    bool "Clang"

config LLVM_TARGET
    string "Clang LLVM target"
    depends on COMPILER_CLANG_LLVM
    default "arm-liteos" if ARCH_ARM_AARCH32
W
wenjun 已提交
54 55

endchoice
C
Caoruihong 已提交
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78

config COMPILE_DEBUG
    bool "Enable debug options"
    default n
    help
      Answer Y to add -g option in compile command.

config COMPILE_OPTIMIZE
    bool "Enable code optimization options"
    default y
    help
      Answer Y to add optimization options for efficient code.
      The final binary size will be smaller and execute faster.
      But the debugging experience may be worst somehow.

config COMPILE_OPTIMIZE_SIZE
    bool "Enable code size optimization options" if COMPILE_OPTIMIZE
    default y
    help
      Answer Y to add optimization options for small code size.
      The final binary size will be smaller.
      But the compile time may be much longer.

W
wenjun 已提交
79 80 81 82 83
endmenu

menu "Platform"

######################### config options of bsp #####################
84
source "platform/Kconfig"
W
wenjun 已提交
85 86

######################### config options of cpu arch ################
87
source "arch/Kconfig"
W
wenjun 已提交
88 89

######################### config options of rootfs #####################
90
source "kernel/common/rootfs/Kconfig"
M
mamingshuai 已提交
91
######################### config options of patchfs #####################
92
source "kernel/common/patchfs/Kconfig"
Q
qidechun 已提交
93 94
######################### config options of blackbox #####################
source "kernel/common/blackbox/Kconfig"
95 96
######################### config options of hidumper #####################
source "kernel/common/hidumper/Kconfig"
M
mamingshuai 已提交
97 98 99 100 101 102 103

config QUICK_START
    bool "Enable QUICK_START"
    default n
    depends on DRIVERS && FS_VFS
    help
      Answer Y to enable LiteOS support quick start.
W
wenjun 已提交
104 105 106
endmenu

######################### config options of kernel #####################
107
source "kernel/Kconfig"
W
wenjun 已提交
108
######################### config options of lib ########################
109
source "lib/Kconfig"
W
wenjun 已提交
110 111
######################### config options of compatibility ##############
menu "Compat"
112 113
source "compat/posix/Kconfig"
source "bsd/Kconfig"
W
wenjun 已提交
114 115 116 117
endmenu

######################## config options of filesystem ##################
menu "FileSystem"
118 119 120 121 122 123 124
source "fs/vfs/Kconfig"
source "fs/fat/Kconfig"
source "fs/ramfs/Kconfig"
source "fs/romfs/Kconfig"
source "fs/nfs/Kconfig"
source "fs/proc/Kconfig"
source "fs/jffs2/Kconfig"
125
source "fs/zpfs/Kconfig"
M
mamingshuai 已提交
126 127 128
config ENABLE_READ_BUFFER
    bool "Enable read buffer Option"
    default n
L
li_zan 已提交
129
    depends on FS_VFS
M
mamingshuai 已提交
130 131
    help
      Answer Y to add enable read buffer Option.
W
wangchenyang 已提交
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

config MAX_VNODE_SIZE
    int "Vnode max number"
    range 0 512
    default 512
    depends on FS_VFS
    help
      vnode number, range from 0 to 512.

config MAX_PATH_CACHE_SIZE
    int "PathCache max number"
    range 0 1024
    default 512
    depends on FS_VFS
    help
      pathCache number, range from 0 to 1024.
W
wenjun 已提交
148 149 150
endmenu

######################## config options of net ############################
151
source "net/Kconfig"
W
wenjun 已提交
152 153 154

######################## config options of debug ########################
menu "Debug"
C
Caoruihong 已提交
155 156
config GDB
    bool "Enable gdb functions"
W
wenjun 已提交
157 158
    default n
    help
C
Caoruihong 已提交
159
      Answer Y to enable gdb functions.
W
wenjun 已提交
160 161 162 163 164 165 166 167 168 169

config PLATFORM_ADAPT
    bool "Enable Os_adapt"
    default y
    help
      Answer Y to add os_adapt.c to LiteOS.

config ENABLE_OOM_LOOP_TASK
    bool "Enable Oom loop task"
    default n
Y
YOUR_NAME 已提交
170
    depends on KERNEL_VM
W
wenjun 已提交
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
    help
      Answer Y to enable oom loop kthread to check system out of memory.

config DO_ALIGN
    bool "Enable do align for hi3518e"
    default y
    depends on PLATFORM_HI3518EV200
    help
      Answer Y to enable do align for hi3518e.


config ENABLE_MAGICKEY
    bool "Enable MAGIC KEY"
    default y
    help
      Answer Y to enable LiteOS Magic key.
        ctrl + r : Magic key check switch;
        ctrl + z : Show all magic op key;
        ctrl + t : Show task information;
        ctrl + p : System panic;
        ctrl + e : Check system memory pool.

config THUMB
    bool "Enable Thumb"
    default n
C
Caoruihong 已提交
196
    depends on ARCH_ARM
W
wenjun 已提交
197 198
    help
      Answer Y to build thumb version.  This will make LiteOS smaller.
199

W
wenjun 已提交
200 201 202 203 204 205 206 207
config PLATFORM_DVFS
    bool "Enable Dvfs"
    default n
    depends on  COMPAT_LINUXKPI
    help
      Answer Y to enable LiteOS support dynamic voltage and frequency scaling feature for
      low power consumption.

208 209
config SAVE_EXCINFO
    bool "Enable Saving Exception Information"
210
    default n
211 212 213
    help
      Answer Y to enable LiteOS support saving exception information to storage medium.

W
wenjun 已提交
214 215 216 217 218
config DEBUG_VERSION
    bool "Enable a Debug Version"
    default n
    help
      If you do not select this option that means you enable a release version for LiteOS.
219 220
      It also means you do not want to use debug modules, like shell,telnet,tftp,nfs and
      memory check, etc.
W
wenjun 已提交
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
      If you select this option that means you enable a debug version for LiteOS.
      That means you want a opposite behaviour compared to release version.

config DEBUG_KERNEL
    bool "Enable Debug LiteOS Kernel Resource"
    default n
    depends on DEBUG_VERSION
    help
      If you select this option that means you enable debugging kernel resource.
      It also means you want to get queue, mutex, semaphore, memory debug information.
      That means you want a opposite behaviour compared to release version.

config DEBUG_QUEUE
    bool "Enable Queue Debugging"
    default n
    depends on DEBUG_KERNEL
    help
      Answer Y to enable debug queue.

config DEBUG_DEADLOCK
    bool "Enable Mutex Deadlock Debugging"
    default n
    depends on DEBUG_KERNEL
    help
      Answer Y to enable debug mutex deadlock.

config DEBUG_SEMAPHORE
    bool "Enable Semaphore Debugging"
    default n
    depends on DEBUG_KERNEL
    help
      Answer Y to enable debug semaphore.

254
source "shell/Kconfig"
W
wenjun 已提交
255 256 257 258 259 260
config NET_LWIP_SACK_TFTP
    bool "Enable Tftp"
    default y
    depends on SHELL && NET_LWIP_SACK && DEBUG_VERSION
    help
      Answer Y to enable LiteOS support tftp cmd and tftp tool.
261
source "net/telnet/Kconfig"
M
mamingshuai 已提交
262 263 264 265 266 267 268
config SCHED_DEBUG
    bool "Enable sched debug Feature"
    default n
    depends on DEBUG_VERSION
    help
      If you wish to build LiteOS with support for sched debug.

W
wenjun 已提交
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
config USER_INIT_DEBUG
    bool "Enable user init Debug"
    default n
    depends on DEBUG_VERSION

config SHELL_CMD_DEBUG
    bool "Enable shell cmd Debug"
    default n
    depends on DEBUG_VERSION && SHELL

config USB_DEBUG
    bool "Enable USB Debug"
    default n
    depends on SHELL && DRIVERS_USB && DEBUG_VERSION
    help
      Answer Y to enable LiteOS support usb debug.
      use shell command to open the specified debug level print.
config MEM_DEBUG
    bool "Enable MEM Debug"
    default n
    depends on DEBUG_VERSION
    help
      Answer Y to enable LiteOS support mem debug.

config MEM_LEAKCHECK
    bool "Enable Function call stack of Mem operation recorded"
    default n
    depends on DEBUG_VERSION && MEM_DEBUG
    help
      Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the infomations of mem node.
config BASE_MEM_NODE_INTEGRITY_CHECK
300
    bool "Enable integrity check or not"
W
wenjun 已提交
301 302
    default n
    depends on DEBUG_VERSION && MEM_DEBUG
M
mamingshuai 已提交
303 304
config MEM_WATERLINE
    bool "Enable memory pool waterline or not"
W
wenjun 已提交
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
    default n
    depends on DEBUG_VERSION && MEM_DEBUG

config VM_OVERLAP_CHECK
    bool "Enable VM overlap check or not"
    default n
    depends on DEBUG_VERSION && MEM_DEBUG
    help
      Answer Y to enable vm overlap check.

endmenu

######################## config options os drivers ########################
menu "Driver"
config DRIVERS
    bool "Enable Driver"
    default y
    help
      Answer Y to enable LiteOS support driver.

325
source "bsd/dev/usb/Kconfig"
M
mamingshuai 已提交
326
source "../../drivers/adapter/khdf/liteos/Kconfig"
W
wenjun 已提交
327

328
# Device driver Kconfig import
329
osource "$(DEVICE_PATH)/drivers/Kconfig"
330

M
mamingshuai 已提交
331
source "drivers/char/mem/Kconfig"
332
source "drivers/char/quickstart/Kconfig"
M
mamingshuai 已提交
333 334
source "drivers/char/random/Kconfig"
source "drivers/char/video/Kconfig"
335 336

source "../../drivers/liteos/tzdriver/Kconfig"
W
wenjun 已提交
337 338 339 340 341
source "../../drivers/liteos/hievent/Kconfig"

endmenu

menu "Security"
342
source "security/Kconfig"
W
wenjun 已提交
343 344
endmenu

L
lnlan 已提交
345 346 347 348 349 350
menu "Test"
config ENABLE_KERNEL_TEST
    bool "Enable Kernel Test"
    default n
endmenu

W
wenjun 已提交
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
menu "Stack Smashing Protector (SSP) Compiler Feature"

choice
    prompt "Enable stack buffer overflow detection"
    default  CC_STACKPROTECTOR_STRONG
    ---help---
    This option turns on the -fstack-protector GCC feature. This
    feature puts, at the beginning of functions, a canary value on
    the stack just before the return address, and validates
    the value just before actually returning.  Stack based buffer
    overflows (that need to overwrite this return address) now also
    overwrite the canary, which gets detected and the attack is then
    neutralized via a kernel panic.

    This feature requires gcc version 4.2 or above, or a distribution
    gcc with the feature backported. Older versions are automatically
    detected and for those versions, this configuration option is
    ignored. (and a warning is printed during bootup)

config CC_NO_STACKPROTECTOR
    bool "-fno-stack-protector"

config CC_STACKPROTECTOR
    bool "-fstack-protector"

config CC_STACKPROTECTOR_STRONG
    bool "-fstack-protector-strong"

config CC_STACKPROTECTOR_ALL
    bool "-fstack-protector-all"

endchoice

endmenu