Merge pull request !82 from 朱佳鑫/ko
This commit is contained in:
openharmony_ci
2023-11-27 10:41:12 +00:00
committed by Gitee
6 changed files with 92 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
group("ko_build") {
deps = [ "module_sample:ko_sample" ]
}
+1
View File
@@ -6,5 +6,6 @@
./memory_security/
./code_sign
./container_escape_detection
./module_sample
As for the specific use of the licenses, please refer to the relevant description in the documents.
+4 -1
View File
@@ -56,7 +56,7 @@ Note:If the text contains special characters, please escape them according to th
<configuration>
<oatconfig>
<policylist>
<policy name="newipPolicy" desc="New IP protocol stack">
<policy name="projectPolicy" desc="">
<policyitem type="compatibility" name="GPL" path="newip/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="compatibility" name="GPL" path="xpm/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="compatibility" name="GPL" path="memory_security/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
@@ -64,6 +64,7 @@ Note:If the text contains special characters, please escape them according to th
<policyitem type="compatibility" name="GPL" path="ucollection/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="compatibility" name="GPL" path="code_sign/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="compatibility" name="GPL" path="container_escape_detection/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="compatibility" name="GPL" path="module_sample/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="license" name="GPL" path="newip/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="license" name="GPL" path="xpm/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="license" name="GPL" path="memory_security/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
@@ -71,6 +72,7 @@ Note:If the text contains special characters, please escape them according to th
<policyitem type="license" name="GPL" path="ucollection/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="license" name="GPL" path="code_sign/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="license" name="GPL" path="container_escape_detection/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
<policyitem type="license" name="GPL" path="module_sample/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
</policy>
</policylist>
<filefilterlist>
@@ -78,6 +80,7 @@ Note:If the text contains special characters, please escape them according to th
<filteritem type="filepath" name="LICENSES-GPL-2.0" desc="license file"/>
<filteritem type="filepath" name="LICENSES-Linux-syscall-note" desc="license file"/>
<filteritem type="filepath" name="newip/third_party/.*" desc="third party code path"/>
<filteritem type="filepath" name="BUILD.gn" desc="build file"/>
</filefilter>
<filefilter name="defaultPolicyFilter" desc="Files that do not need to be applied specified policy, will be merged with the filter items which has the same filefilter name">
<filteritem type="filepath" name="LICENSE" desc="license file"/>
+22
View File
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2023 Huawei Device Co., Ltd.
#
# ko build sample
#
# Author: z-jax <zhujiaxin@huawei.com>
#
# Data: 2023-11-25
#
import("//build/templates/kernel/ohos_kernel_build.gni")
ohos_build_ko("ko_sample") {
sources = [
"ko_sample.c",
"sample_fun.c",
]
target_ko_name = "kosample"
device_name = device_name
device_arch = "arm64"
}
+29
View File
@@ -0,0 +1,29 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
*
* ko sample
*
* Author: z-jax <zhujiaxin@huawei.com>
*
* Data: 2023-11-25
*/
#include <linux/init.h>
#include <linux/module.h>
static int kosample_init(void)
{
pr_err("ko sample: %s\n", __func__);
return 0;
}
static void kosample_exit(void)
{
pr_err("ko sample: %s\n", __func__);
}
module_init(kosample_init);
module_exit(kosample_exit);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("z-jax <zhujiaxin@huawei.com>");
+20
View File
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
*
* ko sample
*
* Author: z-jax <zhujiaxin@huawei.com>
*
* Data: 2023-11-25
*/
#include <linux/init.h>
#include <linux/module.h>
int kosample_fun(void)
{
pr_info("ko sample call: %s\n", __func__);
return 0;
}