!371 支持Kconfig配置

Merge pull request !371 from Caoruihong/kconfig
This commit is contained in:
openharmony_ci
2021-11-11 06:04:28 +00:00
committed by Gitee
48 changed files with 2020 additions and 549 deletions

View File

@@ -27,9 +27,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_m/config.gni")
import("//kernel/liteos_m/liteos.gni")
static_library("shell") {
module_switch = defined(LOSCFG_SHELL)
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/base/shcmd.c",
"src/base/shcmdparse.c",
@@ -42,21 +44,11 @@ static_library("shell") {
"src/cmds/task_shellcmd.c",
"src/cmds/vfs_shellcmd.c",
]
include_dirs = [
"../../kernel/arch/include",
"../../kernel/include",
"../../utils",
"./include",
]
configs += [ "$LITEOSTOPDIR:los_config" ]
if (enable_ohos_kernel_liteos_m_lwip) {
if (defined(LOSCFG_NET_LWIP_SACK)) {
defines = [ "LWIP_SHELLCMD_ENABLE" ]
}
deps = [
"//kernel/liteos_m/kal/posix",
"//third_party/bounds_checking_function:libsec_static",
]
}
config("public") {
include_dirs = [ "include" ]
}

36
components/shell/Kconfig Normal file
View File

@@ -0,0 +1,36 @@
config SHELL
bool "Enable Shell"
default n
depends on DEBUG_VERSION
select USE_SHELL
help
Answer Y to enable LiteOS support shell cmd.
config USE_SHELL
bool
default n
menu "Functionality of Shell"
depends on SHELL
config SHELL_PRIO
int "Shell Task Priority"
default 3
range 1 31
depends on SHELL
config SHELL_LK
bool "Enable Shell lk"
default y
depends on DEBUG_VERSION && SHELL
help
Answer Y to enable LiteOS support shell lk.
config SHELL_DMESG
bool "Enable Shell dmesg"
default n
depends on DEBUG_VERSION && SHELL && SHELL_CMD_DEBUG
help
Answer Y to enable LiteOS support shell dmesg.
endmenu