提交 73a7b661 编写于 作者: M mamingshuai

update openharmony 1.0.1

上级 e351799d
### 该问题是怎么引起的?
### 重现步骤
### 报错信息
### 相关的Issue
### 原因(目的、解决的问题等)
### 描述(做了什么,变更了什么)
### 测试用例(新增、改动、可能影响的功能)
/out
/fs/proc
/test
/include
.config*
......@@ -22,4 +21,3 @@ platform/include/menuconfig.h
platform/board.ld
apps/init/init
apps/shell/shell
lib/libc/musl
# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
#
# 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.
import("//build/lite/config/subsystem/lite_subsystem.gni")
declare_args() {
enable_ohos_kernel_liteos_a_ext_build = true
LOSCFG_TEST_APPS = false
}
lite_subsystem("kernel") {
subsystem_components = []
if (enable_ohos_kernel_liteos_a_ext_build == false) {
subsystem_components += [
"//kernel/liteos_a/kernel",
"//kernel/liteos_a/net",
"//kernel/liteos_a/lib",
"//kernel/liteos_a/compat",
"//kernel/liteos_a/fs",
"//kernel/liteos_a/arch:platform_cpu",
]
if (LOSCFG_SHELL) {
subsystem_components += [ "//kernel/liteos_a/shell" ]
}
} else {
deps = [":make"]
}
}
action("make") {
script = "//build/lite/build_ext_components.py"
outputs = [ "$target_gen_dir/liteos_a_build_log.txt" ]
exec_path = rebase_path(rebase_path(".", root_build_dir))
outdir = rebase_path(get_path_info(".", "out_dir"))
command = "make clean OUTDIR=$outdir && make rootfs VERSION=\"${ohos_version}\" -j 16 OUTDIR=$outdir"
args = [
"--path=$exec_path",
"--prebuilts=sh build.sh ${board_name} ${ohos_build_compiler} ${ohos_build_type}",
"--command=${command}"
]
}
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
#
# 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.
import("//build/lite/config/component/lite_component.gni")
import("//build/lite/config/subsystem/lite_subsystem.gni")
generate_notice_file("kernel_notice_file") {
module_name = "kernel"
module_source_dir_list = [
"//third_party/FreeBSD",
"//third_party/musl",
"//third_party/zlib",
"//third_party/FatFs",
"//third_party/Linux_Kernel",
"//third_party/lwip",
"//third_party/NuttX",
"//third_party/mtd-utils",
]
}
declare_args() {
enable_ohos_kernel_liteos_a_ext_build = true
LOSCFG_TEST_APPS = false
tee_enable = ""
}
lite_subsystem("kernel") {
subsystem_components = []
if (enable_ohos_kernel_liteos_a_ext_build == false) {
subsystem_components += [
"//kernel/liteos_a/kernel",
"//kernel/liteos_a/net",
"//kernel/liteos_a/lib",
"//kernel/liteos_a/compat",
"//kernel/liteos_a/fs",
"//kernel/liteos_a/arch:platform_cpu",
]
if (LOSCFG_SHELL) {
subsystem_components += [ "//kernel/liteos_a/shell" ]
}
} else {
deps = [ ":make" ]
}
}
build_ext_component("make") {
exec_path = rebase_path(".", root_build_dir)
tee_enable = "false"
if (board_name == "hi3516dv300" && enable_tee_ree) {
tee_enable = "tee"
}
prebuilts = "sh build.sh ${board_name} ${ohos_build_compiler} ${root_build_dir} ${ohos_build_type} ${tee_enable} \"${device_company}\" \"${product_path}\""
outdir = rebase_path(get_path_info(".", "out_dir"))
command = "make clean OUTDIR=$outdir && make rootfs VERSION=\"${ohos_version}\" -j 16 OUTDIR=$outdir"
}
# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
......@@ -61,6 +61,15 @@ source "../../kernel/liteos_a/arch/Kconfig"
######################### config options of rootfs #####################
source "../../kernel/liteos_a/kernel/common/Kconfig"
######################### config options of patchfs #####################
source "../../kernel/liteos_a/kernel/common/patchfs/Kconfig"
config QUICK_START
bool "Enable QUICK_START"
default n
depends on DRIVERS && FS_VFS
help
Answer Y to enable LiteOS support quick start.
endmenu
######################### config options of kernel #####################
......@@ -84,6 +93,12 @@ source "../../kernel/liteos_a/fs/ramfs/Kconfig"
source "../../kernel/liteos_a/fs/nfs/Kconfig"
source "../../kernel/liteos_a/fs/proc/Kconfig"
source "../../kernel/liteos_a/fs/jffs2/Kconfig"
source "../../kernel/liteos_a/fs/zpfs/Kconfig"
config ENABLE_READ_BUFFER
bool "Enable read buffer Option"
default n
help
Answer Y to add enable read buffer Option.
endmenu
######################## config options of net ############################
......@@ -197,6 +212,13 @@ config EXC_INTERACTION
Answer Y to enable exception interaction for LiteOS, when the system enter exception, user can also interact with system by shell
command like readreg, writereg,task,hwi.
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.
config USER_INIT_DEBUG
bool "Enable user init Debug"
default n
......@@ -221,30 +243,6 @@ config MEM_DEBUG
help
Answer Y to enable LiteOS support mem debug.
config MEM_MUL_MODULE
bool "Enable Memory module statistics"
default n
depends on MEM_DEBUG
help
Answer Y to enable LiteOS support memory statistics depend on different module
config MEM_MUL_POOL
bool "Enable Memory multi-pool control"
default y
depends on DEBUG_VERSION && MEM_DEBUG
help
Answer Y to enable LiteOS support memory multi-pool control
config MEM_HEAD_BACKUP
bool "Enable Node Head Backup"
default 0
depends on DEBUG_VERSION && MEM_DEBUG
help
Answer Y to enable node head backup
config MEM_RECORDINFO
bool "Enable Mem Record"
default n
depends on DEBUG_VERSION && MEM_DEBUG
help
Answer Y to enable mem record
config MEM_LEAKCHECK
bool "Enable Function call stack of Mem operation recorded"
default n
......@@ -255,14 +253,10 @@ config BASE_MEM_NODE_INTEGRITY_CHECK
bool "Enable integrity check or not "
default n
depends on DEBUG_VERSION && MEM_DEBUG
config BASE_MEM_NODE_SIZE_CHECK
bool "Enable size check or not"
config MEM_WATERLINE
bool "Enable memory pool waterline or not"
default n
depends on DEBUG_VERSION && MEM_DEBUG
config SLAB_INFO_STATISTIC
bool "Enable SLAB Statistic"
default n
depends on DEBUG_VERSION && KERNEL_MEM_SLAB && MEM_DEBUG
config VM_OVERLAP_CHECK
bool "Enable VM overlap check or not"
......@@ -278,19 +272,6 @@ config NULL_ADDRESS_PROTECT
help
Answer Y to set mem address 0~1M prohibit to access, read or write will trigger exception.
choice
prompt "Enable Uart"
default DRIVERS_HDF_PLATFORM_UART
help
Enable simple uart (without vfs) only for litekernel.
Enable general uart (with vfs) for full code.
source "../../vendor/hisi/hi35xx/platform/uart/Kconfig"
config PLATFORM_UART_WITHOUT_VFS
bool "Simple Uart"
config PLATFORM_NO_UART
bool "NO Uart"
endchoice
endmenu
######################## config options os drivers ########################
......@@ -301,42 +282,13 @@ config DRIVERS
help
Answer Y to enable LiteOS support driver.
source "../../vendor/hisi/hi35xx/platform/hiedmac/Kconfig"
source "../../kernel/liteos_a/bsd/dev/usb/Kconfig"
source "../../drivers/hdf/lite/Kconfig"
config DRIVERS_NETDEV
bool "Enable Net Device"
default y
depends on DRIVERS && NET_LWIP_SACK
help
Answer Y to enable LiteOS support net device.
choice
depends on DRIVERS_NETDEV
prompt "MAC"
default n
help
Enable higmac for hi3516a hi3519 hi3559a_cortex-a53_aarch64.
Enable hieth-sf for hi3516cv300 hi3516ev200 and hi3518ev200.
source "../../vendor/hisi/hi35xx/platform/hieth-sf/Kconfig"
endchoice
source "../../drivers/liteos/mem/Kconfig"
source "../../vendor/hisi/hi35xx/platform/mmc/Kconfig"
config DRIVERS_MTD
bool "Enable MTD"
default y
depends on DRIVERS && FS_VFS
help
Answer Y to enable LiteOS support jffs2 multipartion.
source "../../drivers/adapter/khdf/liteos/Kconfig"
source "../../vendor/hisi/hi35xx/platform/mtd/spi_nor/Kconfig"
source "../../drivers/liteos/random/Kconfig"
source "drivers/char/mem/Kconfig"
source "drivers/char/random/Kconfig"
source "../../drivers/liteos/tzdriver/Kconfig"
source "../../drivers/liteos/video/Kconfig"
source "drivers/char/video/Kconfig"
source "../../drivers/liteos/hievent/Kconfig"
endmenu
......
Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
......@@ -25,4 +25,4 @@ 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.
\ No newline at end of file
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
......@@ -38,8 +38,6 @@ LITEOSTHIRDPARTY := $(LITEOSTOPDIR)/../../third_party
export LITEOSTOPDIR
export LITEOSTHIRDPARTY
-include $(LITEOSTOPDIR)/tools/build/config.mk
RM = -rm -rf
MAKE = make
__LIBS = libs
......@@ -53,14 +51,33 @@ LITEOS_MENUCONFIG_H = $(LITEOSTOPDIR)/include/generated/autoconf.h
LITEOS_PLATFORM_BASE = $(LITEOSTOPDIR)/platform
LITEOS_PLATFORM_MENUCONFIG_H = $(LITEOS_PLATFORM_BASE)/include/menuconfig.h
ifeq ($(LOSCFG_PLATFORM_HI3518EV300), y)
export CONFIG_=LOSCFG_
MENUCONFIG_PATH = $(LITEOSTOPDIR)/tools/menuconfig
KCONFIG_FILE_PATH = $(LITEOSTOPDIR)/Kconfig
ifeq ($(OS), Linux)
MENUCONFIG_MCONF := $(MENUCONFIG_PATH)/mconf
MENUCONFIG_CONF := $(MENUCONFIG_PATH)/conf
else
MENUCONFIG_MCONF := $(MENUCONFIG_PATH)/kconfig-mconf.exe
MENUCONFIG_CONF := $(MENUCONFIG_PATH)/kconfig-conf.exe
endif
$(shell env CONFIG_=$(CONFIG_) $(MENUCONFIG_CONF) -s --olddefconfig $(KCONFIG_FILE_PATH))
-include $(LITEOSTOPDIR)/tools/build/config.mk
ifeq ($(LOSCFG_STORAGE_SPINOR), y)
FSTYPE = jffs2
endif
ifeq ($(LOSCFG_PLATFORM_HI3516DV300), y)
ifeq ($(LOSCFG_STORAGE_EMMC), y)
FSTYPE = vfat