feat(build): support Kconfig

Kconfig usages are the same with liteos_a

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I9aacbb69da88d5427cced89d1a49cb1041afa998
This commit is contained in:
Caoruihong
2021-10-25 20:01:37 +08:00
parent f3631fa266
commit 7e673430dc
48 changed files with 2020 additions and 549 deletions

View File

@@ -27,9 +27,10 @@
# 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("kernel") {
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/los_event.c",
"src/los_init.c",
@@ -44,36 +45,8 @@ static_library("kernel") {
"src/mm/los_membox.c",
"src/mm/los_memory.c",
]
include_dirs = [
"../components/cpup",
"../components/exchook",
"../components/backtrace",
"../components/power",
"../components/dynlink",
]
configs += [ "$LITEOSTOPDIR:los_config" ]
if ("$board_cpu" == "cortex-m3") {
deps = [ "arch/arm/cortex-m3/gcc/:arch" ]
} else if ("$board_cpu" == "cortex-m4") {
deps = [ "arch/arm/cortex-m4/gcc/:arch" ]
} else if ("$board_cpu" == "cortex-m7") {
deps = [ "arch/arm/cortex-m7/gcc/:arch" ]
} else if ("$board_cpu" == "cortex-m33") {
if (enable_ohos_kernel_liteos_m_tz) {
deps = [ "arch/arm/cortex-m33/gcc/TZ:arch" ]
} else {
deps = [ "arch/arm/cortex-m33/gcc/NTZ:arch" ]
}
} else if ("$board_cpu" == "ck802" || "$board_cpu" == "e802") {
deps = [ "arch/csky/v2/gcc:arch" ]
} else if ("$board_cpu" == "") {
if ("$board_arch" == "rv32imac" || "$board_arch" == "rv32imafdc") {
deps = [ "arch/risc-v/riscv32/gcc:arch" ]
} else if ("$board" == "esp32") {
deps = [ "arch/xtensa/lx6/gcc:arch" ]
}
}
}
config("public") {
include_dirs = [ "include" ]
}