2021-03-11 18:43:57 +08:00
|
|
|
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
|
|
|
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
2020-09-08 10:21:39 +08:00
|
|
|
#
|
|
|
|
# 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.
|
2021-08-27 09:51:14 +08:00
|
|
|
|
2020-09-08 10:21:39 +08:00
|
|
|
mainmenu "Huawei LiteOS Configuration"
|
|
|
|
|
|
|
|
menu "Compiler"
|
|
|
|
choice
|
2021-08-27 09:51:14 +08:00
|
|
|
prompt "Compiler type"
|
2020-09-08 10:21:39 +08:00
|
|
|
default COMPILER_CLANG_LLVM
|
|
|
|
help
|
2021-08-27 09:51:14 +08:00
|
|
|
Choose compiler type.
|
|
|
|
|
|
|
|
config COMPILER_GCC
|
|
|
|
bool "GCC"
|
2020-09-08 10:21:39 +08:00
|
|
|
|
2021-08-27 09:51:14 +08:00
|
|
|
config CROSS_COMPILE
|
|
|
|
string "GCC cross-compile toolchain prefix"
|
|
|
|
depends on COMPILER_GCC
|
|
|
|
default "arm-linux-ohoseabi-" if ARCH_ARM_AARCH32
|
2020-09-08 10:21:39 +08:00
|
|
|
|
|
|
|
config COMPILER_CLANG_LLVM
|
2021-08-27 09:51:14 +08:00
|
|
|
bool "Clang"
|
|
|
|
|
|
|
|
config LLVM_TARGET
|
|
|
|
string "Clang LLVM target"
|
|
|
|
depends on COMPILER_CLANG_LLVM
|
|
|
|
default "arm-liteos" if ARCH_ARM_AARCH32
|
2020-09-08 10:21:39 +08:00
|
|
|
|
|
|
|
endchoice
|
2021-08-27 09:51:14 +08:00
|
|
|
|
|
|
|
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.
|
2021-08-30 20:07:51 +08:00
|
|
|
But the compile time may be a bit longer.
|
|
|
|
|
|
|
|
config COMPILE_LTO
|
|
|
|
bool "Enable link time optimization (LTO)" if COMPILE_OPTIMIZE_SIZE
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Answer Y to add lto options for more smaller code size.
|
|
|
|
The final binary size will be smaller.
|
2021-08-27 09:51:14 +08:00
|
|
|
But the compile time may be much longer.
|
|
|
|
|
2020-09-08 10:21:39 +08:00
|
|
|
endmenu
|
|
|
|
|
|
|
|
menu "Platform"
|
|
|
|
|
|
|
|
######################### config options of bsp #####################
|
2021-07-07 20:20:09 +08:00
|
|
|
source "platform/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
|
|
|
|
######################### config options of cpu arch ################
|
2021-07-07 20:20:09 +08:00
|
|
|
source "arch/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
|
2021-03-11 18:43:57 +08:00
|
|
|
config QUICK_START
|
|
|
|
bool "Enable QUICK_START"
|
|
|
|
default n
|
|
|
|
depends on DRIVERS && FS_VFS
|
|
|
|
help
|
|
|
|
Answer Y to enable LiteOS support quick start.
|
2020-09-08 10:21:39 +08:00
|
|
|
endmenu
|
|
|
|
|
|
|
|
######################### config options of kernel #####################
|
2021-07-07 20:20:09 +08:00
|
|
|
source "kernel/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
######################### config options of lib ########################
|
2021-07-07 20:20:09 +08:00
|
|
|
source "lib/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
######################### config options of compatibility ##############
|
|
|
|
menu "Compat"
|
2021-07-07 20:20:09 +08:00
|
|
|
source "compat/posix/Kconfig"
|
|
|
|
source "bsd/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
endmenu
|
|
|
|
|
|
|
|
######################## config options of filesystem ##################
|
|
|
|
menu "FileSystem"
|
2021-09-06 16:55:45 +08:00
|
|
|
source "fs/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
endmenu
|
|
|
|
|
|
|
|
######################## config options of net ############################
|
2021-07-07 20:20:09 +08:00
|
|
|
source "net/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
|
|
|
|
######################## config options of debug ########################
|
|
|
|
menu "Debug"
|
2021-08-27 09:51:14 +08:00
|
|
|
config GDB
|
|
|
|
bool "Enable gdb functions"
|
2020-09-08 10:21:39 +08:00
|
|
|
default n
|
|
|
|
help
|
2021-08-27 09:51:14 +08:00
|
|
|
Answer Y to enable gdb functions.
|
2020-09-08 10:21:39 +08:00
|
|
|
|
|
|
|
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
|
2021-03-29 14:30:09 +08:00
|
|
|
depends on KERNEL_VM
|
2020-09-08 10:21:39 +08:00
|
|
|
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
|
2021-08-27 09:51:14 +08:00
|
|
|
depends on ARCH_ARM
|
2020-09-08 10:21:39 +08:00
|
|
|
help
|
|
|
|
Answer Y to build thumb version. This will make LiteOS smaller.
|
2021-04-29 16:04:33 +08:00
|
|
|
|
2020-09-08 10:21:39 +08:00
|
|
|
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.
|
|
|
|
|
2021-04-29 16:04:33 +08:00
|
|
|
config SAVE_EXCINFO
|
|
|
|
bool "Enable Saving Exception Information"
|
2021-07-07 10:29:43 +08:00
|
|
|
default n
|
2021-04-29 16:04:33 +08:00
|
|
|
help
|
|
|
|
Answer Y to enable LiteOS support saving exception information to storage medium.
|
|
|
|
|
2020-09-08 10:21:39 +08:00
|
|
|
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.
|
2021-08-03 00:35:23 +08:00
|
|
|
It also means you do not want to use debug modules, like shell,telnet,tftp,nfs and
|
|
|
|
memory check, etc.
|
2020-09-08 10:21:39 +08:00
|
|
|
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.
|
|
|
|
|
2021-07-07 20:20:09 +08:00
|
|
|
source "shell/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
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.
|
2021-07-07 20:20:09 +08:00
|
|
|
source "net/telnet/Kconfig"
|
2021-03-11 18:43:57 +08:00
|
|
|
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.
|
|
|
|
|
2020-09-08 10:21:39 +08:00
|
|
|
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
|
2021-07-07 20:20:09 +08:00
|
|
|
bool "Enable integrity check or not"
|
2020-09-08 10:21:39 +08:00
|
|
|
default n
|
|
|
|
depends on DEBUG_VERSION && MEM_DEBUG
|
2021-03-11 18:43:57 +08:00
|
|
|
config MEM_WATERLINE
|
|
|
|
bool "Enable memory pool waterline or not"
|
2020-09-08 10:21:39 +08:00
|
|
|
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"
|
2021-09-06 16:55:45 +08:00
|
|
|
source "drivers/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
endmenu
|
|
|
|
|
2021-09-06 16:55:45 +08:00
|
|
|
######################## config options os security #######################
|
2020-09-08 10:21:39 +08:00
|
|
|
menu "Security"
|
2021-07-07 20:20:09 +08:00
|
|
|
source "security/Kconfig"
|
2020-09-08 10:21:39 +08:00
|
|
|
endmenu
|
|
|
|
|
2021-05-08 10:09:39 +08:00
|
|
|
menu "Test"
|
|
|
|
config ENABLE_KERNEL_TEST
|
|
|
|
bool "Enable Kernel Test"
|
|
|
|
default n
|
|
|
|
endmenu
|
|
|
|
|
2020-09-08 10:21:39 +08:00
|
|
|
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
|