diff --git a/.gitmodules b/.gitmodules index eb2ce7cd..179e90c3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,12 @@ [submodule "third_party/cmsis"] path = third_party/cmsis - url = ../third_party_cmsis.git + url = https://gitee.com/openharmony/third_party_cmsis.git branch = . [submodule "third_party/bounds_checking_function"] path = third_party/bounds_checking_function - url = ../third_party_bounds_checking_function.git + url = https://gitee.com/openharmony/third_party_bounds_checking_function.git + branch = . +[submodule "third_party/FatFs"] + path = third_party/FatFs + url = https://gitee.com/openharmony/third_party_FatFs.git branch = . diff --git a/BUILD.gn b/BUILD.gn index 35e88fcb..b8304d45 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -38,9 +38,9 @@ declare_args() { group("kernel") { deps = [ - "components/bounds_checking_function:sec", "kernel:kernel", "utils:utils", + "//third_party/bounds_checking_function:libsec_static", ] if (enable_ohos_kernel_liteos_m_cppsupport == true) { deps += [ "components/cppsupport:cppsupport" ] diff --git a/components/backtrace/BUILD.gn b/components/backtrace/BUILD.gn index c6839eac..b4cb0a9e 100644 --- a/components/backtrace/BUILD.gn +++ b/components/backtrace/BUILD.gn @@ -34,7 +34,6 @@ static_library("backtrace") { "../../kernel/include", "../../kernel/arch/include", "../../utils", - "./", - "//third_party/bounds_checking_function/include", + "../../third_party/bounds_checking_function/include", ] } diff --git a/components/cppsupport/BUILD.gn b/components/cppsupport/BUILD.gn index d74632fc..2cb08a28 100644 --- a/components/cppsupport/BUILD.gn +++ b/components/cppsupport/BUILD.gn @@ -30,8 +30,5 @@ static_library("cppsupport") { sources = [ "los_cppsupport.c" ] - include_dirs = [ - "../../utils", - "./", - ] + include_dirs = [ "../../utils" ] } diff --git a/components/cpup/BUILD.gn b/components/cpup/BUILD.gn index acd1d086..70354d7e 100644 --- a/components/cpup/BUILD.gn +++ b/components/cpup/BUILD.gn @@ -34,7 +34,6 @@ static_library("cpup") { "../../kernel/include", "../../kernel/arch/include", "../../utils", - "./", - "//third_party/bounds_checking_function/include", + "../../third_party/bounds_checking_function/include", ] } diff --git a/components/exchook/BUILD.gn b/components/exchook/BUILD.gn index 3550c550..65b15890 100644 --- a/components/exchook/BUILD.gn +++ b/components/exchook/BUILD.gn @@ -36,7 +36,6 @@ static_library("exchook") { "../../kernel/arch/include", "../../kernel/include", "../../utils", - "./", - "//third_party/bounds_checking_function/include", + "../../third_party/bounds_checking_function/include", ] } diff --git a/components/fs/fatfs/BUILD.gn b/components/fs/fatfs/BUILD.gn index ee0075cd..67a39496 100644 --- a/components/fs/fatfs/BUILD.gn +++ b/components/fs/fatfs/BUILD.gn @@ -29,6 +29,10 @@ static_library("fatfs") { sources = [ + "../../../third_party/FatFs/source/diskio.c", + "../../../third_party/FatFs/source/ff.c", + "../../../third_party/FatFs/source/ffsystem.c", + "../../../third_party/FatFs/source/ffunicode.c", "fatfs.c", "fs.c", ] @@ -38,10 +42,8 @@ static_library("fatfs") { "../../../kernel/include", "../../../utils", "../../../kal/cmsis", - "../../../kal", "../../../kal/posix/include", - "./", - "//third_party/bounds_checking_function/include", - "//third_party/FatFs/source/", + "../../../third_party/bounds_checking_function/include", + "../../../third_party/FatFs/source/", ] } diff --git a/components/fs/fatfs/fatfs.c b/components/fs/fatfs/fatfs.c index 363bc8a9..2bf57118 100644 --- a/components/fs/fatfs/fatfs.c +++ b/components/fs/fatfs/fatfs.c @@ -41,7 +41,7 @@ #include "securec.h" #include "los_compiler.h" #include "los_debug.h" -#include "cmsis_os.h" +#include "cmsis_os2.h" #define FS_SUCCESS 0 #define FS_FAILURE (-1) diff --git a/kal/BUILD.gn b/kal/BUILD.gn index f1a18609..97dc7381 100644 --- a/kal/BUILD.gn +++ b/kal/BUILD.gn @@ -35,7 +35,6 @@ declare_args() { } lite_component("kal") { - features = [] if (enable_ohos_kernel_liteos_m_cmsis == true) { diff --git a/kal/posix/BUILD.gn b/kal/posix/BUILD.gn index 8fc2ca82..41277fe9 100644 --- a/kal/posix/BUILD.gn +++ b/kal/posix/BUILD.gn @@ -34,10 +34,10 @@ static_library("posix") { "src/malloc.c", "src/pthread.c", "src/pthread_attr.c", + "src/pthread_cond.c", "src/pthread_mutex.c", "src/semaphore.c", "src/time.c", - "src/pthread_cond.c", ] include_dirs = [ @@ -45,6 +45,6 @@ static_library("posix") { "../../kernel/arch/include", "../../kernel/include", "../../utils", - "//third_party/bounds_checking_function/include", + "../../third_party/bounds_checking_function/include", ] } diff --git a/kernel/BUILD.gn b/kernel/BUILD.gn index 1853f638..d86c5a8c 100644 --- a/kernel/BUILD.gn +++ b/kernel/BUILD.gn @@ -47,7 +47,7 @@ static_library("kernel") { "../components/cpup", "../components/exchook", "../utils", - "//third_party/bounds_checking_function/include", + "../third_party/bounds_checking_function/include", ] if ("$board_cpu" == "cortex-m3") { diff --git a/kernel/arch/arm/cortex-m33/gcc/BUILD.gn b/kernel/arch/arm/cortex-m33/gcc/BUILD.gn index d289c391..f5c33905 100644 --- a/kernel/arch/arm/cortex-m33/gcc/BUILD.gn +++ b/kernel/arch/arm/cortex-m33/gcc/BUILD.gn @@ -40,7 +40,6 @@ static_library("arch") { "../../../../../kernel/arch/include", "../../../../../kernel/include", "../../../../../utils", - "./", - "//third_party/bounds_checking_function/include", + "../../../../../third_party/bounds_checking_function/include", ] } diff --git a/kernel/arch/arm/cortex-m4/gcc/BUILD.gn b/kernel/arch/arm/cortex-m4/gcc/BUILD.gn index d97c5a6d..aa74aaec 100644 --- a/kernel/arch/arm/cortex-m4/gcc/BUILD.gn +++ b/kernel/arch/arm/cortex-m4/gcc/BUILD.gn @@ -41,7 +41,6 @@ static_library("arch") { "../../../../../kernel/arch/include", "../../../../../kernel/include", "../../../../../utils", - "./", - "//third_party/bounds_checking_function/include", + "../../../../../third_party/bounds_checking_function/include", ] } diff --git a/kernel/arch/arm/cortex-m7/gcc/BUILD.gn b/kernel/arch/arm/cortex-m7/gcc/BUILD.gn index d289c391..f5c33905 100644 --- a/kernel/arch/arm/cortex-m7/gcc/BUILD.gn +++ b/kernel/arch/arm/cortex-m7/gcc/BUILD.gn @@ -40,7 +40,6 @@ static_library("arch") { "../../../../../kernel/arch/include", "../../../../../kernel/include", "../../../../../utils", - "./", - "//third_party/bounds_checking_function/include", + "../../../../../third_party/bounds_checking_function/include", ] } diff --git a/kernel/arch/risc-v/riscv32/gcc/BUILD.gn b/kernel/arch/risc-v/riscv32/gcc/BUILD.gn index 03d5a9cb..4d9e0173 100644 --- a/kernel/arch/risc-v/riscv32/gcc/BUILD.gn +++ b/kernel/arch/risc-v/riscv32/gcc/BUILD.gn @@ -40,8 +40,7 @@ static_library("arch") { "../../../../../kernel/arch/include", "../../../../../kernel/include", "../../../../../utils", - "./", - "./asm", - "//third_party/bounds_checking_function/include", + "asm", + "../../../../../third_party/bounds_checking_function/include", ] } diff --git a/third_party/FatFs b/third_party/FatFs new file mode 160000 index 00000000..fb2d8394 --- /dev/null +++ b/third_party/FatFs @@ -0,0 +1 @@ +Subproject commit fb2d8394023a6eef12c5bd3eda8978f5e294e070 diff --git a/utils/BUILD.gn b/utils/BUILD.gn index 86fa3693..a913baf3 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -36,7 +36,6 @@ static_library("utils") { include_dirs = [ "../kernel/include", "../kernel/arch/include", - "./", - "//third_party/bounds_checking_function/include", + "../third_party/bounds_checking_function/include", ] }