diff --git a/.gitmodules b/.gitmodules index eb2ce7cdeb479923ddd9177debd1c4cd7079db6d..179e90c3b050574850f1902fe34366d71750c60c 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 35e88fcb38257e94e22d43df287a71c7ba0920f0..b8304d459c057dc8ba959be3ef377c2076896737 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 c6839eac18ca75c7b986f0d867cb66db4439e70b..b4cb0a9e4d9630980acde4b92cbcbaced9e65346 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 d74632fc13d23b07007d2afb3c6cf0ba76c40bc5..2cb08a2879796dfbfcc8031ff744fa36554e2b23 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 acd1d0866db0a47f8481e16575ed3ab3a8cb5b16..70354d7ed42f96c9bc8f06f2706dafcef1dee5f8 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 3550c550d8b6fdf74c39eeecc10981190eeb10e7..65b15890bbb167b67cfccb218c3886fae3f3ea07 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 ee0075cdf17ef3a4fcfe0d992047c0073e0b3afc..67a394960a8ab1b8aec103cac234a9ff84a264f0 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 363bc8a97b9da9a6fcc2980443d493546fc0edba..2bf57118ba1c154031c7cfb5a92426e8ccf965a4 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 f1a1860993cec2cd4dae11a0a0a75c5456a63fa0..97dc73814c054e4b7758c98ed23f96eb6ebb3eeb 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 8fc2ca82ac535e2bc20e9b34ae8eb708d8829052..41277fe93a2a3e3807e08b5979b0001d00f217bf 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 1853f6388627b705419c4d87508f985fcf46853d..d86c5a8c2c77cc7e24402776e80ef2ed51f08d03 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 d289c391f75ed7d3f66227d4aa74dedabb2c518b..f5c339059f47614eaba68ae2033229891690c59e 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 d97c5a6d86729ec78dc11f08235d40607cf3aa2f..aa74aaec3e847cc3edc41115918d0f3355c5c06b 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 d289c391f75ed7d3f66227d4aa74dedabb2c518b..f5c339059f47614eaba68ae2033229891690c59e 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 03d5a9cb55fc5f2309b685e8670f6c3790675237..4d9e0173fba59dbcc6675b9a0870c6057c6e411b 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 0000000000000000000000000000000000000000..fb2d8394023a6eef12c5bd3eda8978f5e294e070 --- /dev/null +++ b/third_party/FatFs @@ -0,0 +1 @@ +Subproject commit fb2d8394023a6eef12c5bd3eda8978f5e294e070 diff --git a/utils/BUILD.gn b/utils/BUILD.gn index 86fa3693203086f1b196c519fd33324eafa52006..a913baf3a570013288ad2ef5a447b4c0c75fa1d0 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", ] }