同步官方代码,增加 jffs2 编译选项

    鸿蒙研究站 | http://weharmonyos.com (国内)
              | https://weharmony.github.io (国外)
    论坛 | http://bbs.weharmonyos.com
    文档中心 | http://open.weharmonyos.com
    参考手册 | http://doxygen.weharmonyos.com
上级 a36d85cc
......@@ -15,7 +15,7 @@
-->
<!--
This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
This is the configuration file template for OpenHarmony OSS Audit Tool. Please copy it to your project root dir and modify it by referring to OpenHarmony/tools_oat/README.
-->
<configuration>
......@@ -23,7 +23,7 @@
<licensefile></licensefile>
<policylist>
<policy name="projectPolicy" desc="">
<policyitem type="copyright" name="Huawei Technologies Co., Ltd. All rights reserved." path=".*" desc="original liteos copyright"/>
<policyitem type="copyright" name="Huawei Device Co., Ltd. All rights reserved." path=".*" desc="original liteos copyright"/>
<policyitem type="license" name="BSD-3-Clause" path=".*" desc="Liteos kernel use bsd3 license"/>
</policy>
</policylist>
......@@ -38,7 +38,7 @@
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
</filefilter>
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
<filefilter name="defaultPolicyFilter" desc="Filters for license header policies">
<!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
......
......@@ -198,6 +198,8 @@
### 四大码仓发布 | 源码同步官方
内核注解同时在 [gitee](https://gitee.com/weharmony/kernel_liteos_a_note) | [github](https://github.com/kuangyufei/kernel_liteos_a_note) | [coding](https://weharmony.coding.net/public/harmony/kernel_liteos_a_note/git/files) | [gitcode](https://gitcode.net/kuangyufei/kernel_liteos_a_note) 发布,并与官方源码按月保持同步,同步历史如下:
* `2022/06/03` -- 增加 jffs2 编译选项
* `2022/05/09` -- 标准库(musl , newlib) 目录调整
* `2022/04/16` -- 任务调度模块有很大更新
* `2022/03/23` -- 新增各CPU核自主管理中断, 定时器模块较大调整
......
......@@ -33,6 +33,7 @@ group("fs") {
deps = [
"fat",
"fat/virpart",
"jffs2",
"nfs",
"patchfs",
"proc",
......
......@@ -31,19 +31,86 @@ import("//kernel/liteos_a/liteos.gni")
module_switch = defined(LOSCFG_FS_JFFS)
module_name = get_path_info(rebase_path("."), "name")
linux_path = rebase_path("//kernel/linux/linux-5.10")
out_path = rebase_path(target_out_dir)
kernel_module(module_name) {
patch_path = rebase_path(".")
cmd = "if [ -d ${out_path}/jffs2_build ]; then rm -r ${out_path}/jffs2_build; fi && mkdir -p ${out_path}/jffs2_build/fs"
cmd += " && cp ${linux_path}/fs/jffs2 ${out_path}/jffs2_build/fs/. -r"
cmd += " && pushd ${out_path}/jffs2_build/"
cmd += " && patch -p1 < ${patch_path}/jffs2.patch && popd"
exec_script("//build/lite/run_shell_cmd.py", [ cmd ])
sources = [
"src/jffs2_hash.c",
"src/vfs_jffs2.c",
]
sources += LINUX_KERNEL_FS_JFFS2_SRC_FILES
sources += [
"${out_path}/jffs2_build/fs/jffs2/background.c",
"${out_path}/jffs2_build/fs/jffs2/build.c",
"${out_path}/jffs2_build/fs/jffs2/compr.c",
"${out_path}/jffs2_build/fs/jffs2/compr_rtime.c",
"${out_path}/jffs2_build/fs/jffs2/compr_rubin.c",
"${out_path}/jffs2_build/fs/jffs2/compr_zlib.c",
"${out_path}/jffs2_build/fs/jffs2/debug.c",
"${out_path}/jffs2_build/fs/jffs2/dir.c",
"${out_path}/jffs2_build/fs/jffs2/erase.c",
"${out_path}/jffs2_build/fs/jffs2/file.c",
"${out_path}/jffs2_build/fs/jffs2/fs.c",
"${out_path}/jffs2_build/fs/jffs2/gc.c",
"${out_path}/jffs2_build/fs/jffs2/malloc.c",
"${out_path}/jffs2_build/fs/jffs2/nodelist.c",
"${out_path}/jffs2_build/fs/jffs2/nodemgmt.c",
"${out_path}/jffs2_build/fs/jffs2/read.c",
"${out_path}/jffs2_build/fs/jffs2/readinode.c",
"${out_path}/jffs2_build/fs/jffs2/scan.c",
"${out_path}/jffs2_build/fs/jffs2/summary.c",
"${out_path}/jffs2_build/fs/jffs2/super.c",
"${out_path}/jffs2_build/fs/jffs2/write.c",
"${out_path}/jffs2_build/fs/jffs2/writev.c",
]
include_dirs = LINUX_KERNEL_FS_JFFS2_INCLUDE_DIRS
include_dirs = [
"${out_path}/jffs2_build/fs",
"${out_path}/jffs2_build/fs/jffs2",
]
public_configs = [ ":public" ]
deps = [ ":cp_jffs2_src" ]
}
config("public") {
include_dirs = [ "include" ]
}
action("cp_jffs2_src") {
script = "//build/lite/run_shell_cmd.py"
outputs = [
"${target_out_dir}/jffs2_build/fs/jffs2/background.c",
"${target_out_dir}/jffs2_build/fs/jffs2/build.c",
"${target_out_dir}/jffs2_build/fs/jffs2/compr.c",
"${target_out_dir}/jffs2_build/fs/jffs2/compr_rtime.c",
"${target_out_dir}/jffs2_build/fs/jffs2/compr_rubin.c",
"${target_out_dir}/jffs2_build/fs/jffs2/compr_zlib.c",
"${target_out_dir}/jffs2_build/fs/jffs2/debug.c",
"${target_out_dir}/jffs2_build/fs/jffs2/dir.c",
"${target_out_dir}/jffs2_build/fs/jffs2/erase.c",
"${target_out_dir}/jffs2_build/fs/jffs2/file.c",
"${target_out_dir}/jffs2_build/fs/jffs2/fs.c",
"${target_out_dir}/jffs2_build/fs/jffs2/gc.c",
"${target_out_dir}/jffs2_build/fs/jffs2/malloc.c",
"${target_out_dir}/jffs2_build/fs/jffs2/nodelist.c",
"${target_out_dir}/jffs2_build/fs/jffs2/nodemgmt.c",
"${target_out_dir}/jffs2_build/fs/jffs2/read.c",
"${target_out_dir}/jffs2_build/fs/jffs2/readinode.c",
"${target_out_dir}/jffs2_build/fs/jffs2/scan.c",
"${target_out_dir}/jffs2_build/fs/jffs2/summary.c",
"${target_out_dir}/jffs2_build/fs/jffs2/super.c",
"${target_out_dir}/jffs2_build/fs/jffs2/write.c",
"${target_out_dir}/jffs2_build/fs/jffs2/writev.c",
]
}
......@@ -31,13 +31,51 @@ include $(LITEOSTOPDIR)/config.mk
MODULE_NAME := $(notdir $(shell pwd))
LOCAL_SRCS := $(wildcard src/*.c) \
$(wildcard $(LITEOSTOPDIR)/../linux/linux-5.10/fs/jffs2/*.c)
LINUX_PATH := $(LITEOSTOPDIR)/../linux/linux-5.10
LOCAL_PATH := $(shell pwd)
TEMP_SRC_PATH := $(OUT)/jffs2_build
LOCAL_SRCS := \
$(TEMP_SRC_PATH)/fs/jffs2/background.c \
$(TEMP_SRC_PATH)/fs/jffs2/build.c \
$(TEMP_SRC_PATH)/fs/jffs2/compr.c \
$(TEMP_SRC_PATH)/fs/jffs2/compr_rtime.c \
$(TEMP_SRC_PATH)/fs/jffs2/compr_rubin.c \
$(TEMP_SRC_PATH)/fs/jffs2/compr_zlib.c \
$(TEMP_SRC_PATH)/fs/jffs2/debug.c \
$(TEMP_SRC_PATH)/fs/jffs2/dir.c \
$(TEMP_SRC_PATH)/fs/jffs2/erase.c \
$(TEMP_SRC_PATH)/fs/jffs2/file.c \
$(TEMP_SRC_PATH)/fs/jffs2/fs.c \
$(TEMP_SRC_PATH)/fs/jffs2/gc.c \
$(TEMP_SRC_PATH)/fs/jffs2/malloc.c \
$(TEMP_SRC_PATH)/fs/jffs2/nodelist.c \
$(TEMP_SRC_PATH)/fs/jffs2/nodemgmt.c \
$(TEMP_SRC_PATH)/fs/jffs2/read.c \
$(TEMP_SRC_PATH)/fs/jffs2/readinode.c \
$(TEMP_SRC_PATH)/fs/jffs2/scan.c \
$(TEMP_SRC_PATH)/fs/jffs2/summary.c \
$(TEMP_SRC_PATH)/fs/jffs2/super.c \
$(TEMP_SRC_PATH)/fs/jffs2/write.c \
$(TEMP_SRC_PATH)/fs/jffs2/writev.c \
$(LOCAL_PATH)/src/jffs2_hash.c \
$(LOCAL_PATH)/src/vfs_jffs2.c \
LOCAL_INCLUDE := \
-I $(LITEOSTOPDIR)/fs/jffs2/include \
-I $(LITEOSTOPDIR)/../linux/linux-5.10/fs/jffs2 \
-I $(LITEOSTOPDIR)/../linux/linux-5.10/fs
-I $(TEMP_SRC_PATH)/fs/jffs2 \
-I $(TEMP_SRC_PATH)/fs
LOCAL_FLAGS := $(LOCAL_INCLUDE)
.PHONY: patch patch_clean
$(LOCAL_SRCS): patch
patch: patch_clean
cp $(LINUX_PATH)/fs/jffs2 $(TEMP_SRC_PATH)/fs/. -r
cd $(TEMP_SRC_PATH) && patch -p1 < $(LOCAL_PATH)/jffs2.patch
patch_clean:
$(HIDE) $(RM) -rf $(TEMP_SRC_PATH)
include $(MODULE)
此差异已折叠。
git add -A
git commit -m ' 上传百篇博客离线文档
git commit -m ' 同步官方代码,增加 jffs2 编译选项
鸿蒙研究站 | http://weharmonyos.com (国内)
| https://weharmony.github.io (国外)
论坛 | http://bbs.weharmonyos.com
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册