diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/.gitignore b/os/OpenHarmony/khzg_patch/applications/sample/camera/.gitignore
new file mode 100755
index 0000000000000000000000000000000000000000..140896ac17e49c458f2edcb3a501ad8850e0ef1a
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/.gitignore
@@ -0,0 +1,2 @@
+communication
+screensaver
\ No newline at end of file
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/LICENSE b/os/OpenHarmony/khzg_patch/applications/sample/camera/LICENSE
new file mode 100755
index 0000000000000000000000000000000000000000..4a459866a57c25462afad17f3fe0b50d440da080
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/OAT.xml b/os/OpenHarmony/khzg_patch/applications/sample/camera/OAT.xml
new file mode 100755
index 0000000000000000000000000000000000000000..3a49a278b19c2094483162b66db0c0856ebd85ca
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/OAT.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/README.md b/os/OpenHarmony/khzg_patch/applications/sample/camera/README.md
new file mode 100755
index 0000000000000000000000000000000000000000..53747888909678e806dffc245481940bbddaa81a
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/README.md
@@ -0,0 +1,55 @@
+# CAMERA\_SAMPLE\_APP
+
+- [Introduction](#section11660541593)
+- [Directory Structure](#section176641621345)
+- [Usage](#section1648194512427)
+- [Constraints](#section722512541395)
+- [Repositories Involved](#section16511040154318)
+
+## Introduction
+
+This repository provides media-related applications, such as the home screen and settings.
+
+**Figure 1** Position of this repository \(in the dotted blue box\) in the multimedia subsystem
+-in-the-multimedia-subsystem.png "position-of-this-repository-(in-the-dotted-blue-box)-in-the-multimedia-subsystem")
+
+## Directory Structure
+
+```
+applications/sample/camera
+├── cameraApp # Camera app
+├── gallery # Photo gallery
+├── launcher # Home screen
+├── media # Apps of photographing, video recording, and audio and video playback
+└── setting # Settings
+```
+
+## Usage
+
+Build a single repository in the root directory.
+
+```
+# Select the development board.
+hb set
+# Build this repository.
+hb build camera_lite
+```
+
+## Constraints
+
+C++ 11 or later
+
+## Repositories Involved
+
+[Multimedia subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/multimedia.md)
+
+[camera\_lite](https://gitee.com/openharmony/multimedia_camera_lite)
+
+[media\_utils\_lite](https://gitee.com/openharmony/multimedia_utils_lite)
+
+[audio\_lite](https://gitee.com/openharmony/multimedia_audio_lite)
+
+[media\_lite](https://gitee.com/openharmony/multimedia_media_lite)
+
+[camera\_sample\_lite](https://gitee.com/openharmony/applications_sample_camera)
+**camera\_sample\_lite**
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/README_zh.md b/os/OpenHarmony/khzg_patch/applications/sample/camera/README_zh.md
new file mode 100755
index 0000000000000000000000000000000000000000..d29c3c5f7894b7a0df57da6c35169550ed43c59f
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/README_zh.md
@@ -0,0 +1,56 @@
+# 媒体子系统CAMERA\_SAMPLE\_APP组件
+
+- [简介](#section11660541593)
+- [目录](#section176641621345)
+- [使用说明](#section1648194512427)
+- [约束](#section722512541395)
+- [相关仓](#section16511040154318)
+
+## 简介
+
+CAMERA\_SAMPLE\_APP组件,提供媒体能力开发的相关应用,提供桌面应用和设置应用。
+
+**图 1** 媒体子系统架构(蓝色虚线框是sample\_app)
+.png "媒体子系统架构(蓝色虚线框是sample_app)")
+
+## 目录
+
+```
+applications/sample/camera
+├── cameraApp 相机应用
+├── gallery 图库应用
+├── launcher 桌面应用
+├── media 拍照录像应用和音视频播放应用
+└── setting 设置
+```
+
+## 使用说明
+
+单仓的编译构建,在根目录下进行单仓的构建和编译
+
+```
+# 开发板选择
+hb set
+# 单仓构建和编译
+hb build camera_lite
+```
+
+## 约束
+
+C++11版本或以上
+
+## 相关仓
+
+[媒体子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E5%AA%92%E4%BD%93%E5%AD%90%E7%B3%BB%E7%BB%9F.md)
+
+[camera\_lite](https://gitee.com/openharmony/multimedia_camera_lite)
+
+[media\_utils\_lite](https://gitee.com/openharmony/multimedia_utils_lite)
+
+[audio\_lite](https://gitee.com/openharmony/multimedia_audio_lite)
+
+[media\_lite](https://gitee.com/openharmony/multimedia_media_lite)
+
+[camera\_sample\_lite](https://gitee.com/openharmony/applications_sample_camera)
+
+
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/bundle.json b/os/OpenHarmony/khzg_patch/applications/sample/camera/bundle.json
new file mode 100755
index 0000000000000000000000000000000000000000..d3f1f0dbd05d51dc6d71051b27af193dce089662
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/bundle.json
@@ -0,0 +1,58 @@
+{
+ "name": "@ohos/camera_sample_app",
+ "description": "Camera related samples.",
+ "version": "3.1",
+ "license": "Apache License 2.0",
+ "publishAs": "code-segment",
+ "segment": {
+ "destPath": "applications/sample/camera"
+ },
+ "dirs": {},
+ "scripts": {},
+ "component": {
+ "name": "camera_sample_app",
+ "subsystem": "applications",
+ "syscap": [],
+ "features": [],
+ "adapted_system_type": [
+ "small"
+ ],
+ "rom": "",
+ "ram": "",
+ "deps": {
+ "components": [
+ "ability_lite",
+ "bundle_framework_lite",
+ "surface_lite",
+ "ui_lite",
+ "graphic_utils_lite",
+ "kv_store",
+ "syspara_lite",
+ "camera_lite",
+ "media_lite",
+ "permission",
+ "samgr_lite",
+ "utils_base"
+ ],
+ "third_party": [
+ "bounds_checking_function",
+ "wpa_supplicant"
+ ]
+ },
+ "build": {
+ "sub_component": [
+ "//applications/sample/camera/launcher:launcher_hap",
+ "//applications/sample/camera/cameraApp:cameraApp_hap",
+ "//applications/sample/camera/setting:setting_hap",
+ "//applications/sample/camera/gallery:gallery_hap",
+ "//applications/sample/camera/gallery:test_jpeg",
+ "//applications/sample/camera/media:media_sample",
+ "//applications/sample/camera/npu:npu_hap",
+ "//applications/sample/camera/lio:lio_sample",
+ "//applications/sample/camera/audio_test:audio_test_hap"
+ ],
+ "inner_kits": [],
+ "test": []
+ }
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/BUILD.gn b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..f62ce45cb77e0290643a961b4928ba70b431d580
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/BUILD.gn
@@ -0,0 +1,71 @@
+# Copyright (c) 2020 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.
+
+import("//build/lite/config/hap_pack.gni")
+
+shared_library("cameraApp") {
+ sources = [
+ "cameraApp/src/main/cpp/camera_ability.cpp",
+ "cameraApp/src/main/cpp/camera_ability_slice.cpp",
+ "cameraApp/src/main/cpp/camera_manager.cpp",
+ ]
+
+ deps = [
+ "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
+ "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
+ "//foundation/arkui/ui_lite:ui_lite",
+ "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store:kv_store",
+ "//foundation/graphic/graphic_utils_lite:utils_lite",
+ "//foundation/graphic/surface_lite",
+ "//foundation/multimedia/camera_lite/frameworks:camera_lite",
+ "//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite",
+ "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
+ "//drivers/peripheral/display/hal:hdi_display",
+ ]
+
+ include_dirs = [
+ "cameraApp/src/main/cpp",
+ "${aafwk_lite_path}/interfaces/kits/ability_lite",
+ "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
+ "${aafwk_lite_path}/interfaces/kits/want_lite",
+ "//foundation/multimedia/camera_lite/interfaces/kits",
+ "//foundation/multimedia/camera_lite/interfaces/kits",
+ "//foundation/arkui/ui_lite/frameworks",
+ "//foundation/arkui/ui_lite/frameworks/imgdecode",
+ ]
+ ldflags = [
+ "-L$ohos_root_path/sysroot/usr/lib",
+ "-Wl,-rpath-link=$ohos_root_path/sysroot/usr/lib",
+ "-lstdc++",
+ "-lcamera_lite",
+ "-lsurface",
+ "-lrecorder_lite",
+ "-ldisplay_layer",
+ ]
+ defines = [
+ "ENABLE_WINDOW=1",
+ "ABILITY_WINDOW_SUPPORT",
+ ]
+}
+
+hap_pack("cameraApp_hap") {
+ deps = [ ":cameraApp" ]
+ mode = "hap"
+ json_path = "cameraApp/src/main/config.json"
+ ability_so_path = "$root_out_dir/libcameraApp.so"
+ force = "true"
+ cert_profile = "cert/camera_AppProvision_Release.p7b"
+ resources_path = "cameraApp/src/main/resources"
+ hap_name = "cameraApp"
+ privatekey = "HOS Application Provision Release"
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/config.json b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/config.json
new file mode 100755
index 0000000000000000000000000000000000000000..af152f48936f4e093f4ff50c29947e3520dcb4ce
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/config.json
@@ -0,0 +1,99 @@
+{
+ "app": {
+ "bundleName": "com.huawei.camera",
+ "vendor": "huawei",
+ "version": {
+ "code": 2,
+ "name": "2"
+ },
+ "apiVersion": {
+ "compatible": 3,
+ "target": 4
+ }
+ },
+ "deviceConfig": {
+ "default": {
+ }
+ },
+ "module": {
+ "package": "com.huawei.camera",
+ "name": ".MyHarmonyAbilityPackage",
+ "deviceType": [
+ "phone",
+ "tv",
+ "tablet",
+ "pc",
+ "car",
+ "smartWatch",
+ "sportsWatch",
+ "smartVision"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "cameraApp",
+ "moduleType": "entry"
+ },
+ "abilities": [
+ {
+ "name": "CameraAbility",
+ "icon": "assets/cameraApp/resources/base/media/camera.png",
+ "label": "test app 1",
+ "launchType": "standard",
+ "type": "page",
+ "visible": true
+ }
+ ],
+ "reqPermissions": [
+ {
+ "name": "ohos.permission.CAMERA",
+ "reason": "USER_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ },
+ {
+ "name": "ohos.permission.MODIFY_AUDIO_SETTINGS",
+ "reason": "SYSTEM_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ },
+ {
+ "name": "ohos.permission.READ_MEDIA",
+ "reason": "USER_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ },
+ {
+ "name": "ohos.permission.MICROPHONE",
+ "reason": "USER_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ },
+ {
+ "name": "ohos.permission.WRITE_MEDIA",
+ "reason": "USER_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ }
+ ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..1019fd0fc897c5a3d5843d904ad2ab02a17d172b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability.h
new file mode 100755
index 0000000000000000000000000000000000000000..3cae2bc5effca6ef1d7dcbe40eccf3c796f80062
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..b2f051e2d306b0064b4b24cda1f7bc7ef84e5d9c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..92a9dd8775d6631e62054b25ee210a2af3a082d4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_manager.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_manager.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..f00a6638a966ca79ecbfddb4db6343cc650b07ab
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_manager.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_manager.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..674254bf928ae83e74b6ffcd7596c8880f710d8f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/camera_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/event_listener.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/event_listener.h
new file mode 100755
index 0000000000000000000000000000000000000000..1b08540f18ecd1fcc6d6d7930b6a7931ef90ae96
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/event_listener.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/ui_config.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/ui_config.h
new file mode 100755
index 0000000000000000000000000000000000000000..6aa335c33a7b05e9c995e0b230aaf53227ebe515
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/cpp/ui_config.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/camera.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/camera.png
new file mode 100755
index 0000000000000000000000000000000000000000..b8ad44638e90f42ab8def211241d624bfe90dfcb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/camera.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/camera_open_fail.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/camera_open_fail.png
new file mode 100755
index 0000000000000000000000000000000000000000..71f4dff58b12d4e6d65de56401589844f62f9786
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/camera_open_fail.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_back.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_back.png
new file mode 100755
index 0000000000000000000000000000000000000000..8a16a4e501fdac2880e8c0646b03dec1ae7f6a2b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_back.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_photo.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_photo.png
new file mode 100755
index 0000000000000000000000000000000000000000..6746636acb693ead080d845ad8dcdaa268744b1e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_photo.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record.png
new file mode 100755
index 0000000000000000000000000000000000000000..f55834d8d33f0b592b1cf70e41b12549fe044a22
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_camra.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_camra.png
new file mode 100755
index 0000000000000000000000000000000000000000..d21af50a235364c5165ddda803affe4f4b3710ff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_camra.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_continue.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_continue.png
new file mode 100755
index 0000000000000000000000000000000000000000..576b33db1f35bfda2830641a1788fbe63533f77c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_continue.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_pause.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_pause.png
new file mode 100755
index 0000000000000000000000000000000000000000..7e10f05b18cccdbb858cbaf472e9db92119f5f20
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_pause.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_shutter.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_shutter.png
new file mode 100755
index 0000000000000000000000000000000000000000..c40c8103bdac8cd8be01a5da43555d24caa65643
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_shutter.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_stop.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_stop.png
new file mode 100755
index 0000000000000000000000000000000000000000..1f21c84443d0302abfc6c2896c1ade08398d94a0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_record_stop.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_shutter.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_shutter.png
new file mode 100755
index 0000000000000000000000000000000000000000..193bea970984cb59f15d810dc49b458b1cfd165d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_shutter.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_video.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_video.png
new file mode 100755
index 0000000000000000000000000000000000000000..44c5a1ce0fbe1b644c92f42198a53b4ad8a3e1c8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_camera_video.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_timer.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_timer.png
new file mode 100755
index 0000000000000000000000000000000000000000..03041ca48828aeefaca1aa85a45e3aa5be50cbc1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/ic_timer.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/loading.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/loading.png
new file mode 100755
index 0000000000000000000000000000000000000000..af9ff49350083629bbbfec08a284480ed56b9c89
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cameraApp/src/main/resources/base/media/loading.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cert/camera_AppProvision_Release.p7b b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cert/camera_AppProvision_Release.p7b
new file mode 100755
index 0000000000000000000000000000000000000000..339e6ba3d9a1a793d003ba130d4de5f701bc3a56
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/cameraApp/cert/camera_AppProvision_Release.p7b differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/BUILD.gn b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..b9029ebaa81f3fe999868d85026701d544296a01
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/BUILD.gn
@@ -0,0 +1,104 @@
+# Copyright (c) 2020 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.
+
+import("//build/lite/config/hap_pack.gni")
+
+config("hilog_dir") {
+ include_dirs =
+ [ "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog/" ]
+}
+config("hilog_lite_dir") {
+ include_dirs =
+ [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite/" ]
+}
+
+shared_library("gallery") {
+ sources = [
+ "src/gallery_ability.cpp",
+ "src/gallery_ability_slice.cpp",
+ "src/picture_ability_slice.cpp",
+ "src/player_ability_slice.cpp",
+ "src/image_decoder.cpp",
+ ]
+
+ include_dirs = [
+ "include",
+ "${aafwk_lite_path}/interfaces/kits/ability_lite",
+ "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
+ "${aafwk_lite_path}/interfaces/kits/want_lite",
+ "//foundation/multimedia/media_lite/interfaces/kits/player_lite",
+ "//foundation/arkui/ui_lite/frameworks",
+ ]
+
+ deps = [
+ "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
+ "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
+ "//foundation/arkui/ui_lite:ui_lite",
+ "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store:kv_store",
+ "//foundation/graphic/graphic_utils_lite:utils_lite",
+ "//foundation/graphic/surface_lite",
+ "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite",
+ "//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite",
+ "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
+ ]
+
+ ldflags = [ "-shared" ]
+
+ ldflags += [ "-lstdc++" ]
+ ldflags += [ "-lpthread" ]
+ ldflags += [ "-L$ohos_root_path/sysroot/usr/lib" ]
+ ldflags += [ "-Wl,-rpath-link=$ohos_root_path/sysroot/usr/lib" ]
+ ldflags += [
+ "-lui",
+ "-lsurface",
+ "-lplayer_lite",
+ "-lability",
+ ]
+
+ defines = [
+ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER",
+ "ENABLE_WINDOW=1",
+ "ABILITY_WINDOW_SUPPORT",
+ "HILOG_ENABLE",
+ ]
+
+ # image decode for jpeg/png
+ deps += [
+ "//third_party/libjpeg-turbo:libjpeg",
+ "//third_party/libpng:libpng",
+ ]
+ defines += [
+ "ENABLE_JPEG = 1",
+ "ENABLE_PNG = 1",
+ ]
+}
+
+copy("test_jpeg") {
+ sources = [
+ "resources/photos/photo1.jpeg",
+ "resources/photos/photo2.jpeg"
+ ]
+ outputs = [ "${root_out_dir}/system/internal/{{source_file_part}}" ]
+}
+
+hap_pack("gallery_hap") {
+ deps = [ ":gallery" ]
+ mode = "hap"
+ json_path = "config.json"
+ ability_so_path = "$root_out_dir/libgallery.so"
+ force = "true"
+ cert_profile = "cert/gallery_AppProvision_Release.p7b"
+ resources_path = "resources"
+ hap_name = "gallery"
+ privatekey = "HOS Application Provision Release"
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/cert/gallery_AppProvision_Release.p7b b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/cert/gallery_AppProvision_Release.p7b
new file mode 100755
index 0000000000000000000000000000000000000000..2914473a46eb45143d3900de0147d165c162b9f6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/cert/gallery_AppProvision_Release.p7b differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/config.json b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/config.json
new file mode 100755
index 0000000000000000000000000000000000000000..b0bcaf8ca326fde74fe15489a9c76ae852e1b0d5
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/config.json
@@ -0,0 +1,99 @@
+{
+ "app": {
+ "bundleName": "com.huawei.gallery",
+ "vendor": "huawei",
+ "version": {
+ "code": 1,
+ "name": "1.0"
+ },
+ "apiVersion": {
+ "compatible": 3,
+ "target": 4
+ }
+ },
+ "deviceConfig": {
+ "default": {
+ }
+ },
+ "module": {
+ "package": "com.huawei.gallery",
+ "name": ".MyHarmonyAbilityPackage",
+ "deviceType": [
+ "phone",
+ "tv",
+ "tablet",
+ "pc",
+ "car",
+ "smartWatch",
+ "sportsWatch",
+ "smartVision"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "gallery",
+ "moduleType": "entry"
+ },
+ "abilities": [
+ {
+ "name": "GalleryAbility",
+ "icon": "assets/gallery/resources/drawable/com.huawei.photos.png",
+ "label": "test app 1",
+ "launchType": "standard",
+ "type": "page",
+ "visible": true
+ }
+ ],
+ "reqPermissions": [
+ {
+ "name": "ohos.permission.MODIFY_AUDIO_SETTINGS",
+ "reason": "SYSTEM_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ },
+ {
+ "name": "ohos.permission.READ_MEDIA",
+ "reason": "USER_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ },
+ {
+ "name": "ohos.permission.READ_MEDIA_AUDIO",
+ "reason": "USER_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ },
+ {
+ "name": "ohos.permission.READ_MEDIA_IMAGES",
+ "reason": "USER_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ },
+ {
+ "name": "ohos.permission.READ_MEDIA_VIDEO",
+ "reason": "USER_GRANT",
+ "usedScene": {
+ "ability": [
+ ".FormAbility"
+ ],
+ "when": "inuse"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/event_listener.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/event_listener.h
new file mode 100755
index 0000000000000000000000000000000000000000..bbcbe6f4817acbf58705e93401412573d361ff39
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/event_listener.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_ability.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_ability.h
new file mode 100755
index 0000000000000000000000000000000000000000..6e51651cef807d402603e68b3980fbf5eff78076
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_ability.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..536c9eb6eec8fd80de99f35e6d72f5b8ba5c611c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_config.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_config.h
new file mode 100755
index 0000000000000000000000000000000000000000..384d14d16ec7667b43fce3b58d9cc6690b5d0eaa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_config.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_log.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_log.h
new file mode 100755
index 0000000000000000000000000000000000000000..af00cf97d099bcd095523116af17015984104084
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/gallery_log.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/image_decoder.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/image_decoder.h
new file mode 100755
index 0000000000000000000000000000000000000000..6675dd1afafc97f95507848a6b9732b90d1014d8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/image_decoder.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/picture_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/picture_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..7139d7ac163c90dd0193748909ec6123224fba80
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/picture_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/player_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/player_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..d2a44998d24eb258ed260b0256c015e141351daa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/include/player_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/bg_gradient_mask.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/bg_gradient_mask.png
new file mode 100755
index 0000000000000000000000000000000000000000..ad132c18be75169732188981e62190c83c95af85
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/bg_gradient_mask.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/com.huawei.photos.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/com.huawei.photos.png
new file mode 100755
index 0000000000000000000000000000000000000000..0b262f62ac697c74b61a1431558464a24b19a4bd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/com.huawei.photos.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ctrl_progressbar_dot.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ctrl_progressbar_dot.png
new file mode 100755
index 0000000000000000000000000000000000000000..f20694d38a7a19a7cc9579db00e6e2195e85e72c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ctrl_progressbar_dot.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ctrl_seekbar_dot.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ctrl_seekbar_dot.png
new file mode 100755
index 0000000000000000000000000000000000000000..d30137c47c3d3333c92fcdf25ee304f1941600f4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ctrl_seekbar_dot.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_back.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_back.png
new file mode 100755
index 0000000000000000000000000000000000000000..8a16a4e501fdac2880e8c0646b03dec1ae7f6a2b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_back.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_gallery_pause.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_gallery_pause.png
new file mode 100755
index 0000000000000000000000000000000000000000..702b32eec497355add4394d0d5deca7c6c157afc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_gallery_pause.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_gallery_play.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_gallery_play.png
new file mode 100755
index 0000000000000000000000000000000000000000..640cd97381a0994f53d03b27bb5b59351db49749
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_gallery_play.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_gallery_video_tag.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_gallery_video_tag.png
new file mode 100755
index 0000000000000000000000000000000000000000..d079610ec730b608cb7e7dba865b6004cb55d927
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/ic_gallery_video_tag.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/loading.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/loading.png
new file mode 100755
index 0000000000000000000000000000000000000000..af9ff49350083629bbbfec08a284480ed56b9c89
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/loading.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/volume_down.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/volume_down.png
new file mode 100755
index 0000000000000000000000000000000000000000..f356923509852f09fb05f77edc93bd0440bae392
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/volume_down.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/volume_up.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/volume_up.png
new file mode 100755
index 0000000000000000000000000000000000000000..ea58ec874a40cf48ecd89ed4d4b7c5e13bfbff2e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/drawable/volume_up.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/photos/BUILD.gn b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/photos/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..c25a8ea40b59734af15d38910c225e49956f6597
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/photos/BUILD.gn
@@ -0,0 +1,7 @@
+copy("test_jpeg") {
+ sources = [
+ "photo1.jpeg",
+ "photo2.jpeg"
+ ]
+ outputs = [ "${root_out_dir}/system/internal/{{source_file_part}}" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/photos/photo1.jpeg b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/photos/photo1.jpeg
new file mode 100755
index 0000000000000000000000000000000000000000..92398692f5883391e2e103b4db5ba4ce2f3ae70f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/photos/photo1.jpeg differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/photos/photo2.jpeg b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/photos/photo2.jpeg
new file mode 100755
index 0000000000000000000000000000000000000000..0c2c3bcdd3c37582a7d8d0d6929bfdcd064349ca
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/resources/photos/photo2.jpeg differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/gallery_ability.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/gallery_ability.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..92c8e9e6f9c2c1614b6afb3dc3f5ef6a135faf13
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/gallery_ability.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/gallery_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/gallery_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..34be5fce1c9eed45daee2bd3c2db7df67f4fa5b4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/gallery_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/image_decoder.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/image_decoder.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..beb34e3037a6ae5d736b11a208678d0964fc55eb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/image_decoder.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/picture_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/picture_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..70d70819b4f0f85f2416e5f8ebda7bd5f264d245
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/picture_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/player_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/player_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..ea8f9c01552fd1ede4f3dceaeea289cf30147997
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/gallery/src/player_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/BUILD.gn b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..d3aca819c41168d65a25f80f22db4f729f4eb8ab
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/BUILD.gn
@@ -0,0 +1,62 @@
+# Copyright (c) 2020 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.
+
+import("//build/lite/config/hap_pack.gni")
+
+shared_library("launcher") {
+ sources = [
+ "launcher/src/main/cpp/app_info.cpp",
+ "launcher/src/main/cpp/app_manage.cpp",
+ "launcher/src/main/cpp/long_press_view.cpp",
+ "launcher/src/main/cpp/main_ability.cpp",
+ "launcher/src/main/cpp/main_ability_slice.cpp",
+ "launcher/src/main/cpp/swipe_view.cpp",
+ "launcher/src/main/cpp/time_weather_view.cpp",
+ "launcher/src/main/cpp/view_group_page.cpp",
+ ]
+
+ deps = [
+ "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
+ "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
+ "//foundation/arkui/ui_lite:ui_lite",
+ "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store:kv_store",
+ "//foundation/graphic/graphic_utils_lite:utils_lite",
+ "//foundation/graphic/surface_lite",
+ "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
+ ]
+
+ include_dirs = [
+ "launcher/src/main/cpp",
+ "${aafwk_lite_path}/interfaces/kits/ability_lite",
+ "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
+ "${aafwk_lite_path}/interfaces/kits/want_lite",
+ ]
+
+ defines = [
+ "ENABLE_WINDOW=1",
+ "ABILITY_WINDOW_SUPPORT",
+ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER",
+ ]
+}
+
+hap_pack("launcher_hap") {
+ deps = [ ":launcher" ]
+ mode = "hap"
+ json_path = "launcher/src/main/config.json"
+ ability_so_path = "$root_out_dir/liblauncher.so"
+ force = "true"
+ cert_profile = "cert/com.huawei.launcher_AppProvision_release.p7b"
+ resources_path = "launcher/src/main/resources"
+ hap_name = "launcher"
+ privatekey = "HOS Application Provision Release"
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/cert/com.huawei.launcher_AppProvision_release.p7b b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/cert/com.huawei.launcher_AppProvision_release.p7b
new file mode 100755
index 0000000000000000000000000000000000000000..809e42f82ed453188f9f5feca88afdb7389bbcf7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/cert/com.huawei.launcher_AppProvision_release.p7b differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/config.json b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/config.json
new file mode 100755
index 0000000000000000000000000000000000000000..d319aed17bd422091e3d1b17e5cb4c5c695620a5
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/config.json
@@ -0,0 +1,43 @@
+{
+ "app": {
+ "bundleName": "com.huawei.launcher",
+ "vendor": "huawei",
+ "version": {
+ "code": 1,
+ "name": "1.0"
+ },
+ "apiVersion": {
+ "compatible": 3,
+ "target": 4
+ }
+ },
+ "deviceConfig": {
+ "default": {
+ "keepAlive": true
+ },
+ "smartCamera": {
+ "keepAlive": true
+ }
+ },
+ "module": {
+ "package": "com.huawei.launcher",
+ "name": ".MyHarmonyAbilityPackage",
+ "deviceType": [
+ "phone", "tv","tablet","car","smartWatch","sportsWatch","smartVision"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "launcher",
+ "moduleType": "entry"
+ },
+ "abilities": [{
+ "name": "MainAbility",
+ "icon": "assets/launcher/resources/base/media/background.png",
+ "label": "launcher",
+ "launchType": "standard",
+ "type": "page",
+ "visible":true
+ }
+ ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_info.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_info.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..242cf27986608d55b5ed2950d9fce98af0f16180
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_info.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_info.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_info.h
new file mode 100755
index 0000000000000000000000000000000000000000..6757e8f4500fcb5326e712bf3cb5c0a1824ca09b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_info.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_manage.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_manage.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..dc4f02aa4bd072886015aeb64be021a6c29b5004
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_manage.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_manage.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_manage.h
new file mode 100755
index 0000000000000000000000000000000000000000..e59ef6e3dd017b1fc3934f853b180ec9d7669f36
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/app_manage.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/event_listener.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/event_listener.h
new file mode 100755
index 0000000000000000000000000000000000000000..163f38c7fd7f678a20cdff71aac2b34ae09a1945
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/event_listener.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/long_press_view.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/long_press_view.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..c526eaf21e15c4c5b08cc2588aa94dc9d72e487f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/long_press_view.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/long_press_view.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/long_press_view.h
new file mode 100755
index 0000000000000000000000000000000000000000..64c4609494a9fbe8fdddf1b4a551a0c1fa5736f2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/long_press_view.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..667d61df012f1f70c887627caff13e94f362abc7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability.h
new file mode 100755
index 0000000000000000000000000000000000000000..93137bb7be8365314c9851ebe0a2c7525ab3d19f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..c409f57c43cdbaeb5e31757fcf6e0bb3a1e90884
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..acc2ad8cbe0d2fca07dcdf7930832facecbfc3d0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/main_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/native_base.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/native_base.h
new file mode 100755
index 0000000000000000000000000000000000000000..43f02ed688905715600e71ca8f84e501036a2cf4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/native_base.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/swipe_view.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/swipe_view.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..6f648c0913623ba36246893eb161fb64d1de1437
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/swipe_view.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/swipe_view.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/swipe_view.h
new file mode 100755
index 0000000000000000000000000000000000000000..bfe8b1d8df35ce2d2af347fba4677820eb227338
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/swipe_view.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/time_weather_view.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/time_weather_view.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..f62ebf88c8b5971b4fb3227be6a2927c92d4c31c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/time_weather_view.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/time_weather_view.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/time_weather_view.h
new file mode 100755
index 0000000000000000000000000000000000000000..4d396dd46b4ad791c6f9a52970635725cb9d7bbe
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/time_weather_view.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/ui_config.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/ui_config.h
new file mode 100755
index 0000000000000000000000000000000000000000..32d831ec497fe443c52948a534fad65bb4e585ea
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/ui_config.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/view_group_page.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/view_group_page.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..92ba2caf4729fe4a15ff5bd20d1fd3b354f2ce9f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/view_group_page.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/view_group_page.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/view_group_page.h
new file mode 100755
index 0000000000000000000000000000000000000000..b6ebc02f58fdd5844786a3472679cd78ea62326e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/cpp/view_group_page.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/resources/base/media/background.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/resources/base/media/background.png
new file mode 100755
index 0000000000000000000000000000000000000000..8627ea908569578f7f83512d6f0cdbe575a19e26
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/resources/base/media/background.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/resources/base/media/weather.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/resources/base/media/weather.png
new file mode 100755
index 0000000000000000000000000000000000000000..44496372be2d1a4518a5550276b3317b4e9c3728
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/launcher/launcher/src/main/resources/base/media/weather.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/lio/BUILD.gn b/os/OpenHarmony/khzg_patch/applications/sample/camera/lio/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..71dc93a9f214b1afc20c673a20d67e04f29fcb5f
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/lio/BUILD.gn
@@ -0,0 +1,56 @@
+# Copyright (c) 2020 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.
+
+import("//build/lite/config/component/lite_component.gni")
+
+executable("lio_gpio_exe") {
+ output_name = "lio"
+ sources = [ "lio_gpio.c" ]
+
+ cflags = [ "-Wall" ]
+ cflags_cc = cflags
+
+ include_dirs = [
+ ".",
+ "//drivers/hdf_core/framework/include/platform",
+ "//drivers/hdf_core/framework/support/platform/include",
+ "//drivers/hdf_core/framework/include",
+ "//drivers/hdf_core/framework/include/core",
+ "//drivers/hdf_core/framework/include/utils",
+ "//drivers/hdf_core/framework/include/osal",
+ "//drivers/hdf_core/adapter/uhdf2/osal/include",
+ "//drivers/hdf_core/adapter/uhdf2/utils/include",
+ ]
+
+ ldflags = [ "-lstdc++" ]
+ ldflags += [ "-lpthread" ]
+ ldflags += [ "-lhdf_platform" ]
+ ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ]
+
+ deps = [
+ "//drivers/hdf_core/adapter/uhdf2/platform:libhdf_platform",
+ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils",
+ ]
+
+ external_deps = [
+ "c_utils:utils",
+ ]
+
+ output_dir = "$root_out_dir/usr"
+}
+
+group("lio_sample") {
+ deps = [
+ ":lio_gpio_exe",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/lio/lio_gpio.c b/os/OpenHarmony/khzg_patch/applications/sample/camera/lio/lio_gpio.c
new file mode 100755
index 0000000000000000000000000000000000000000..5512762676d044510427c4818be7bdbf8dc6402e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/lio/lio_gpio.c differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/lio/lio_gpio.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/lio/lio_gpio.h
new file mode 100755
index 0000000000000000000000000000000000000000..4a7f2942d39b2d766ade142ae6264acc0a6c9da0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/lio/lio_gpio.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/media/BUILD.gn b/os/OpenHarmony/khzg_patch/applications/sample/camera/media/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..935d9749de8de4706528e9d51c05cfa7df18b2d9
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/media/BUILD.gn
@@ -0,0 +1,75 @@
+# Copyright (c) 2020 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.
+import("//build/lite/config/component/lite_component.gni")
+import("//foundation/multimedia/media_utils_lite/config.gni")
+
+executable("camera_sample") {
+ sources = [ "camera_sample.cpp" ]
+ cflags = [ "-Wall" ]
+ cflags_cc = cflags
+ include_dirs = []
+
+ ldflags = [ "-lstdc++" ]
+ ldflags += [ "-lpthread" ]
+ ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ]
+
+ deps = [
+ "//foundation/multimedia/camera_lite/frameworks:camera_lite",
+ "//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite",
+ ]
+ output_dir = "$root_out_dir/usr"
+}
+
+executable("audio_capture_sample") {
+ sources = [ "audio_capture_sample.cpp" ]
+ cflags = [ "-Wall" ]
+ cflags_cc = cflags
+
+ include_dirs = [ "//foundation/multimedia/audio_lite/interfaces/kits" ]
+ include_dirs += [ "//foundation/multimedia/media_utils_lite/interfaces/kits" ]
+
+ ldflags = [ "-lstdc++" ]
+ ldflags += [ "-lpthread" ]
+ ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ]
+ deps = [
+ "//foundation/multimedia/audio_lite/frameworks:audio_capturer_lite",
+ "//third_party/bounds_checking_function:libsec_shared",
+ ]
+ output_dir = "$root_out_dir/usr"
+}
+
+executable("player_sample") {
+ if (enable_media_passthrough_mode == true) {
+ defines = [ "ENABLE_PASSTHROUGH_SAMPLE" ]
+ }
+ sources = [ "player_sample.cpp" ]
+ cflags = [ "-Wall" ]
+ cflags_cc = cflags
+ include_dirs = []
+ ldflags = [ "-lstdc++" ]
+ ldflags += [ "-lpthread" ]
+ ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ]
+ deps = [
+ "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite",
+ "//third_party/bounds_checking_function:libsec_shared",
+ ]
+ output_dir = "$root_out_dir/usr"
+}
+
+lite_component("media_sample") {
+ features = [
+ ":camera_sample",
+ ":player_sample",
+ ":audio_capture_sample",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/media/audio_capture_sample.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/media/audio_capture_sample.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..7f2739ba2a45c426f70816636c3a5956c583f7fb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/media/audio_capture_sample.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/media/camera_sample.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/media/camera_sample.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..896c3f5e79507fd013b37dafa271414e5b3f9d7f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/media/camera_sample.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/media/player_sample.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/media/player_sample.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..092f01e05846e73aecacd5d50515939d0c7ba945
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/media/player_sample.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/BUILD.gn b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..2572a031c44e88b137d80ccc40f205f426018ea0
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/BUILD.gn
@@ -0,0 +1,70 @@
+# Copyright (c) 2020 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.
+
+import("//build/lite/config/hap_pack.gni")
+
+shared_library("npu") {
+ sources = [
+ "npu/src/main/cpp/main_ability_slice.cpp",
+ "npu/src/main/cpp/npu_main_ability.cpp",
+ "npu/src/main/cpp/npu_utils.cpp",
+ ]
+
+ deps = [
+ "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
+ "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
+ "//base/powermgr/powermgr_lite/frameworks:powermgr",
+ "//base/startup/init/interfaces/innerkits:libbegetutil",
+ "//foundation/arkui/ui_lite:ui_lite",
+ "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store:kv_store",
+ "//foundation/graphic/graphic_utils_lite:utils_lite",
+ "//foundation/graphic/surface_lite",
+ "//foundation/multimedia/camera_lite/frameworks:camera_lite",
+ "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
+ ]
+
+ include_dirs = [
+ "npu/src/main/cpp",
+ "${aafwk_lite_path}/interfaces/kits/ability_lite",
+ "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
+ "${aafwk_lite_path}/interfaces/kits/want_lite",
+ "//base/startup/init/interfaces/innerkits/include/syspara",
+ "//base/security/permission_lite/interfaces/kits",
+ "//foundation/arkui/ui_lite/interfaces/kits/components/",
+ "//foundation/arkui/ui_lite/interfaces/kits/animator/",
+ "//foundation/multimedia/camera_lite/interfaces/kits"
+ ]
+
+ ldflags = [
+ "-lbegetutil",
+ "-lcamera_lite",
+ ]
+
+ defines = [
+ "ENABLE_WINDOW=1",
+ "ABILITY_WINDOW_SUPPORT",
+ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER",
+ ]
+}
+
+hap_pack("npu_hap") {
+ deps = [ ":npu" ]
+ mode = "hap"
+ json_path = "npu/src/main/config.json"
+ ability_so_path = "$root_out_dir/libnpu.so"
+ force = "true"
+ cert_profile = "cert/com.openharmony.npu.p7b"
+ resources_path = "npu/src/main/resources"
+ hap_name = "npu"
+ privatekey = "HOS Application Provision Release"
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/cert/com.openharmony.npu.p7b b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/cert/com.openharmony.npu.p7b
new file mode 100755
index 0000000000000000000000000000000000000000..7a2598baadd61ae78bb1bfd07f02cdbb64735e3f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/cert/com.openharmony.npu.p7b differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/config.json b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/config.json
new file mode 100755
index 0000000000000000000000000000000000000000..a44ef3a4add6b35cd97b0d03c12b11b28287aa8d
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/config.json
@@ -0,0 +1,40 @@
+{
+ "app": {
+ "bundleName": "com.openharmony.npu",
+ "vendor": "openharmony",
+ "version": {
+ "code": 1,
+ "name": "1.0"
+ },
+ "apiVersion": {
+ "compatible": 3,
+ "target": 4
+ }
+ },
+ "deviceConfig": {
+ "default": {
+
+ }
+ },
+ "module": {
+ "package": "com.openharmony.npu",
+ "name": ".MyHarmonyAbilityPackage",
+ "deviceType": [
+ "phone","tv","tablet","car","smartWatch","sportsWatch","smartVision"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "npu",
+ "moduleType": "entry"
+ },
+ "abilities": [{
+ "name": "NpuMainAbility",
+ "icon": "assets/npu/resources/base/media/npu.png",
+ "label": "npu",
+ "launchType": "standard",
+ "type": "page",
+ "visible": true
+ }
+ ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/event_listener.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/event_listener.h
new file mode 100755
index 0000000000000000000000000000000000000000..ca3e2b62b389fccd9efa524b74d94a453ec1e525
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/event_listener.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/main_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/main_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..54fc51d6b6cf70eb9d0dfe836718dc71a245b8ff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/main_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/main_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/main_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..2f24069f6d097063e998f931f9e529cda81cd815
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/main_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_main_ability.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_main_ability.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..6f411b55523b581c91b3938bafdfcb7b9af5f250
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_main_ability.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_main_ability.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_main_ability.h
new file mode 100755
index 0000000000000000000000000000000000000000..5c85cf821e2679c0630484b6f3b7ba7b5aa6736e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_main_ability.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_utils.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_utils.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..60dde72c1c8d2b2544dc7ddc3dab15e49f82bbae
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_utils.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_utils.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_utils.h
new file mode 100755
index 0000000000000000000000000000000000000000..2bac34fe4d5c557d40fb30d706cdf41d7eecbbd3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/cpp/npu_utils.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/1.jpg b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/1.jpg
new file mode 100755
index 0000000000000000000000000000000000000000..2af7786f02afe2c50d9bcaea14bddf431cd9be2c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/1.jpg differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/2.jpg b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/2.jpg
new file mode 100755
index 0000000000000000000000000000000000000000..4061244ec8e6a64c6bf2f9ed7efdf25d3a6cfde1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/2.jpg differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/3.jpg b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/3.jpg
new file mode 100755
index 0000000000000000000000000000000000000000..4b09cf92b627cd62cb11dd1e38d3fe6faac85c26
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/3.jpg differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/4.jpg b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/4.jpg
new file mode 100755
index 0000000000000000000000000000000000000000..651f92db657422abb94262c04dae69badc7a600f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/4.jpg differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/back.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/back.png
new file mode 100755
index 0000000000000000000000000000000000000000..9dc41df327d0f11048e646df6d1467e9681703b7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/back.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/npu.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/npu.png
new file mode 100755
index 0000000000000000000000000000000000000000..4954a2be542532a14f2ac63a210949228e1a47fb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/npu/npu/src/main/resources/base/media/npu.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/BUILD.gn b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..d3da581168eba8772588865d55d2f83ad76c5fc7
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/BUILD.gn
@@ -0,0 +1,86 @@
+# Copyright (c) 2020 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.
+
+import("//build/lite/config/hap_pack.gni")
+
+shared_library("setting") {
+ sources = [
+ "setting/src/main/cpp/app_ability_slice.cpp",
+ "setting/src/main/cpp/app_info_ability_slice.cpp",
+ "setting/src/main/cpp/main_ability_slice.cpp",
+ "setting/src/main/cpp/setting_about_ability_slice.cpp",
+ "setting/src/main/cpp/setting_audio_ability_slice.cpp",
+ "setting/src/main/cpp/setting_audio_list_ability_slice.cpp",
+ "setting/src/main/cpp/setting_audio_play_ability_slice.cpp",
+ "setting/src/main/cpp/setting_audio_switch_ability_slice.cpp",
+ "setting/src/main/cpp/setting_display_ability_slice.cpp",
+ "setting/src/main/cpp/setting_main_ability.cpp",
+ "setting/src/main/cpp/setting_utils.cpp",
+ "setting/src/main/cpp/setting_wifi_ability_slice.cpp",
+ "setting/src/main/cpp/setting_wifi_input_password_ability_slice.cpp",
+ "setting/src/main/cpp/wpa_work.c",
+ "setting/src/main/cpp/setting_time_ability_slice.cpp",
+ "setting/src/main/cpp/setting_time_input_ability_slice.cpp",
+ ]
+
+ deps = [
+ "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
+ "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
+ "//base/powermgr/powermgr_lite/frameworks:powermgr",
+ "//base/startup/init/interfaces/innerkits:libbegetutil",
+ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
+ "//foundation/arkui/ui_lite:ui_lite",
+ "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store:kv_store",
+ "//foundation/graphic/graphic_utils_lite:utils_lite",
+ "//foundation/graphic/surface_lite",
+ "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
+ "//third_party/wpa_supplicant/wpa_supplicant-2.9:wpa_supplicant",
+ ]
+
+ include_dirs = [
+ "setting/src/main/cpp",
+ "${aafwk_lite_path}/interfaces/kits/ability_lite",
+ "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
+ "${aafwk_lite_path}/interfaces/kits/want_lite",
+ "//base/startup/init/interfaces/innerkits/include/syspara",
+ "//base/security/permission_lite/interfaces/kits",
+ "//third_party/wpa_supplicant/wpa_supplicant-2.9/src/common",
+ "//foundation/arkui/ui_lite/interfaces/kits/components/",
+ "//foundation/arkui/ui_lite/interfaces/kits/animator/"
+ ]
+
+ ldflags = [
+ "-lwpa",
+ "-lwpa_client",
+ "-lbegetutil",
+ "-lpms_client",
+ ]
+
+ defines = [
+ "ENABLE_WINDOW=1",
+ "ABILITY_WINDOW_SUPPORT",
+ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER",
+ ]
+}
+
+hap_pack("setting_hap") {
+ deps = [ ":setting" ]
+ mode = "hap"
+ json_path = "setting/src/main/config.json"
+ ability_so_path = "$root_out_dir/libsetting.so"
+ force = "true"
+ cert_profile = "cert/com.huawei.setting_AppProvision_release.p7b"
+ resources_path = "setting/src/main/resources"
+ hap_name = "setting"
+ privatekey = "HOS Application Provision Release"
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/cert/com.huawei.setting_AppProvision_release.p7b b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/cert/com.huawei.setting_AppProvision_release.p7b
new file mode 100755
index 0000000000000000000000000000000000000000..b2c68041f9737e31c2d59d6f23693fe79effad90
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/cert/com.huawei.setting_AppProvision_release.p7b differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/config.json b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/config.json
new file mode 100755
index 0000000000000000000000000000000000000000..52560f411b2394eabb2572e9ebe72681cdc34024
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/config.json
@@ -0,0 +1,40 @@
+{
+ "app": {
+ "bundleName": "com.huawei.setting",
+ "vendor": "huawei",
+ "version": {
+ "code": 1,
+ "name": "1.0"
+ },
+ "apiVersion": {
+ "compatible": 3,
+ "target": 4
+ }
+ },
+ "deviceConfig": {
+ "default": {
+
+ }
+ },
+ "module": {
+ "package": "com.huawei.setting",
+ "name": ".MyHarmonyAbilityPackage",
+ "deviceType": [
+ "phone", "tv","tablet","car","smartWatch","sportsWatch","smartVision"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "setting",
+ "moduleType": "entry"
+ },
+ "abilities": [{
+ "name": "SettingMainAbility",
+ "icon": "assets/setting/resources/base/media/setting.png",
+ "label": "test testapp2 1",
+ "launchType": "standard",
+ "type": "page",
+ "visible":true
+ }
+ ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..924949d5f9797c27dcc1bc5b0f308bce9a4ae25a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..4c169d4ff664bcf84c00e7caa164cb1a41a008fa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_info_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_info_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..76b257044faafba1d78e943575a0b6fea5b29263
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_info_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_info_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_info_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..7136bdcb19482e75b99b231092b150a2b7c8bbb1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/app_info_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/event_listener.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/event_listener.h
new file mode 100755
index 0000000000000000000000000000000000000000..c5787c7a7e5b642f266b9e3d4eccd5ab9cc835d9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/event_listener.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/main_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/main_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..65af92f00d1ddcae7093d7b48fc85ae463041475
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/main_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/main_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/main_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..f0c631adbbc555847f5f5827a84c389aff429660
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/main_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_about_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_about_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..faff22ebda32fc6737429f6663bd286b629edecd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_about_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_about_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_about_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..7a09d96324456567dd65b0f143ad56be53138af8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_about_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..bf01a75d1e86c2b00576043e18529937f5bf0167
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..b9be7ca5ed5570debb8479584360810c2b5a3b3d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_list_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_list_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..72bb5efdb40714be659cf13bf72958f5542086e5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_list_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_list_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_list_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..a99244ac11cb2f60028d6b1986afc23352bbec21
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_list_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_play_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_play_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..6f6d48b241d4d70eab46303fbad54348e7fdf695
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_play_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_play_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_play_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..fee93f499de224ad126792bf92e8e11d52278afa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_play_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_switch_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_switch_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..38e11e10f0bbc2cfb102bc272a03f335152950f5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_switch_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_switch_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_switch_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..f94a7d87089ca6a551be6241b79fdbca897919a2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_audio_switch_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_display_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_display_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..8edecd8777e65b58006f39ceda444d4d7de17923
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_display_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_display_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_display_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..8a0eee744bebb6232220180dc5cb18cfa7fa337d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_display_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_main_ability.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_main_ability.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..0c6749972a6609d1a2e887fa5ed5b2f9b73061d0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_main_ability.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_main_ability.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_main_ability.h
new file mode 100755
index 0000000000000000000000000000000000000000..9efe5095c25cecf863e641145fa05e76f514170c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_main_ability.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..6ff6f8d1d181f7c2270bf50c2c3f494613696c2b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..de12650409bc75a26aa539987c5a952556371d59
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_input_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_input_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..cd7c27e45d05edecd6699e42ddd0417d4844e5f5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_input_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_input_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_input_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..8a0d8dc982e69e19439cb7b9bad9039d0fe77207
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_time_input_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_utils.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_utils.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..a398911515ef6fab64dfaea5e225095c325aa520
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_utils.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_utils.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_utils.h
new file mode 100755
index 0000000000000000000000000000000000000000..b219a3f2a972cf69cf6e52c8a223b19600ded3a5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_utils.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..155c064f07e9c2d240bc607ef7f3f17af80b5e2c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..32f40d40274a36dfda4adce368cfff084f3987ff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_input_password_ability_slice.cpp b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_input_password_ability_slice.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..134460f398eb58d61d74e2aaab2a2ff0cb7d11db
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_input_password_ability_slice.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_input_password_ability_slice.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_input_password_ability_slice.h
new file mode 100755
index 0000000000000000000000000000000000000000..7480299d6b66d048606da98f6d808f1889fbbfe0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/setting_wifi_input_password_ability_slice.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/wpa_work.c b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/wpa_work.c
new file mode 100755
index 0000000000000000000000000000000000000000..5d9e813ff905a784ae7c9176a3b1828810290c2a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/wpa_work.c differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/wpa_work.h b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/wpa_work.h
new file mode 100755
index 0000000000000000000000000000000000000000..0a0182b9fac428c57eb074fbd1f21d4ba9516461
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/cpp/wpa_work.h differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/element/wpa_supplicant.conf b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/element/wpa_supplicant.conf
new file mode 100755
index 0000000000000000000000000000000000000000..3896361262963624f1ada67ce4f84a0509685b13
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/element/wpa_supplicant.conf
@@ -0,0 +1,7 @@
+country=GB
+ctrl_interface=udp
+ctrl_interface=/var/wpa_supplicant
+network={
+}
+
+
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/app.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/app.png
new file mode 100755
index 0000000000000000000000000000000000000000..8a5d6c0daa77187134e49187e2703d221fcc3d86
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/app.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/back.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/back.png
new file mode 100755
index 0000000000000000000000000000000000000000..9dc41df327d0f11048e646df6d1467e9681703b7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/back.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/enter.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/enter.png
new file mode 100755
index 0000000000000000000000000000000000000000..ffbfa9684cdc85799b3f3a58492d1c9fc62fc65d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/enter.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/forward.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/forward.png
new file mode 100755
index 0000000000000000000000000000000000000000..9d63c114d24c744b46ccf72a820f832b86c2b63b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/forward.png differ
diff --git a/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/setting.png b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/setting.png
new file mode 100755
index 0000000000000000000000000000000000000000..f5008902b93f0f14e8deb3b4aec35c9d0db4b92d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/applications/sample/camera/setting/setting/src/main/resources/base/media/setting.png differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..65c5c8a1f319d156b75729a508111e36a135f1d5
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/BUILD.gn
@@ -0,0 +1,13 @@
+# Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2021. All rights reserved.
+
+if (defined(ohos_lite)) {
+ import("//build/lite/config/component/lite_component.gni")
+} else {
+ import("//build/ohos.gni")
+}
+
+if (defined(ohos_lite)) {
+ # do something
+} else {
+ # do something
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/LICENSE b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/LICENSE
new file mode 100755
index 0000000000000000000000000000000000000000..c37b795b5b0efbf9e692a956fddb871d3c35f681
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/LICENSE
@@ -0,0 +1,56 @@
+End User License Agreement
+
+THIS END USER LICENSE AGREEMENT (“AGREEMENT”) IS A LEGAL AGREEMENT BETWEEN YOU (EITHER A SINGLE INDIVIDUAL, OR SINGLE LEGAL ENTITY) AND HISILICON (SHANGHAI) TECHNOLOGIES CO., LTD. ("HISILICON") FOR THE USE OF THE SOFTWARE ACCOMPANYING THIS AGREEMENT. HISILICON IS ONLY WILLING TO LICENSE THE SOFTWARE TO YOU ON CONDITION THAT YOU ACCEPT ALL OF THE TERMS IN THIS AGREEMENT. BY DOWNDOADING OR BY INSTALLING OR OTHERWISE USING OR COPYING THE SOFTWARE YOU INDICATE THAT YOU AGREE TO BE BOUND BY ALL OF THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, HISILICON WILL NOT LICENSE THE SOFTWARE TO YOU AND YOU MAY NOT INSTALL, USE OR COPY THE SOFTWARE, AND YOU SHALL PROMPTLY DESTROY, DELETE, OR RETURN THE SOFTWARE TO YOUR SUPPLIER.
+
+“SOFTWARE” means the software in object code provided under the terms of this Agreement.
+
+Shenzhen Longgang District is the signing place of this Agreement.
+
+1. GRANT OF LICENSE
+In consideration of your agreement to abide by the following terms, and subject to the terms and conditions of this Agreement, HISILICON hereby grants YOU, a non-transferable, non-exclusive, royalty-free, revocable, worldwide copyright license (without the right to sublicense) to internally use and copy the SOFTWARE to set up internal development environment with development boards integrating Hisilicon chips, solely for the purpose of designing, developing or testing your applications.
+
+All rights to the SOFTWARE and all intellectual property rights contained therein are reserved and shall remain the sole and exclusive property of HISILICON. The SOFTWARE is licensed but not sold. Except as expressly licensed in Clause 1, in no event shall the license granted in this Clause 1 be construed as granting YOU expressly or by implication, estoppels or otherwise, licenses to any intellectual property rights, including but not limited to patent rights, copyrights, trademark or trade secret in the SOFTWARE.
+
+No right is granted to YOU under this Agreement to manufacture, have manufactured, or sell, supply or distribute any products which use or embody any of the SOFTWARE or any of the intellectual property rights embodied therein.
+
+2. RESTRICTIONS
+YOU shall reproduce and not remove or obscure any notice incorporated by HISILICON in the SOFTWARE to protect HISILICON’s intellectual property rights embodied therein.
+
+YOU shall not decompile, disassemble, or reverse engineer the SOFTWARE.
+
+YOU shall not distribute the SOFTWARE under an open source license as listed by the Open Source Initiative (a non-profit corporation whose website is www.opensource.org), or other license which requires the source code or object code of the SOFTWARE to be licensed or otherwise shared with any third party.
+
+3. CONFLICT WITH OPEN SOURCE SOFTWARE LICENSE
+The SOFTWARE may contain open source software. If the license applied on such open source software has conflict with this Agreement, the license applied on such open source software will prevail and apply to the open source software.
+
+4. FEEDBACK
+YOU may choose to provide suggestions, comments, feedback, ideas, modifications or know-how (whether in oral or written form) relating to the use of the SOFTWARE ("Feedback") to HISILICON under the terms of this Agreement. YOU hereby grants to HISILICON and its affiliates, under all of you and your affiliates’ (as applicable) intellectual property rights, a perpetual, irrevocable, royalty free, non-exclusive, worldwide license to (i) use, copy and modify the Feedback; (ii) sell, supply, or otherwise distribute the Feedback; (iii) design, have designed, manufacture, have manufactured, use, import, sell, and otherwise distribute and dispose of products that incorporate the Feedback; and (iv) sublicense (together with the rights to further sublicense) the rights granted in this paragraph to any third party.
+
+5. NO WARRANTY
+YOU AGREE THAT THE SOFTWARE IS PROVIDED BY HISILICON ON AN "AS IS" BASIS. HISILICON MAKES NO WARRANTY, EXPRESSED OR IMPLIED OR STATUTORY, WITH RESPECT TO ANY OF THE SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.
+
+YOU EXPRESSLY ASSUME ALL LIABILITIES AND RISKS, FOR USE OR OPERATION OF THE SOFTWARE, INCLUDING WITHOUT LIMITATION, SOFTWARE APPLICATIONS DESIGNED OR INTENDED FOR MISSION CRITICAL APPLICATIONS, SUCH AS PACEMAKERS, WEAPONRY, AIRCRAFT NAVIGATION, FACTORY CONTROL SYSTEMS, ETC. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+6. NO LIABILITY
+PLEASE NOTE THAT YOU SHOULD USE THE SOFTWARE AT YOUR OWN RISK.
+
+IN NO EVENT SHALL HISILICON BE LIABLE FOR ANY DIRECT OR INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHER LEGAL THEORY, EVEN IF HISILICON HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF THE SOFTWARE HAS ANY MATERIAL, VERIFIABLE, AND REPRODUCIBLE PROGRAM ERRORS, HISILICON SHALL HAVE NO LIABILITY TO MODIFY SUCH ERRORS.
+
+NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED IN THIS AGREEMENT, THE MAXIMUM LIABILITY OF HISILICON TO YOU IN AGGREGATE FOR ALL CLAIMS MADE AGAINST HISILICON IN CONTRACT TORT OR OTHERWISE UNDER OR IN CONNECTION WITH THE SUBJECT MATTER OF THIS AGREEMENT SHALL NOT EXCEED THE TOTAL OF SUMS RECEIVED BY HISILICON FROM YOU FOR THIS AGREEMENT. THE EXISTENCE OF MORE THAN ONE CLAIM WILL NOT ENLARGE OR EXTEND THE LIMIT.
+
+7. CONFIDENTIALITY
+YOU acknowledge and agree that the SOFTWARE provided under this Agreement contain trade secrets and confidential material of HISILICON and YOU agree to maintain all such information in confidence and apply security measures no less stringent than the measures which YOU apply to protect your own like information, but not less than a reasonable degree of care, to prevent their unauthorized disclosure and use. The period of confidentiality shall be indefinite. YOU agree not to use any such information other than in normal use of the SOFTWARE under the license granted in this Agreement.
+
+8. TERM AND TERMINATION
+This Agreement shall remain in force until terminated. HISILICON may terminate this Agreement at any time with or without any cause. Upon termination of this Agreement, YOU shall immediately stop using the SOFTWARE and confidential information and destroy all copies of the SOFTWARE and confidential information in your possession, together with all documentation and related materials. The provisions of clauses 2, 3, 4, 5, 6, 7,8 and 9 shall survive termination of this Agreement.
+
+9. GENERAL
+Any provision of this Agreement which is prohibited or unenforceable in any jurisdiction shall be ineffective to the extent of such prohibition or unenforceability without affecting, impairing or invalidating the remaining provisions hereof.
+
+The failure by HISILICON to enforce any of the provisions of this Agreement, unless waived in writing, shall not constitute a waiver of HISILICON's rights to enforce such provision or any other provision of this Agreement in the future.
+
+This Agreement shall be governed by and construed in accordance with the laws of People’s Republic of China, without reference to the principles of conflicts of laws. Any dispute arising out of or relating to this Agreement shall be submitted to Shenzhen Longgang District People’s court and the parties waive all objections to that jurisdiction and venue.
+
+---------------------------------------------------------------------
+Copyright (C) 2021 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved.
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/README.md b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/README.md
new file mode 100755
index 0000000000000000000000000000000000000000..6a0f559c9f7985807b6ecb1feaa46053cf9189bb
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/README.md
@@ -0,0 +1,34 @@
+# hisilicon hardware
+
+- [Introduction](#section469617221261)
+- [Constraints](#section12212842173518)
+- [Repositories Involved](#section641143415335)
+
+## Introduction
+
+This repository stores the libraries for the southbound interface implementation, framework, and chip interconnection layer of the multimedia subsystem.
+
+## Constraints
+
+Currently, HiSpark\_taurus \(Hi3516D V300\) is supported.
+
+## Repositories Involved
+
+device/hisilicon/build
+
+device/hisilicon/drivers
+
+**device/hisilicon/hardware**
+
+device/hisilicon/hispark\_aries
+
+device/hisilicon/hispark\_taurus
+
+device/hisilicon/modules
+
+device/hisilicon/third\_party/ffmpeg
+
+device/hisilicon/third\_party/uboot
+
+vendor/hisilicon
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/README_zh.md b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/README_zh.md
new file mode 100755
index 0000000000000000000000000000000000000000..204b4f47eb34a740e0c494069b3af6b26475a4f6
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/README_zh.md
@@ -0,0 +1,34 @@
+# hisilicon hardware组件
+
+- [简介](#section469617221261)
+- [约束](#section12212842173518)
+- [对应仓库](#section641143415335)
+
+## 简介
+
+媒体南向接口实现、框架及芯片对接层库目录。
+
+## 约束
+
+支持HiSpark\_taurus(Hi3516DV300)。
+
+## 对应仓库
+
+device/hisilicon/build
+
+device/hisilicon/drivers
+
+**device/hisilicon/hardware**
+
+device/hisilicon/hispark\_aries
+
+device/hisilicon/hispark\_taurus
+
+device/hisilicon/modules
+
+device/hisilicon/third\_party/ffmpeg
+
+device/hisilicon/third\_party/uboot
+
+vendor/hisilicon
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..fb8a4accce977b01abde413e9527b7fd59c6be2c
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/BUILD.gn
@@ -0,0 +1,30 @@
+# Copyright (c) 2021 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.
+import("//build/lite/config/component/lite_component.gni")
+
+board = board_name
+if (board_name == "hispark_taurus" || board_name == "aegis_hi3516dv300") {
+ board = "hi3516dv300"
+} else if (board_name == "hispark_aries") {
+ board = "hi3518ev300"
+}
+
+config("engine_nnie_config") {
+ include_dirs = [ "./$board/include" ]
+}
+
+copy("engine_nnie_sdk") {
+ sources = [ "./$board/libs/libnnie_adapter.so" ]
+ outputs = [ "$root_out_dir/{{source_file_part}}" ]
+ public_configs = [ ":engine_nnie_config" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/hi3516dv300/include/nnie_adapter.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/hi3516dv300/include/nnie_adapter.h
new file mode 100755
index 0000000000000000000000000000000000000000..d2010d2c121f1fee691e37b4184fff565e1d5923
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/hi3516dv300/include/nnie_adapter.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/hi3516dv300/libs/libnnie_adapter.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/hi3516dv300/libs/libnnie_adapter.a
new file mode 100755
index 0000000000000000000000000000000000000000..0212e415e719e95a970889972e5bb4456ed75e08
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/hi3516dv300/libs/libnnie_adapter.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/hi3516dv300/libs/libnnie_adapter.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/hi3516dv300/libs/libnnie_adapter.so
new file mode 100755
index 0000000000000000000000000000000000000000..fe9bf001780d9406123868f11a44eb64d4095351
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/ai/hi3516dv300/libs/libnnie_adapter.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/build.sh b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9d4184719dea989b649bea8f4a775ee3eee5a147
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/build.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Copyright 2020-2020, Huawei Technologies Co. Ltd.
+#
+# ALL RIGHTS RESERVED
+#
+# Compile mpp/sample project, this is the entrance script
+
+# error out on errors
+set -e
+OUT_DIR="$1"
+BOARD_NAME="$2"
+HOS_KERNEL_TYPE="$3"
+
+function main(){
+# do something
+}
+
+main "$@"
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..b05be8bf4951ce5f8d9ddd50bb7bf9aea8e78222
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/BUILD.gn
@@ -0,0 +1,271 @@
+# Copyright (c) 2021 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.
+
+if (defined(ohos_lite)) {
+ import("//build/lite/config/component/lite_component.gni")
+ import("//build/lite/ndk/ndk.gni")
+ if (board_name == "hispark_ss928v100" || board_name == "hispark_ss927v100") {
+ shared_library("display_layer") {
+ output_name = "display_layer"
+ sources = [
+ "//drivers/peripheral/display/hal/disp_hal.c",
+ "ss928/src/display_layer.c",
+ "ss928/src/display_overlay_layer.c",
+ "ss928/src/vpss_resmng.c",
+ "ss928/src/hdmi.c",
+ "ss928/src/vo_parameter_calc.c",
+ "ss928/src/bt1120.c"
+ ]
+ include_dirs = [
+ "./ss928/include",
+ "./ss928/include/adapt",
+ "//drivers/peripheral/base",
+ "//drivers/peripheral/display/hal",
+ "//drivers/peripheral/display/interfaces/include",
+ "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
+ ]
+
+ deps = [
+ "//third_party/bounds_checking_function:libsec_shared",
+ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils"
+ ]
+ defines = ["__USER__"]
+ cflags = [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-fsigned-char",
+ "-fno-common",
+ "-fno-strict-aliasing",
+ "-Wno-format",
+ "-Wno-format-extra-args",
+ "-Wno-error=implicit-function-declaration",
+ ]
+
+ if (ohos_kernel_type == "linux") {
+ include_dirs += [
+ "//device/soc/hisilicon/ss928v100/sdk_linux/smp/a55_linux/mpp/out/include"
+ ]
+ deps += ["//device/soc/hisilicon/ss928v100/sdk_linux:hispark_ss928v100_sdk"]
+ }
+
+ defines += [ "ENABLE_H8" ]
+ defines += [ "DISENABLE_DISP" ]
+ defines += [ "__HDMI_SUPPORT__" ]
+ ldflags = [
+ "-lss_mpi",
+ "-lss_voice_engine",
+ "-lss_hdmi",
+ "-lot_osal",
+ "-lot_base",
+ "-lot_sys",
+ "-lot_vo",
+ "-lot_rgn",
+ "-lot_irq",
+ ]
+ defines += [ "VPSS_GRP_START_ID=100" ]
+ ldflags += [
+ "-lss_dnvqe",
+ "-lss_upvqe"
+ ]
+ }
+
+ shared_library("display_gfx") {
+ output_name = "display_gfx"
+ sources = [ "ss928/src/display_gfx.c" ]
+ include_dirs = [
+ "./ss928/include",
+ "./ss928/include/adapt",
+ "//drivers/peripheral/base",
+ "//drivers/peripheral/display/hal",
+ "//drivers/peripheral/display/interfaces/include",
+ "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
+ ]
+
+ defines = [ "__USER__" ]
+ deps = [
+ "//third_party/bounds_checking_function:libsec_shared",
+ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils"
+ ]
+ cflags = [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-fsigned-char",
+ "-fno-common",
+ "-fno-strict-aliasing",
+ "-Wno-format",
+ "-Wno-format-extra-args",
+ ]
+
+ include_dirs += [
+ "//device/soc/hisilicon/ss928v100/sdk_linux/smp/a55_linux/mpp/out/include"
+ ]
+ deps += ["//device/soc/hisilicon/ss928v100/sdk_linux:hispark_ss928v100_sdk"]
+
+ defines += [ "ENABLE_H8" ]
+ ldflags = [ "-lss_tde" ]
+ }
+
+ shared_library("display_gralloc") {
+ output_name = "display_gralloc"
+ sources = [ "ss928/src/display_gralloc.c" ]
+
+ include_dirs = [
+ "./ss928/include",
+ "./ss928/include/adapt",
+ "//drivers/peripheral/base",
+ "//drivers/peripheral/display/hal",
+ "//drivers/peripheral/display/interfaces/include",
+ "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
+ ]
+
+ defines = [ "__USER__" ]
+ deps = [
+ "//third_party/bounds_checking_function:libsec_shared",
+ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils"
+ ]
+ cflags = [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-fsigned-char",
+ "-fno-common",
+ "-fno-strict-aliasing",
+ "-Wno-format",
+ "-Wno-format-extra-args",
+ ]
+
+ include_dirs += [
+ "//device/soc/hisilicon/ss928v100/sdk_linux/smp/a55_linux/mpp/out/include"
+ ]
+ deps += ["//device/soc/hisilicon/ss928v100/sdk_linux:hispark_ss928v100_sdk"]
+
+ defines += [ "ENABLE_H8" ]
+ ldflags = [
+ "-lss_mpi",
+ "-lss_voice_engine",
+ ]
+
+ ldflags += [
+ "-lss_dnvqe",
+ "-lss_upvqe"
+ ]
+ }
+
+ lite_component("hdi_display") {
+ features = [
+ ":display_layer",
+ ":display_gfx",
+ ":display_gralloc"
+ ]
+ }
+ } else {
+ board = board_name
+ if (board_name == "hispark_taurus" || board_name == "aegis_hi3516dv300") {
+ board = "hi3516dv300"
+ } else if (board_name == "hispark_aries") {
+ board = "hi3518ev300"
+ }
+
+ if (ohos_build_compiler == "clang" && ohos_kernel_type == "liteos_a") {
+ copy("display_layer") {
+ sources = [ "${board}/liteos_a/lib/libdisplay_layer.so" ]
+ outputs = [ "$root_out_dir/libdisplay_layer.so" ]
+ }
+
+ copy("display_gfx") {
+ sources = [ "${board}/liteos_a/lib/libdisplay_gfx.so" ]
+ outputs = [ "$root_out_dir/libdisplay_gfx.so" ]
+ }
+
+ copy("display_gralloc") {
+ sources = [ "${board}/liteos_a/lib/libdisplay_gralloc.so" ]
+ outputs = [ "$root_out_dir/libdisplay_gralloc.so" ]
+ }
+ } else if (ohos_build_compiler == "clang" && ohos_kernel_type == "linux") {
+ copy("display_layer") {
+ sources = [ "${board}/linux_small/lib/libdisplay_layer.so" ]
+ outputs = [ "$root_out_dir/libdisplay_layer.so" ]
+ }
+
+ copy("display_gfx") {
+ sources = [ "${board}/linux_small/lib/libdisplay_gfx.so" ]
+ outputs = [ "$root_out_dir/libdisplay_gfx.so" ]
+ }
+
+ copy("display_gralloc") {
+ sources = [ "${board}/linux_small/lib/libdisplay_gralloc.so" ]
+ outputs = [ "$root_out_dir/libdisplay_gralloc.so" ]
+ }
+ }
+
+ group("hdi_display") {
+ deps = [
+ ":display_gfx",
+ ":display_gralloc",
+ ":display_layer",
+ ]
+ }
+ }
+} else {
+ import("//build/ohos.gni")
+
+ group("display_gralloc") {
+ deps = [
+ "//drivers/peripheral/display/hal/default_standard:def_display_gralloc",
+ ]
+ if (device_name == "hispark_phoenix") {
+ deps += [ "source/display_gralloc:hisi_display_gralloc" ]
+ }
+ }
+
+ group("display_device") {
+ deps = [
+ "//drivers/peripheral/display/hal/default_standard:def_display_device",
+ ]
+ if (device_name == "hispark_phoenix") {
+ deps += [ "hi3751v350/linux_standard/adapter:display_adapter_impl" ]
+ }
+ }
+
+ group("display_layer") {
+ if (device_name == "hispark_phoenix") {
+ deps = [ ":display_device" ]
+ } else {
+ deps = [ ":display_layer_lib" ]
+ }
+ }
+
+ ohos_prebuilt_shared_library("display_gfx") {
+ if (target_cpu == "arm") {
+ source = "hi3516dv300/linux_standard/lib/libdisplay_gfx.z.so"
+ } else {
+ source = "hi3516dv300/linux_standard/lib64/libdisplay_gfx.z.so"
+ }
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hdf"
+ part_name = "drivers_peripheral_display"
+ }
+
+ ohos_prebuilt_shared_library("display_layer_lib") {
+ if (target_cpu == "arm") {
+ source = "hi3516dv300/linux_standard/lib/libdisplay_layer.z.so"
+ } else {
+ source = "hi3516dv300/linux_standard/lib64/libdisplay_layer.z.so"
+ }
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hdf"
+ part_name = "drivers_peripheral_display"
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_small/lib/libdisplay_gfx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_small/lib/libdisplay_gfx.so
new file mode 100755
index 0000000000000000000000000000000000000000..7e9f43665d9c2e1022ee5d442c914d9779c7c820
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_small/lib/libdisplay_gfx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_small/lib/libdisplay_gralloc.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_small/lib/libdisplay_gralloc.so
new file mode 100755
index 0000000000000000000000000000000000000000..7d3f53436c1da2126b47a52e992efe6e3d83ac92
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_small/lib/libdisplay_gralloc.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_small/lib/libdisplay_layer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_small/lib/libdisplay_layer.so
new file mode 100755
index 0000000000000000000000000000000000000000..a2f1773f1cec3b8cc6414aa8f09f59d25a468722
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_small/lib/libdisplay_layer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_device.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_device.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..c5aacf202c874958debb2c128a19acb4cf19a129
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_device.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_gfx.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_gfx.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..69c9f4b041d3d64e7471c97334b1729c664f3abd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_gfx.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_gralloc.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_gralloc.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..e941c38cbe69fe5227c1bcd12160a84d7ab56f05
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_gralloc.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_layer.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_layer.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..d3139457b2dad127470a8395aea8508da2545bda
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib/libdisplay_layer.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_device.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_device.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..50fa4f40222ff58d56fc8a9a21daab3d17a11fa0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_device.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_gfx.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_gfx.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..69c9f4b041d3d64e7471c97334b1729c664f3abd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_gfx.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_gralloc.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_gralloc.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..ce1e6d959b5493350bf0d962d385f043e0a1bc52
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_gralloc.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_layer.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_layer.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..53705e692dbf28533165d7d9ba61eb29863bca58
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/linux_standard/lib64/libdisplay_layer.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/liteos_a/lib/libdisplay_gfx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/liteos_a/lib/libdisplay_gfx.so
new file mode 100755
index 0000000000000000000000000000000000000000..4dcd284a8cbf238a076191d18b073a98d76fa1bc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/liteos_a/lib/libdisplay_gfx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/liteos_a/lib/libdisplay_gralloc.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/liteos_a/lib/libdisplay_gralloc.so
new file mode 100755
index 0000000000000000000000000000000000000000..2c6b718b6c7763b23170f7ef1cd34eea04b5bf9a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/liteos_a/lib/libdisplay_gralloc.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/liteos_a/lib/libdisplay_layer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/liteos_a/lib/libdisplay_layer.so
new file mode 100755
index 0000000000000000000000000000000000000000..7d240673146e64be017393c54899068acdadf179
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3516dv300/liteos_a/lib/libdisplay_layer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3518ev300/liteos_a/lib/libdisplay_gfx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3518ev300/liteos_a/lib/libdisplay_gfx.so
new file mode 100755
index 0000000000000000000000000000000000000000..245dd88984e507a1893129905052bce2fe72244c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3518ev300/liteos_a/lib/libdisplay_gfx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3518ev300/liteos_a/lib/libdisplay_gralloc.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3518ev300/liteos_a/lib/libdisplay_gralloc.so
new file mode 100755
index 0000000000000000000000000000000000000000..694807ef536f17c0dd4eda2de824e53317dece5a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3518ev300/liteos_a/lib/libdisplay_gralloc.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3518ev300/liteos_a/lib/libdisplay_layer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3518ev300/liteos_a/lib/libdisplay_layer.so
new file mode 100755
index 0000000000000000000000000000000000000000..38e8662e4afa3c73d07f77d57f7cca804872ffde
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3518ev300/liteos_a/lib/libdisplay_layer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/adapter/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/adapter/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..140d6190921a5c33a355aa18ff57bf6fc9e0386f
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/adapter/BUILD.gn
@@ -0,0 +1,39 @@
+# Copyright (c) 2022 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.
+
+import("//build/ohos.gni")
+
+ohos_shared_library("display_adapter_impl") {
+ sources = [ "display_adapter_impl.cpp" ]
+
+ output_name = "display_adapter_impl"
+ include_dirs = [
+ "//drivers/peripheral/display/hal/default_standard/include",
+ "//device/soc/hisilicon/hi3751v350/sdk_linux/include",
+ "//drivers/peripheral/display/interfaces/include",
+ "//drivers/peripheral/base",
+ ]
+
+ defines = [ "USING_USERSPACE_DRV" ]
+
+ deps = [
+ "//device/soc/hisilicon/hi3751v350/sdk_linux:libdriver_invocation.z.so",
+ "//device/soc/hisilicon/hi3751v350/sdk_linux:libfb_mpdi_adapter.z.so",
+ ]
+
+ external_deps = [ "hilog:libhilog" ]
+
+ install_images = [ "system" ]
+ subsystem_name = "hdf"
+ part_name = "drivers_peripheral_display"
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/adapter/LICENSE b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/adapter/LICENSE
new file mode 100755
index 0000000000000000000000000000000000000000..4947287f7b5ccb5d1e8b7b2d3aa5d89f322c160d
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/adapter/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/adapter/display_adapter_impl.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/adapter/display_adapter_impl.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..f4976a9e4388c1d5d36ee5226f2e1b127326de7a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/adapter/display_adapter_impl.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/lib/libdisplay_device.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/lib/libdisplay_device.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..923c86ec12a2cc620555ff9ebe145fdaf913321f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/lib/libdisplay_device.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/lib/libdisplay_gralloc.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/lib/libdisplay_gralloc.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..629b1367ab1561e59cf7fd134a6055c3bd43a48a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/hi3751v350/linux_standard/lib/libdisplay_gralloc.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_config.gni b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_config.gni
new file mode 100755
index 0000000000000000000000000000000000000000..a05a5c7c54647969147bc6e7712d1429aa9b2dfe
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_config.gni
@@ -0,0 +1,14 @@
+# Copyright (c) 2022 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.
+
+import("//build/ohos.gni")
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..712da91d3e08fbb0305d565c57fa38c975362fda
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/BUILD.gn
@@ -0,0 +1,88 @@
+# Copyright (c) 2022 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.
+
+import("//build/ohos.gni")
+import("../display_config.gni")
+
+config("hisi_display_device_pub_config") {
+ visibility = [ ":*" ]
+
+ include_dirs = [
+ "//drivers/peripheral/display/interfaces/include",
+ "//drivers/peripheral/base",
+ "//drivers/peripheral/display/hal/default_standard/src/display_device",
+ "//drivers/peripheral/display/hal/default_standard/include",
+ ]
+}
+
+ohos_shared_library("hisi_display_device") {
+ sources = [
+ "src/composer/hdi_composer.cpp",
+ "src/composer/hdi_gfx_composition.cpp",
+ "src/composer/hdi_video_composition.cpp",
+ "src/core/hdi_device_interface.cpp",
+ "src/core/hdi_display.cpp",
+ "src/core/hdi_layer.cpp",
+ "src/core/hdi_session.cpp",
+ "src/drm/drm_connector.cpp",
+ "src/drm/drm_crtc.cpp",
+ "src/drm/drm_device.cpp",
+ "src/drm/drm_display.cpp",
+ "src/drm/drm_encoder.cpp",
+ "src/drm/drm_plane.cpp",
+ "src/drm/drm_vsync_worker.cpp",
+ "src/drm/hdi_drm_composition.cpp",
+ "src/drm/hdi_drm_layer.cpp",
+ "src/fbdev/fb_composition.cpp",
+ "src/fbdev/fb_device.cpp",
+ "src/fbdev/fb_display.cpp",
+ "src/vsync/sorft_vsync.cpp",
+ ]
+ public_configs = [ ":hisi_display_device_pub_config" ]
+
+ output_name = "display_device"
+
+ include_dirs = [
+ "include",
+ "//drivers/peripheral/display/interfaces/include",
+ "//drivers/peripheral/base",
+ "src/drm",
+ "src/fbdev",
+ "src/core",
+ "src/composer",
+ "src/vsync",
+ ]
+
+ deps = [
+ "../utils:display_utils",
+ "//drivers/peripheral/display/hal:hdi_display_gralloc",
+ "//third_party/libdrm:libdrm",
+ ]
+
+ cflags = [ "-Wno-unused-function" ]
+
+ external_deps = [
+ "c_utils:utils",
+ "hdf_core:libhdf_utils",
+ "hilog:libhilog",
+ "hitrace:hitrace_meter",
+ ]
+
+ symlink_target_name = [ "libdisplay_layer.z.so" ]
+
+ install_enable = true
+ install_images = [ system_base_dir ]
+ relative_install_dir = "chipset-sdk"
+ subsystem_name = "hdf"
+ part_name = "display_device_driver"
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_composer.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_composer.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..c91b0152d5cda9c0c1a50bedf771d29240386295
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_composer.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_composer.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_composer.h
new file mode 100755
index 0000000000000000000000000000000000000000..73a09b3168a60391e7d69d85f8bafe45cbb95f1e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_composer.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_gfx_composition.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_gfx_composition.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..3b336f0652ce042994427dbd7b0d2079eea5edc7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_gfx_composition.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_gfx_composition.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_gfx_composition.h
new file mode 100755
index 0000000000000000000000000000000000000000..7a0648b8947791243b249ecce8e88ad4f24843f3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_gfx_composition.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_video_composition.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_video_composition.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..1c8f6730dab9ea3f4a1a3fcfbf2d46f5e577aae2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_video_composition.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_video_composition.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_video_composition.h
new file mode 100755
index 0000000000000000000000000000000000000000..77344455bbfd81923cd46bd69c7f094550457d76
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/composer/hdi_video_composition.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_device_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_device_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..2f96426ac7caa23fc72711b05eb1aa49f96da4ef
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_device_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_device_interface.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_device_interface.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..7957a155a40349d2fdeac93e1c2d4ebc6e2b013a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_device_interface.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_device_interface.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_device_interface.h
new file mode 100755
index 0000000000000000000000000000000000000000..4db5d55cee5dfdad3f9161a4b3a61d1479b63204
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_device_interface.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_display.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_display.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..ca3b1b44a935a405c6b5f16d25e9bde9b8549769
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_display.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_display.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_display.h
new file mode 100755
index 0000000000000000000000000000000000000000..c419786f816cc730cd5c66d4442655b6403b855f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_display.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_fd.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_fd.h
new file mode 100755
index 0000000000000000000000000000000000000000..991bb48e9fd59779cad364606e18dd0cd03fb14e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_fd.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_layer.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_layer.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..42d3938ea7781ac619bc619bdb869542b7f0b880
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_layer.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_layer.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_layer.h
new file mode 100755
index 0000000000000000000000000000000000000000..1e2a6a15e6955a37ae8d7caa9e60baa7ed1c9f10
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_layer.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_netlink_monitor.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_netlink_monitor.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..c528a4c83ad5fe6a00b72ce2b7ea01512a7ecc36
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_netlink_monitor.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_netlink_monitor.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_netlink_monitor.h
new file mode 100755
index 0000000000000000000000000000000000000000..a190fc98a074e68c8e995f56b37f9bf98aad96d2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_netlink_monitor.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_session.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_session.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..4572bcff453613d8e32206961fff92d04f823110
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_session.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_session.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_session.h
new file mode 100755
index 0000000000000000000000000000000000000000..6daab6750bb86f1cb8ee7fd5313a056905a25e27
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/core/hdi_session.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_connector.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_connector.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..2282e18cde82b5d259f07af7f7a6ab8d56ac0082
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_connector.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_connector.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_connector.h
new file mode 100755
index 0000000000000000000000000000000000000000..988951f35aba0f9b93bf3a81dd8a0c8ed9ffcf6a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_connector.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_crtc.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_crtc.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..44b524f8ce325ff2a8fa5b5944e5559ef6da92e3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_crtc.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_crtc.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_crtc.h
new file mode 100755
index 0000000000000000000000000000000000000000..2b87bf04385ea92da7bcc7d1c67a4ce16cee4d46
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_crtc.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_device.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_device.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..b54985c4623a537b70395fe8426931897562f16e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_device.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_device.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_device.h
new file mode 100755
index 0000000000000000000000000000000000000000..8ea433468a2adae86127485ab2fc2f3c09960c4f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_device.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_display.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_display.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..8c5758a309402e2168ddaa1d81cdf603fe1edafd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_display.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_display.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_display.h
new file mode 100755
index 0000000000000000000000000000000000000000..b5264a9b9967b683d44dd2b9567eef7d4ddcc1f6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_display.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_encoder.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_encoder.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..1eeb552b0b696d9a023e9ad9aa5569a9f19f6ab9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_encoder.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_encoder.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_encoder.h
new file mode 100755
index 0000000000000000000000000000000000000000..c3f9521e11d4925b18cf002d1101d45b2c9669a8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_encoder.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_plane.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_plane.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..3b0098f8bc6e5dedd826724dc9f6f3d40c403cc9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_plane.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_plane.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_plane.h
new file mode 100755
index 0000000000000000000000000000000000000000..5543919337bda89b8d5c225036d02bef42619bb3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_plane.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_vsync_worker.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_vsync_worker.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..17fb9fb8bac031d908db367ddbe47a3d3bff65bc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_vsync_worker.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_vsync_worker.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_vsync_worker.h
new file mode 100755
index 0000000000000000000000000000000000000000..883d119877a92a9804a0ef3921887966b087c973
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/drm_vsync_worker.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_composition.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_composition.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..e5e1bcfca6b02716d7159d89b15106d81f2c71f8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_composition.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_composition.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_composition.h
new file mode 100755
index 0000000000000000000000000000000000000000..6288956dfc1cfd89b103a7b3f410abc93af5a368
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_composition.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_layer.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_layer.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..9da2abf3eb09cff1914c7b1777d8f843f02210cb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_layer.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_layer.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_layer.h
new file mode 100755
index 0000000000000000000000000000000000000000..e2660ddb83430ee60e511e88a88c515ffed28363
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/drm/hdi_drm_layer.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_composition.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_composition.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..a4c69906f7aebb8da97daf8550d7a6ef9b2b21ab
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_composition.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_composition.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_composition.h
new file mode 100755
index 0000000000000000000000000000000000000000..939e5a4808fb3c0cefde45794b94655431ce32ae
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_composition.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_device.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_device.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..ffe76b9a396f2f8286efe657a68f75d15c1e1530
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_device.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_device.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_device.h
new file mode 100755
index 0000000000000000000000000000000000000000..d07e489eeaa51e2b4fd36b1ea7103f2d1c781a33
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_device.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_display.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_display.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..7148a3249149ae4bd82523a0d6044f3f23ba6930
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_display.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_display.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_display.h
new file mode 100755
index 0000000000000000000000000000000000000000..b619111d6e462d4bca9f5725bfcb0a1eea5f18d6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/fbdev/fb_display.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/vsync/sorft_vsync.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/vsync/sorft_vsync.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..f94f0a79d449c90a465ab324841bc785afa87a08
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/vsync/sorft_vsync.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/vsync/sorft_vsync.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/vsync/sorft_vsync.h
new file mode 100755
index 0000000000000000000000000000000000000000..f0d9c38b100a16700456d0cb4dc834457957b00c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_device/src/vsync/sorft_vsync.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..5cfbbfd3162f6d4ca77238aec7f02371457c4383
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/BUILD.gn
@@ -0,0 +1,59 @@
+# Copyright (c) 2022 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.
+
+import("//build/ohos.gni")
+import("../display_config.gni")
+
+config("display_gralloc_config") {
+ visibility = [ ":*" ]
+
+ include_dirs = [ "include" ]
+}
+ohos_shared_library("hisi_display_gralloc") {
+ sources = [
+ "src/allocator.cpp",
+ "src/allocator_manager.cpp",
+ "src/display_gralloc.cpp",
+ "src/display_gralloc_private.cpp",
+ "src/dmabufferheap_allocator.cpp",
+ "src/drm_allocator.cpp",
+ "src/framebuffer_allocator.cpp",
+ ]
+
+ public_configs = [ ":display_gralloc_config" ]
+
+ configs = []
+
+ output_name = "display_gralloc"
+
+ include_dirs = [
+ "//drivers/peripheral/display/interfaces/include",
+ "//drivers/peripheral/base",
+ "//third_party/libdrm",
+ "//third_party/libdrm/include/drm",
+ "src",
+ ]
+
+ external_deps = [ "hilog:libhilog" ]
+
+ deps = [
+ "../utils:display_utils",
+ "//commonlibrary/memory_utils/libdmabufheap:libdmabufheap",
+ "//third_party/libdrm:libdrm",
+ ]
+
+ install_enable = true
+ install_images = [ "system" ]
+ subsystem_name = "hdf"
+ part_name = "display_device_driver"
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/include/display_gralloc_private.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/include/display_gralloc_private.h
new file mode 100755
index 0000000000000000000000000000000000000000..7d5af437f38bbcdd33ddb4dbe81642949e8c263b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/include/display_gralloc_private.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..7bd118590476add1f379ce5770240df0dfedee6e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator.h
new file mode 100755
index 0000000000000000000000000000000000000000..395c219c5876642b421a98d761b15f66e8ceb85f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator_manager.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator_manager.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..37e1544b6fcbff3281ba7220e4494337a2a41e87
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator_manager.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..f0dd7d09aabaeee7a4ffc8033ffd5040523a4748
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/allocator_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/display_gralloc.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/display_gralloc.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..4fdd64d939258292c1acba291e4ec85318083cb1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/display_gralloc.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/display_gralloc_private.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/display_gralloc_private.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..3369c7ee0693b946c84e377e05a6731a6de2fe63
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/display_gralloc_private.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/dmabufferheap_allocator.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/dmabufferheap_allocator.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..faaab8db006f79635aac8b4e4e0803d23f0d5b9c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/dmabufferheap_allocator.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/dmabufferheap_allocator.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/dmabufferheap_allocator.h
new file mode 100755
index 0000000000000000000000000000000000000000..f056b710f439547860870ab39e1d02d03a2950fb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/dmabufferheap_allocator.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/drm_allocator.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/drm_allocator.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..c1da60e25a307ef7f5f1fdc65887ea3b6a00d9f6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/drm_allocator.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/drm_allocator.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/drm_allocator.h
new file mode 100755
index 0000000000000000000000000000000000000000..d20a2531eda6f6878c2932dba8dd309fc8786cff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/drm_allocator.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/framebuffer_allocator.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/framebuffer_allocator.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..506c72db19fc9bf3a09c002a6b765c6b25c5bb25
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/framebuffer_allocator.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/framebuffer_allocator.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/framebuffer_allocator.h
new file mode 100755
index 0000000000000000000000000000000000000000..ae269fa8b0db16238b7aa2416871305624567551
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/framebuffer_allocator.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/hisilicon_drm.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/hisilicon_drm.h
new file mode 100755
index 0000000000000000000000000000000000000000..5b5904faafef4e28258c9226470167c430531b04
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/display_gralloc/src/hisilicon_drm.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..d884c464bd7cd1190503c9f9ad49f31e4b9cf013
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/BUILD.gn
@@ -0,0 +1,54 @@
+# Copyright (c) 2022 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.
+
+import("//build/ohos.gni")
+config("utils_config") {
+ visibility = [ ":*" ]
+
+ include_dirs = [
+ "//drivers/peripheral/display/interfaces/include",
+ "//drivers/peripheral/base",
+ "include",
+ ]
+
+ cflags_cc = [
+ "-Wno-error=missing-braces",
+ "-Wno-error=#warnings",
+ ]
+}
+
+ohos_static_library("display_utils") {
+ sources = [
+ "src/display_adapter.cpp",
+ "src/display_utils.cpp",
+ "src/id_generator.cpp",
+ ]
+
+ public_configs = [ ":utils_config" ]
+
+ output_name = "display_utils"
+
+ include_dirs = [ "src" ]
+
+ external_deps = [
+ "c_utils:utils",
+ "hilog:libhilog",
+ ]
+
+ deps = [
+ "//device/soc/hisilicon/hi3751v350/sdk_linux:libhal.so",
+ "//drivers/peripheral/display/hal/default_standard:def_display_gralloc",
+ ]
+ subsystem_name = "hdf"
+ part_name = "display_device_driver"
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_adapter.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_adapter.h
new file mode 100755
index 0000000000000000000000000000000000000000..7d5daf86706f2baa8b9b93ac349c3c1a987af401
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_adapter.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_adapter_interface.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_adapter_interface.h
new file mode 100755
index 0000000000000000000000000000000000000000..feb91266a4fba7372c302bc4da8be823c9c9ddf3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_adapter_interface.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..c9168d0335e6e829465153a54006d797d664a840
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_module_loader.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_module_loader.h
new file mode 100755
index 0000000000000000000000000000000000000000..bea9a36717755461ee7442ed59759a82a2594b68
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_module_loader.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_utils.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_utils.h
new file mode 100755
index 0000000000000000000000000000000000000000..d3f70d9ed05207a1274f938ff14e1f0c1f2669ff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/display_utils.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/id_generator.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/id_generator.h
new file mode 100755
index 0000000000000000000000000000000000000000..e9f33760eb6a922849f1b5a64b62e163ae2e5de4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/include/id_generator.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/src/display_adapter.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/src/display_adapter.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..56365fd149dedf599cfaac0624dcd697504b5d11
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/src/display_adapter.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/src/display_utils.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/src/display_utils.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..b223e1827b0089f88355552113899c9969ce3daf
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/src/display_utils.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/src/id_generator.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/src/id_generator.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..d9e11075aa3b0e727f2fe75a7ec62fa6efaa5a11
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/source/utils/src/id_generator.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_fb.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_fb.h
new file mode 100755
index 0000000000000000000000000000000000000000..d0e8d2cc0578a6c8413cb6cc905d5c12073ca7a7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_fb.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_hdmi.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_hdmi.h
new file mode 100755
index 0000000000000000000000000000000000000000..aa29e6baa11ff5c6261e82e569885230e71283ac
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_hdmi.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_sys.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_sys.h
new file mode 100755
index 0000000000000000000000000000000000000000..5cc30b6962d318f3a177f050533753dacb68b822
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_sys.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_tde.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_tde.h
new file mode 100755
index 0000000000000000000000000000000000000000..4cfc0e18913e85ad0d3636351edd47dabdc376dd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_tde.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_video.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_video.h
new file mode 100755
index 0000000000000000000000000000000000000000..69b09ea6717674ce00427b8cb12bca61d0aef2aa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_video.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_vo.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_vo.h
new file mode 100755
index 0000000000000000000000000000000000000000..e0a602de5166e77357b6471182c849dc5eb03dff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_vo.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_vpss.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_vpss.h
new file mode 100755
index 0000000000000000000000000000000000000000..e3f55909855d8c5eff20eaf81bbe23d0a14ddf03
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/adapt/display_adapt_vpss.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_gfx_internal.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_gfx_internal.h
new file mode 100755
index 0000000000000000000000000000000000000000..82be7f2b393f6b34a8e7ead45cfd231aa5fe9f87
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_gfx_internal.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_gralloc_internal.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_gralloc_internal.h
new file mode 100755
index 0000000000000000000000000000000000000000..6585cc9c300a25d9bf4b92e398cdb475887c2c27
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_gralloc_internal.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_layer_internal.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_layer_internal.h
new file mode 100755
index 0000000000000000000000000000000000000000..38b7bb329f60533aff89dc64ec19f4576538a25a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_layer_internal.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_overlay_layer.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_overlay_layer.h
new file mode 100755
index 0000000000000000000000000000000000000000..0d19d48f7e13455a2f3a3fd97a73ac425c227d10
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/display_overlay_layer.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/vpss_resmng.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/vpss_resmng.h
new file mode 100755
index 0000000000000000000000000000000000000000..d5ee57882cad868e25dab6c46eae3982b64a0996
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/include/vpss_resmng.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/bt1120.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/bt1120.c
new file mode 100755
index 0000000000000000000000000000000000000000..a9b3fe9abbf8f9eccf4113aedefb73bb6f262406
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/bt1120.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_device.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_device.c
new file mode 100755
index 0000000000000000000000000000000000000000..989b9d253d2b7122ae6cd55ccfa976381a8113d0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_device.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_gfx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_gfx.c
new file mode 100755
index 0000000000000000000000000000000000000000..6185226676349879aef8b1d1f59c8116d0d3ba7f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_gfx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_gralloc.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_gralloc.c
new file mode 100755
index 0000000000000000000000000000000000000000..fb151c026a2a43c492938e11715ba3784f05912c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_gralloc.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_layer.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_layer.c
new file mode 100755
index 0000000000000000000000000000000000000000..1b594ffec1e8174e89a0ad1bfa1166b1d2281fc1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_layer.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_overlay_layer.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_overlay_layer.c
new file mode 100755
index 0000000000000000000000000000000000000000..41ad414618c14b8c0295d2d122087d2e586eb6a5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/display_overlay_layer.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/hdmi.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/hdmi.c
new file mode 100755
index 0000000000000000000000000000000000000000..f54cc28ee03a93e6e34d0c5c71846ab9d9708604
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/hdmi.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/layer_test.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/layer_test.c
new file mode 100755
index 0000000000000000000000000000000000000000..3cf67b525fd9c843e0654bee3a0387afcf05b7ae
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/layer_test.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/vo_parameter_calc.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/vo_parameter_calc.c
new file mode 100755
index 0000000000000000000000000000000000000000..66c8b90b269de9dbaef4a0b147d3d86920df639d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/vo_parameter_calc.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/vpss_resmng.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/vpss_resmng.c
new file mode 100755
index 0000000000000000000000000000000000000000..6e965dbea8f763b73ed0ba0273da1657cee3adfa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/display/ss928/src/vpss_resmng.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..75c2778525e6233c820a5a3ecb8f0db040db5b80
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/BUILD.gn
@@ -0,0 +1,123 @@
+# Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2021. All rights reserved.
+
+if (defined(ohos_lite)) {
+ import("//build/lite/config/component/lite_component.gni")
+} else {
+ import("//build/ohos.gni")
+}
+
+if (defined(ohos_lite)) {
+ board = board_name
+ if (board_name == "hispark_taurus" || board_name == "aegis_hi3516dv300") {
+ board = "hi3516dv300"
+ } else if (board_name == "hispark_aries") {
+ board = "hi3518ev300"
+ } else if (board_name == "hispark_ss927v100") {
+ board = "hispark_ss927v100"
+ } else if (board_name == "hispark_ss928v100") {
+ board = "hispark_ss928v100"
+ }
+
+ media_source_dir = rebase_path("audio/source", "//build/lite/run_shell_cmd.py")
+ cmd = "if [ -d $media_source_dir ]; then echo true; else echo false; fi"
+ build_from_media_source = exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value")
+
+ build_ext_component("hardware_media_sdk") {
+ exec_path = rebase_path(".", root_build_dir)
+ outdir = rebase_path("$root_out_dir")
+ compile_dir = ""
+ if (ohos_build_compiler == "clang") {
+ if (ohos_build_compiler_dir != "") {
+ compile_dir = rebase_path("${ohos_build_compiler_dir}/bin")
+ }
+ } else if (ohos_build_compiler == "gcc"){
+ compile_dir = board_toolchain_path
+ }
+ if (!build_from_media_source) {
+ command = "./build/build_media_libs_L1.sh ${outdir} ${board} ${ohos_kernel_type} ${ohos_build_compiler} ${storage_type} ${compile_dir} ${ohos_build_compiler_dir}"
+ } else {
+ command = "./build/build_media_source_L1.sh ${outdir} ${board} ${ohos_kernel_type} ${ohos_build_compiler} ${compile_dir}"
+ }
+ }
+ group("hid_camera") {
+ if (build_from_media_source) {
+ deps = [ "//device/soc/hisilicon/common/hal/media/camera/source:hdi_camera" ]
+ }
+ }
+} else {
+ group("hardware_group") {
+ deps = [
+ ":adec",
+ ":aenc",
+ ":codec",
+ ":format_hw",
+ ":hiaacdec",
+ ":media_hal_common",
+ ":plugin_muxer_recorder",
+ ":vdec",
+ ":venc",
+ ]
+ if ("${product_name}" == "hispark_phoenix") {
+ deps += [ ":hdi_audio" ]
+ }
+ }
+
+ ohos_prebuilt_shared_library("codec") {
+ source = "codec/hi3516dv300/linux_standard/libs/libcodec.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("hiaacdec") {
+ source = "codec/hi3516dv300/linux_standard/libs/libhiaacdec.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("adec") {
+ source = "codec/hi3516dv300/linux_standard/libs/libplugin_adec_35xx.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("aenc") {
+ source = "codec/hi3516dv300/linux_standard/libs/libplugin_aenc_35xx.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("vdec") {
+ source = "codec/hi3516dv300/linux_standard/libs/libplugin_vdec_3516D.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("venc") {
+ source = "codec/hi3516dv300/linux_standard/libs/libplugin_venc_35xx.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("media_hal_common") {
+ source = "common/hi3516dv300/linux_standard/libmedia_hal_common.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("format_hw") {
+ source = "format/hi3516dv300/linux_standard/libs/libformat_hw.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("plugin_muxer_recorder") {
+ source =
+ "format/hi3516dv300/linux_standard/libs/libplugin_muxer_recorder.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ group("hdi_audio") {
+ deps = [ "audio:vendor_audio" ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..d803cc03f00f5cad9ee1d016db0d2267d10ccd67
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/Makefile
@@ -0,0 +1,32 @@
+LOCAL_DIR := $(shell pwd)
+
+COMPILE_ROOT := $(LOCAL_DIR)
+
+MODNAME :=
+MODNAME += $(shell test -f audio/source/Makefile && echo audio/source)
+MODNAME += $(shell test -f codec/source/Makefile && echo codec/source)
+MODNAME += $(shell test -f format/source/Makefile && echo format/source)
+#MODNAME += $(shell test -f video_display/source/Makefile && echo video_display/source)
+
+SUBDIRS =$(MODNAME)
+
+.PHONY: all clean
+
+#all: common_hal
+# for MOD in $(MODNAME);do \
+# pushd $(LOCAL_DIR); cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS); popd ;done
+
+all: subdirs
+
+subdirs: $(SUBDIRS)
+$(SUBDIRS): common_hal
+ $(MAKE) $(MFLAGS) -C $(COMPILE_ROOT)/$@ VERBOSE=1
+
+common_hal:
+ $(LOCAL_DIR); cd $(COMPILE_ROOT)/common/source ;$(MAKE) $(MFLAGS) VERBOSE=1;
+
+clean:
+ @for MOD in $(MODNAME);do\
+ cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) clean;done
+ pushd $(LOCAL_DIR); cd $(COMPILE_ROOT)/common/source ;$(MAKE) $(MFLAGS) clean; popd
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..5cce31e05609d1639b9b2215d77a5566a16171a0
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/BUILD.gn
@@ -0,0 +1,40 @@
+# Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2021. All rights reserved.
+
+import("//build/ohos.gni")
+
+group("vendor_audio") {
+ deps = [
+ ":audio_primary_port",
+ ":hal_common",
+ ":hdi_audio",
+ ]
+}
+
+board = "hi3516dv300"
+if ("${product_name}" == "hispark_phoenix") {
+ board = "hi3751v350"
+}
+
+ohos_prebuilt_shared_library("hdi_audio") {
+ source = "${board}/linux_standard/libs/libhdi_audio.z.so"
+ install_enable = true
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hdf"
+ part_name = "drivers_peripheral_audio"
+}
+
+ohos_prebuilt_shared_library("audio_primary_port") {
+ source = "${board}/linux_standard/libs/libaudio_primary_port.so"
+ install_enable = true
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hdf"
+ part_name = "drivers_peripheral_audio"
+}
+
+ohos_prebuilt_shared_library("hal_common") {
+ source = "../common/${board}/linux_standard/libs/libmedia_hal_common.so"
+ install_enable = true
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hdf"
+ part_name = "drivers_peripheral_audio"
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_small/libs/libaudio_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_small/libs/libaudio_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..c12378995e09bf28d9d5ec9e61c6daef5f24ee45
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_small/libs/libaudio_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_small/libs/libaudio_primary_port.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_small/libs/libaudio_primary_port.so
new file mode 100755
index 0000000000000000000000000000000000000000..9c63a80319d4372e5a45b9ab812cfceec0b7414a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_small/libs/libaudio_primary_port.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_standard/libs/libaudio_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_standard/libs/libaudio_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..e65c78001f667bb57bfac143451b7a9c4bbadd08
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_standard/libs/libaudio_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_standard/libs/libaudio_input_port.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_standard/libs/libaudio_input_port.so
new file mode 100755
index 0000000000000000000000000000000000000000..596e52616127823195b5b99fdbd483647107bda7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_standard/libs/libaudio_input_port.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_standard/libs/libaudio_output_port.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_standard/libs/libaudio_output_port.so
new file mode 100755
index 0000000000000000000000000000000000000000..982577a7ff731910ffaffde4bd3ca5d3b0fbac95
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/linux_standard/libs/libaudio_output_port.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/liteos_a/libs/libaudio_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/liteos_a/libs/libaudio_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..4aeef581096b82a23f1aa8d021c06e8557ed4003
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/liteos_a/libs/libaudio_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/liteos_a/libs/libaudio_primary_port.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/liteos_a/libs/libaudio_primary_port.so
new file mode 100755
index 0000000000000000000000000000000000000000..f3d97e61495846fa9f4715addcaafc2ab92cf350
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3516dv300/liteos_a/libs/libaudio_primary_port.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3518ev300/liteos_a/libs/libaudio_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3518ev300/liteos_a/libs/libaudio_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..4aeef581096b82a23f1aa8d021c06e8557ed4003
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3518ev300/liteos_a/libs/libaudio_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3518ev300/liteos_a/libs/libaudio_primary_port.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3518ev300/liteos_a/libs/libaudio_primary_port.so
new file mode 100755
index 0000000000000000000000000000000000000000..119268f09cbedf59b9334529be36048085516330
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3518ev300/liteos_a/libs/libaudio_primary_port.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3751v350/linux_standard/libs/libaudio_primary_port.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3751v350/linux_standard/libs/libaudio_primary_port.so
new file mode 100755
index 0000000000000000000000000000000000000000..6e35f05a1598360228bd7c148c13dce7d45a0544
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3751v350/linux_standard/libs/libaudio_primary_port.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3751v350/linux_standard/libs/libhdi_audio.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3751v350/linux_standard/libs/libhdi_audio.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..7659e7e1719bf1b545e729ba0a44deded4812764
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/hi3751v350/linux_standard/libs/libhdi_audio.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hdmi_port.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hdmi_port.a
new file mode 100755
index 0000000000000000000000000000000000000000..068c8a4d8e355dba8b93a1bd997012cc549d2e3e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hdmi_port.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hdmi_port.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hdmi_port.so
new file mode 100755
index 0000000000000000000000000000000000000000..422cd32727b1169f7660fee872e364c38aa5d5a7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hdmi_port.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hw.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hw.a
new file mode 100755
index 0000000000000000000000000000000000000000..6a3d830ecdbb6b10a4c4fb55332ba210e6cecd5c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hw.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..ef0ee7ad76d022fa8588b7725f84171906feb991
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_primary_port.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_primary_port.a
new file mode 100755
index 0000000000000000000000000000000000000000..ecbef41bf5c3fc192deaf063f9281d9bcdc2ecb8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_primary_port.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_primary_port.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_primary_port.so
new file mode 100755
index 0000000000000000000000000000000000000000..57ec600a15341dbbbb845d9e45211190912a5b0b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_primary_port.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_usb_port.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_usb_port.a
new file mode 100755
index 0000000000000000000000000000000000000000..f1df49b8812a5b8758d8855265b33adbe751426a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_usb_port.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_usb_port.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_usb_port.so
new file mode 100755
index 0000000000000000000000000000000000000000..fc41c9b041a1a8fb1d632344aa891cf3ccf3ef53
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/libs/hispark_ss928v100/llvm/linux/libs/libaudio_usb_port.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..76b68523be754f6e8be3f1d10b00c424e9f86492
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/Makefile
@@ -0,0 +1,71 @@
+LOCAL_DIR := $(shell pwd)
+#vendor\hisi\hi35xx\hardware\media
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+#===============================================================================
+# self deps
+#===============================================================================
+AUDIO_INTERFACE_PATH := $(MEDIA_BASE_DIR)/../../../../../../drivers/peripheral/audio/interfaces/include
+
+SRC_DEPS_INC_PATH += -I$(MEDIA_HAL_COMMN_INC_PATH) \
+ -I$(AUDIO_INTERFACE_PATH) \
+ -I$(LOCAL_DIR)/src/audio_plugins_manager/include \
+ -I$(LOCAL_DIR)/plugins/plugin_include \
+ -I$(LOCAL_DIR)/plugins/hi35xx/audio_primary_port_plugin \
+ -I$(SECUREC_INC_PATH)
+
+
+SRC_ROOT := $(LOCAL_DIR)
+OBJ_ROOT := $(SRC_ROOT)/obj
+TRAGET_ROOT := $(SRC_ROOT)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+SRCS := $(shell find $(SRC_ROOT) -maxdepth 2 -type f -name '*.c' -print)
+SRCS := $(sort $(SRCS))
+SRCS += $(LOCAL_DIR)/src/audio_plugins_manager/src/audio_plugins_manager.c
+OBJS := $(SRCS:%.c=%.o)
+OBJS := $(sort $(OBJS))
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+# create obj dir $$ target dir
+CreateResult :=
+dummy := $(call CreateDir, $(OBJ_ROOT))
+dummy += $(call CreateDir, $(TRAGET_ROOT))
+dummy += $(foreach dir, $(OBJ_DIR), CreateResult += $(call CreateDir, $(dir)))
+ifneq ($(strip $(CreateResult)),)
+ $(error $(CreateResult))
+endif
+
+CFLAGS_CUR := $(CFLAGS) -fdata-sections -fno-omit-frame-pointer -DENABLE_DL_AUDIO_PLUGIN
+LDFLAGS_SO := $(LDFLAGS)
+
+SRC_DEPS_LIB += -lsecurec -lpthread -ldl -lm -lmedia_hal_common
+SRC_DEPS_LIB_PATH += -L$(MEDIA_HAL_COMMN_LIB_PATH)\
+ -L$(SECUREC_LIB_PATH)
+
+LIB_SO := $(TRAGET_ROOT)/libaudio_hw.so
+LIB_A := $(TRAGET_ROOT)/libaudio_hw.a
+
+.PHONY : clean all
+
+all: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+ @-rm -r $(OBJ_ROOT)
+
+$(LIB_A): $(OBJS)
+ $(AR) -rcv $@ $^
+
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS_CUR) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ @pushd $(LOCAL_DIR);cd plugins || exit "$$?";make || exit "$$?";popd
+ $(STRIP) $(LIB_SO)
+
+
+$(OBJS): %.o : %.c
+ $(CC) $(CFLAGS_CUR) $(LFLAGS) $(SRC_DEPS_INC_PATH) -c $< -o $@
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
+ @pushd $(LOCAL_DIR);cd plugins;make clean;popd
+ @-rm -r $(TRAGET_ROOT) $(OBJ_ROOT)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/audio_types.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/audio_types.h
new file mode 100755
index 0000000000000000000000000000000000000000..fe2def3d36a19075634ecac63a6f6d5e11d3eab3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/audio_types.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_adapter.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_adapter.h
new file mode 100755
index 0000000000000000000000000000000000000000..f9a28f10d3b40e0bda7cabe3356bb045d0e0c546
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_adapter.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_callback.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_callback.h
new file mode 100755
index 0000000000000000000000000000000000000000..7c8e6120bfcf2e47acf1cbc33a927f0934313934
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_callback.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_capture.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_capture.h
new file mode 100755
index 0000000000000000000000000000000000000000..f4f793cd4a3fccbf6a948fce3bfef0fcdc337e76
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_capture.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_device_callback.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_device_callback.h
new file mode 100755
index 0000000000000000000000000000000000000000..ec2130127a8d3bda505021c7aa5d9c63ae68ac4c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_device_callback.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..a9e7a6fe16003e2d382867ce2293a50d15e4de62
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_render.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_render.h
new file mode 100755
index 0000000000000000000000000000000000000000..8166be017bad9cfb9605b3eebf765c40fc802262
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0/iaudio_render.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0/id_audio_callback.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0/id_audio_callback.h
new file mode 100755
index 0000000000000000000000000000000000000000..67a7d2bf013a7091cc5dea310ca9a580f3650069
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0/id_audio_callback.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0/id_audio_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0/id_audio_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..833165c25078aad739278133844dd7a232a7ab05
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0/id_audio_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0/types.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0/types.h
new file mode 100755
index 0000000000000000000000000000000000000000..a88fdd40f46369b28e0d922d234f73677ecd329c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0/types.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..44ac1f1313793a0636f384445fead5b356ab0e81
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/BUILD.gn
@@ -0,0 +1,19 @@
+# Copyright (c) 2022 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("distributed_audio_entry") {
+ deps = [
+ "./hdi_service/audio/v1_0:libaudio_manager_daudio_primary_service_1.0",
+ "./hdi_service/audio_ext/v1_0:libdaudio_manager_daudio_ext_service_1.0",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..393b976b170d0658f5396c836050df264ce3fe18
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn
@@ -0,0 +1,71 @@
+# 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.
+
+import("//build/ohos.gni")
+import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
+import("//foundation/distributedhardware/distributed_audio/distributedaudio.gni")
+import("//foundation/multimedia/media_utils_lite/config.gni")
+
+shared_library("libaudio_manager_daudio_primary_service_1.0") {
+ include_dirs = [
+ "${hdf_ser_aud_path_lite}/include",
+ "${hdf_service_path}/hdi_service/common/include",
+ "${hdf_service_path}/hdi_service/common/log/include",
+ "${hdf_service_path}/hdi_service/common/utils/include",
+ "${distributed_audio_hdf_path}/hdf_interfaces/distributed_audio/audio/v1_0",
+ "${distributed_audio_hdf_path}/hdf_interfaces/distributed_audio/audioext/v1_0",
+ "//drivers/hdf_core/interfaces/inner_api/utils",
+ "//drivers/hdf_core/interfaces/inner_api/osal/uhdf",
+ "//third_party/cJSON",
+ "//base/hiviewdfx/hilog_lite/interfaces/native/kits"
+ ]
+
+ if (distributed_audio_extension_sa) {
+ include_dirs +=
+ [ "${distributedaudio_ext_path}/hdf_service_extension/include/" ]
+ }
+
+ sources = [
+ "./src/audio_adapter_interface_impl.cpp",
+ "./src/audio_capture_interface_impl.cpp",
+ "./src/audio_manager_interface_impl.cpp",
+ "./src/audio_render_interface_impl.cpp",
+ ]
+
+ if (distributed_audio_extension_sa) {
+ sources += [
+ "${distributedaudio_ext_path}/hdf_service_extension/src/audio_capture_ext_impl.cpp",
+ "${distributedaudio_ext_path}/hdf_service_extension/src/audio_render_ext_impl.cpp",
+ ]
+ }
+
+ public_deps = [ "${hdf_service_path}/hdi_service/common:libdaudio_hdf_utils" ]
+
+ deps = [
+ "//commonlibrary/c_utils/base:utils",
+ "//foundation/multimedia/audio_lite/services/audiomanager:audio_device_manager_lite",
+ "//foundation/multimedia/media_utils_lite:media_common",
+ ]
+
+ if (distributed_audio_extension_sa) {
+ cflags = [ "-DDAUDIO_SUPPORT_EXTENSION" ]
+ }
+
+ defines = [
+ "HI_LOG_ENABLE",
+ "LOG_DOMAIN=0xD004100",
+ ]
+ if (enable_distributed_dfx == true) {
+ defines += ["ENABLE_DFX"]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_adapter_interface_impl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_adapter_interface_impl.h
new file mode 100755
index 0000000000000000000000000000000000000000..3d4ce238fc5c009bd8c6a18abc49d87bae242273
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_adapter_interface_impl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h
new file mode 100755
index 0000000000000000000000000000000000000000..1204a36748617437717d882e6fbfdb11a934361c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h
new file mode 100755
index 0000000000000000000000000000000000000000..ba9edb5d4b621067733b354792cc65984584ae65
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_manager_interface_impl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_manager_interface_impl.h
new file mode 100755
index 0000000000000000000000000000000000000000..f65224313f729bb3e9955fefbdc0857ac0b13739
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_manager_interface_impl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h
new file mode 100755
index 0000000000000000000000000000000000000000..a130566c9a037761acfe6d70d5fcb4f082687f70
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h
new file mode 100755
index 0000000000000000000000000000000000000000..1a6faa42e198abacb3e3c28edcea0899d3a781f2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_adapter_interface_impl.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_adapter_interface_impl.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..78bea3ce42a07ce25ab4c999ce46474332368786
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_adapter_interface_impl.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..3b6a3e06b249f15be6f1a2b04099a28fb4d510fb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_manager_interface_impl.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_manager_interface_impl.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..12ea1221bbaedaba820116f44bf9ff48beb863a2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_manager_interface_impl.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..ee7499bb0d27ec538131c81063fadb696fa6e5ab
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..5d3d8b2efa8fea9284f173ee51b53141950d4395
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/BUILD.gn
@@ -0,0 +1,48 @@
+# Copyright (c) 2022 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.
+
+import("//build/ohos.gni")
+import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
+import("//foundation/distributedhardware/distributed_audio/distributedaudio.gni")
+
+shared_library("libdaudio_manager_daudio_ext_service_1.0") {
+ include_dirs = [
+ "${hdf_ser_aud_path_lite}/include",
+ "${hdf_ser_aud_ext_path_lite}/include",
+ "${hdf_service_path}/hdi_service/common/include",
+ "${hdf_service_path}/hdi_service/common/log/include",
+ "${hdf_service_path}/hdi_service/common/utils/include",
+ "${distributed_audio_hdf_path}/hdf_interfaces/distributed_audio/audio/v1_0",
+ "${distributed_audio_hdf_path}/hdf_interfaces/distributed_audio/audioext/v1_0",
+ "//drivers/hdf_core/interfaces/inner_api/utils",
+ "//drivers/hdf_core/interfaces/inner_api/osal/uhdf",
+ "//third_party/cJSON",
+ "//base/hiviewdfx/hilog_lite/interfaces/native/kits"
+ ]
+
+ sources = [ "./src/daudio_manager_interface_impl.cpp" ]
+
+ public_deps = [
+ "${hdf_ser_aud_path_lite}:libaudio_manager_daudio_primary_service_1.0",
+ "${hdf_service_path}/hdi_service/common:libdaudio_hdf_utils",
+ ]
+
+ deps = [
+ "//commonlibrary/c_utils/base:utils",
+ ]
+
+ defines = [
+ "HI_LOG_ENABLE",
+ "LOG_DOMAIN=0xD004100",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/include/daudio_manager_interface_impl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/include/daudio_manager_interface_impl.h
new file mode 100755
index 0000000000000000000000000000000000000000..66f8dba5b4e69d4b2067c41d21c1c665fcbc78d9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/include/daudio_manager_interface_impl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/src/daudio_manager_interface_impl.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/src/daudio_manager_interface_impl.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..511f8d925b00ee6e3a33ebdcf0d88634d6cdd191
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/src/daudio_manager_interface_impl.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..b549810ef21437f907c42f23cb202353b38f1342
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/Makefile
@@ -0,0 +1,32 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+COMPILE_ROOT := $(LOCAL_DIR)
+MODNAME :=
+ifeq ($(strip $(CFG_CHIP_TYPE)),$(filter $(CFG_CHIP_TYPE),hi3518ev300 hi3516dv300 hispark_ss927v100 hispark_ss928v100))
+# $(warning "the value of CFG_CHIP_TYPE is $(CFG_CHIP_TYPE)")
+MODNAME += $(shell test -d hi35xx && echo hi35xx)
+MODNAME += $(shell test -d ss928_hdmi && echo ss928_hdmi)
+MODNAME += $(shell test -d ss928_usb && echo ss928_usb)
+else ifeq ($(strip $(CFG_CHIP_TYPE)),$(filter $(CFG_CHIP_TYPE),hi3862v100))
+MODNAME += $(shell test -d iot/audio_input_port_plugin && echo iot/audio_input_port_plugin)
+MODNAME += $(shell test -d iot/audio_output_port_plugin && echo iot/audio_output_port_plugin)
+endif
+SUBDIRS =$(MODNAME)
+
+
+all: subdirs
+
+.PHONY: subdirs $(SUBDIRS) clean
+subdirs: $(SUBDIRS)
+$(SUBDIRS):
+ $(MAKE) $(MFLAGS) -C $(COMPILE_ROOT)/$@ || exit "$$?"
+
+clean:
+ @for MOD in $(MODNAME);do\
+ cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) clean;done
+
+
+install:
+ @for MOD in $(MODNAME);do\
+ cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) install || exit 1;done
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..118e7251fb17ad5aab757b1880a37b3d670472f9
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/Makefile
@@ -0,0 +1,102 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+
+#===============================================================================
+# self deps
+#===============================================================================
+AUDIO_PLUGIN_INC_PATH := $(LOCAL_DIR)/../plugin_include
+AUDIO_PORT_PLUGIN_COM_INC_PATH := $(LOCAL_DIR)/audio_primary_port_plugin_common/include
+AUDIO_SUB_PORT_IN_INC_PATH := $(LOCAL_DIR)/audio_primary_sub_port_in
+AUDIO_SUB_PORT_OUT_INC_PATH := $(LOCAL_DIR)/audio_primary_sub_port_out
+AUDIO_EFFECT_MANAGER_INC_PATH := $(LOCAL_DIR)/audio_effect_manager
+AUDIO_INTERFACE_PATH := $(MEDIA_BASE_DIR)/../../../../../../drivers/peripheral/audio/interfaces/include
+
+OTCONFACCESS_INC_PATH := $(MEDIA_BASE_DIR)/../middleware/source/component/otconfaccess/include/
+MW_COMMON_INC_PATH := $(MEDIA_BASE_DIR)/../middleware/source/common/include/
+
+SRC_DEPS_INC_PATH := -I$(AUDIO_HAL_INC_PATH)
+SRC_DEPS_INC_PATH += -I$(AUDIO_DRIVERS_INC_PATH)\
+ -I$(MPP_INC_PATH)\
+ -I$(AUDIO_PORT_PLUGIN_COM_INC_PATH)\
+ -I$(MEDIA_HAL_COMMN_INC_PATH) \
+ -I$(AUDIO_INTERFACE_PATH) \
+ -I$(AUDIO_PLUGIN_INC_PATH) \
+ -I$(AUDIO_SUB_PORT_IN_INC_PATH) \
+ -I$(AUDIO_SUB_PORT_OUT_INC_PATH) \
+ -I$(AUDIO_EFFECT_MANAGER_INC_PATH) \
+ -I$(OTCONFACCESS_INC_PATH) \
+ -I$(MW_COMMON_INC_PATH) \
+ -I$(SECUREC_INC_PATH)
+
+#mod dir
+MOD_ROOT := $(LOCAL_DIR)/../..
+SRC_ROOT := $(LOCAL_DIR)
+OBJ_ROOT := $(SRC_ROOT)/obj
+TRAGET_ROOT := $(MOD_ROOT)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+SRCS := $(LOCAL_DIR)/audio_primary_port_plugin/audio_primary_port_plugin.c
+SRCS += $(LOCAL_DIR)/audio_primary_sub_port_in/audio_primary_sub_port_in.c
+SRCS += $(LOCAL_DIR)/audio_primary_sub_port_out/audio_primary_sub_port_out.c
+SRCS += $(LOCAL_DIR)/audio_effect_manager/audio_effect_manager.c
+SRCS += $(LOCAL_DIR)/audio_primary_port_plugin_common/src/audio_port_plugin_common.c
+SRCS := $(sort $(SRCS))
+
+
+OBJS := $(SRCS:%.c=%.o)
+OBJS := $(sort $(OBJS))
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+CFLAGS_CUR := $(CFLAGS) -fdata-sections -fno-omit-frame-pointer
+
+LDFLAGS_SO := $(LDFLAGS)
+
+ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+CFLAGS_CUR += -D__SS626V100__ -D__LINUX__
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi -lsecurec -lpthread -ldl -lm -lmwlog -lotconfaccess -laac_sbr_enc -laac_sbr_dec -lvqe_record -lvqe_res -lss_otp
+else
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi_audio -lsecurec -lpthread -ldl -lm -lmwlog -lotconfaccess -lss_mpi_audio_adp -lopus -laac_sbr_enc -laac_sbr_dec -lmp3_dec -lmp3_enc -lvqe_record -lvqe_res
+endif
+SRC_DEPS_LIB_PATH += -L$(MPP_LIB_PATH)\
+ -L$(SECUREC_LIB_PATH) \
+ -L$(MEDIA_HAL_COMMN_LIB_PATH)
+
+ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+SRC_DEPS_LIB_PATH += -L$(MEDIA_BASE_DIR)/../middleware/source/component/otconfaccess/lib/ss928v100/clang_musl \
+ -L$(MEDIA_BASE_DIR)/../middleware/source/common/log/lib/ss928v100/clang_musl
+else
+SRC_DEPS_LIB_PATH += -L$(MEDIA_BASE_DIR)/../middleware/source/component/otconfaccess/lib/hi3516dv500/gcc_musl \
+ -L$(MEDIA_BASE_DIR)/../middleware/source/common/log/lib/hi3516dv500/gcc_musl
+endif
+
+ifeq ($(CFG_OS_TYPE),OHOS)
+SRC_DEPS_LIB_PATH += -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_liteos \
+ -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_liteos/usr/lib
+else
+SRC_DEPS_LIB_PATH += -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux \
+ -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux/usr/lib
+endif
+
+LIB_SO := $(TRAGET_ROOT)/libaudio_primary_port.so
+LIB_A := $(TRAGET_ROOT)/libaudio_primary_port.a
+
+.PHONY : clean all
+
+all: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+
+$(LIB_A): $(OBJS)
+ $(AR) -rcv $@ $^
+
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS_CUR) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ $(STRIP) $(LIB_SO)
+
+
+$(OBJS): %.o : %.c
+ $(CC) $(CFLAGS_CUR) $(LFLAGS) $(SRC_DEPS_INC_PATH) -c $< -o $@
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_effect_manager/audio_effect_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_effect_manager/audio_effect_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..1c2d7840239b58b5e55f90243b961ee231dc873e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_effect_manager/audio_effect_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_effect_manager/audio_effect_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_effect_manager/audio_effect_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..c89509ea2ecad7ba8d390d3a75a2145a5378b6ae
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_effect_manager/audio_effect_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_effect_manager/audio_vqe.ini b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_effect_manager/audio_vqe.ini
new file mode 100755
index 0000000000000000000000000000000000000000..1906a9b3feb1f160b015195828352b4b3675833e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_effect_manager/audio_vqe.ini
@@ -0,0 +1,111 @@
+;
+; Copyright (c) 2025 HiSilicon (Shanghai) Technologies 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.
+;
+; ============= AI Record Vqe Configure =============
+[ai.record.common]
+drcenable = "1"
+hdrenable = "1"
+hpfenable = "1"
+rnrenable = "1"
+agcenable = "1"
+eqenable = "1"
+framesample = "1024"; vqe frame length, range: [80-4096]
+workstate = "0"; 0:common environment, 1:music environment, 2:noisy environment
+recordtype = "0"; 0:double micphone recording, 1:butt
+[ai.record.drc]
+usrmode = "0"; 0:auto mode, 1:manual mode
+[ai.record.rnr]
+usrmode = "0"; 0:auto mode, 1:manual mode
+[ai.record.hdr]
+usrmode = "0"; 0:auto mode, 1:manual mode
+[ai.record.hpf]
+usrmode = "1"; 0:auto mode, 1:manual mode
+freq = "80"; 80:80Hz, 120:120Hz, 150:150Hz
+[ai.record.agc]
+usrmode = "0"; 0:auto mode, 1:manual mode
+[ai.record.eq]
+gaindb100hz = "-10"; -10:gain is -10 db, range: [-50, 20]
+gaindb200hz = "-3"; -3:gain is -3 db, range: [-50, 20]
+gaindb250hz = "-2"; -2:gain is -2 db, range: [-50, 20]
+gaindb350hz = "-2"; -2:gain is -2 db, range: [-50, 20]
+gaindb500hz = "-1"; -1:gain is -1 db, range: [-50, 20]
+gaindb800hz = "-1"; -1:gain is -1 db, range: [-50, 20]
+gaindb1.2khz = "-2"; -2:gain is -2 db, range: [-50, 20]
+gaindb2.5khz = "-5"; -5:gain is -5 db, range: [-50, 20]
+gaindb4khz = "-6"; -6:gain is -6 db, range: [-50, 20]
+gaindb8khz = "-8"; -8:gain is -8 db, range: [-50, 20]
+
+; ============= AI Talk Vqe Configure =============
+[ai.talk.common]
+hpfenable = "1"
+anrenable = "1"
+aecenable = "1"
+agcenable = "1"
+eqenable = "0"
+worksamplerate = "16000"; 8000:8K, 16000:16K, default:8KHz
+framesample = "1024"; vqe frame length, range: [80-4096]
+workstate = "0"; 0:common environment, 1:music environment, 2:noisy environment
+[ai.talk.hpf]
+usrmode = "1"; 0:auto mode, 1:manual mode
+freq = "120"; 80:80Hz, 120:120Hz, 150:150Hz
+[ai.talk.anr]
+usrmode = "1"; 0:auto mode, 1:manual mode
+noisedbthr = "45"; noise threshold, range: [30, 60]
+nrintensity = "15"; noise reduce intensity, range: [0, 25]
+spproswitch = "1"; switch for music probe, range: [0:close, 1:open]
+[ai.talk.aec]
+usrmode = "0"; 0:auto mode, 1:manual mode
+[ai.talk.agc]
+usrmode = "0"; 0:auto mode, 1:manual mode
+
+; ============= AO Vqe Configure =============
+[ao.common]
+hpfenable = "1"
+anrenable = "1"
+agcenable = "1"
+eqenable = "1"
+workstate = "1"; 0:common environment, 1:music environment, 2:noisy environment
+framesample = "1024"; vqe frame length, range: [80-4096]
+[ao.agc]
+usrmode = "0"; 0:auto mode, 1:manual mode
+noisesupswitch = "0"; switch for noise suppression, range: [0:close, 1:open]
+adjustspeed = "0"; adjustable speed, range: [0, 10]dB/s
+improvesnr = "0"; switch for improving SNR, range: [0:close, 1:upper limit 3dB, 2:upper limit 6dB]
+maxgain = "0"; max gain, range: [0, 30]dB
+noisefloor = "-50"; noise floor, range: TalkVqe/AoVqe[-65, -20]dB, RecordVqe[-50, -20]dB
+outputmode = "0"; output mode, mute when lower than noise floor, range: [0:close, 1:open]
+targetlevel = "-40"; target voltage level, range: [-40, -1]dB
+usehighpassfilt = "0"; switch for using high pass filt, range: [0:close, 1:80Hz, 2:120Hz, 3:150:Hz, 4:300Hz: 5:500Hz]
+[ao.anr]
+usrmode = "0"; 0:auto mode, 1:manual mode
+nrintensity = "0"; noise reduce intensity, range: [0, 25]
+noisedbthr = "30"; noise threshold, range: [30, 60]
+spproswitch = "0"; switch for music probe, range: [0:close, 1:open]
+reserved = "0"
+[ao.hpf]
+usrmode = "0"; 0:auto mode, 1:manual mode
+freq = "80"; 80:80Hz, 120:120Hz, 150:150Hz
+[ao.eq]
+gaindb100hz = "0"; 0:gain is 0 db, range: [-100, 20]
+gaindb200hz = "0"; 0:gain is 0 db, range: [-100, 20]
+gaindb250hz = "0"; 0:gain is 0 db, range: [-100, 20]
+gaindb350hz = "0"; 0:gain is 0 db, range: [-100, 20]
+gaindb500hz = "0"; 0:gain is 0 db, range: [-100, 20]
+gaindb800hz = "0"; 0:gain is 0 db, range: [-100, 20]
+gaindb1.2khz = "0"; 0:gain is 0 db, range: [-100, 20]
+gaindb2.5khz = "0"; 0:gain is 0 db, range: [-100, 20]
+gaindb4khz = "0"; 0:gain is 0 db, range: [-100, 20]
+gaindb8khz = "0"; 0:gain is 0 db, range: [-100, 20]
+reserved = "0"
+;
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin/audio_primary_port_plugin.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin/audio_primary_port_plugin.c
new file mode 100755
index 0000000000000000000000000000000000000000..af7e0c00d186ea1423dbba1b2d2a375c8e151b71
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin/audio_primary_port_plugin.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin/audio_primary_port_plugin.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin/audio_primary_port_plugin.h
new file mode 100755
index 0000000000000000000000000000000000000000..ee0730b4e3e08873be9a21dc47d506868b0d53e1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin/audio_primary_port_plugin.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin_common/include/audio_port_plugin_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin_common/include/audio_port_plugin_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..44b1bb38ebf13281e1dea8cd9c009cf8d6ddc464
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin_common/include/audio_port_plugin_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin_common/src/audio_port_plugin_common.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin_common/src/audio_port_plugin_common.c
new file mode 100755
index 0000000000000000000000000000000000000000..0d88d4b700424779545c27d1a1f50c0bf9d3bf54
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_port_plugin_common/src/audio_port_plugin_common.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_in/audio_primary_sub_port_in.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_in/audio_primary_sub_port_in.c
new file mode 100755
index 0000000000000000000000000000000000000000..5e0fd85e0f7f21b9107238fd508d6051f7359b00
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_in/audio_primary_sub_port_in.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_in/audio_primary_sub_port_in.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_in/audio_primary_sub_port_in.h
new file mode 100755
index 0000000000000000000000000000000000000000..e56cb3eb0de6eebf8d53ed5ade3b11d675360b6e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_in/audio_primary_sub_port_in.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_out/audio_primary_sub_port_out.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_out/audio_primary_sub_port_out.c
new file mode 100755
index 0000000000000000000000000000000000000000..e1cf19ee5d91cfc7b60a3943953b5960cb1bf5e6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_out/audio_primary_sub_port_out.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_out/audio_primary_sub_port_out.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_out/audio_primary_sub_port_out.h
new file mode 100755
index 0000000000000000000000000000000000000000..fa226398afe67f128350880819a3a6c60d22f98b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/hi35xx/audio_primary_sub_port_out/audio_primary_sub_port_out.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/plugin_include/audio_port_plugin.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/plugin_include/audio_port_plugin.h
new file mode 100755
index 0000000000000000000000000000000000000000..d1999ff6c18945a375aa3d3ee8908acf76caec84
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/plugin_include/audio_port_plugin.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..62e878d1d6ee29e9ca5c05e11bb87780b19c2ec4
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/Makefile
@@ -0,0 +1,97 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+
+#===============================================================================
+# self deps
+#===============================================================================
+AUDIO_PLUGIN_INC_PATH := $(LOCAL_DIR)/../plugin_include
+AUDIO_PORT_PLUGIN_COM_INC_PATH := $(LOCAL_DIR)/audio_hdmi_port_plugin_common/include
+AUDIO_SUB_PORT_OUT_INC_PATH := $(LOCAL_DIR)/audio_hdmi_sub_port_out
+AUDIO_INTERFACE_PATH := $(MEDIA_BASE_DIR)/../../../../../../drivers/peripheral/audio/interfaces/include
+
+OTCONFACCESS_INC_PATH := $(MEDIA_BASE_DIR)/../middleware/source/component/otconfaccess/include/
+MW_COMMON_INC_PATH := $(MEDIA_BASE_DIR)/../middleware/source/common/include/
+
+SRC_DEPS_INC_PATH := -I$(AUDIO_HAL_INC_PATH)
+SRC_DEPS_INC_PATH += -I$(AUDIO_DRIVERS_INC_PATH)\
+ -I$(MPP_INC_PATH)\
+ -I$(AUDIO_PORT_PLUGIN_COM_INC_PATH)\
+ -I$(MEDIA_HAL_COMMN_INC_PATH) \
+ -I$(AUDIO_INTERFACE_PATH) \
+ -I$(AUDIO_PLUGIN_INC_PATH) \
+ -I$(AUDIO_SUB_PORT_OUT_INC_PATH) \
+ -I$(OTCONFACCESS_INC_PATH) \
+ -I$(MW_COMMON_INC_PATH) \
+ -I$(SECUREC_INC_PATH)
+
+#mod dir
+MOD_ROOT := $(LOCAL_DIR)/../..
+SRC_ROOT := $(LOCAL_DIR)
+OBJ_ROOT := $(SRC_ROOT)/obj
+TRAGET_ROOT := $(MOD_ROOT)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+SRCS := $(LOCAL_DIR)/audio_hdmi_port_plugin/audio_hdmi_port_plugin.c
+SRCS += $(LOCAL_DIR)/audio_hdmi_sub_port_out/audio_hdmi_sub_port_out.c
+SRCS += $(LOCAL_DIR)/audio_hdmi_port_plugin_common/src/audio_port_plugin_common.c
+SRCS := $(sort $(SRCS))
+
+
+OBJS := $(SRCS:%.c=%.o)
+OBJS := $(sort $(OBJS))
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+CFLAGS_CUR := $(CFLAGS) -fdata-sections -fno-omit-frame-pointer
+
+LDFLAGS_SO := $(LDFLAGS)
+
+ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+CFLAGS_CUR += -D__SS626V100__ -D__LINUX__
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi -lsecurec -lpthread -ldl -lm -lmwlog -lotconfaccess -laac_sbr_enc -laac_sbr_dec -lvqe_record -lvqe_res -lss_otp
+else
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi_audio -lsecurec -lpthread -ldl -lm -lmwlog -lotconfaccess -lss_mpi_audio_adp -lopus -laac_sbr_enc -laac_sbr_dec -lmp3_dec -lmp3_enc -lvqe_record -lvqe_res -lss_otp
+endif
+SRC_DEPS_LIB_PATH += -L$(MPP_LIB_PATH)\
+ -L$(SECUREC_LIB_PATH) \
+ -L$(MEDIA_HAL_COMMN_LIB_PATH)
+
+ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+SRC_DEPS_LIB_PATH += -L$(MEDIA_BASE_DIR)/../middleware/source/component/otconfaccess/lib/ss928v100/clang_musl \
+ -L$(MEDIA_BASE_DIR)/../middleware/source/common/log/lib/ss928v100/clang_musl
+else
+SRC_DEPS_LIB_PATH += -L$(MEDIA_BASE_DIR)/../middleware/source/component/otconfaccess/lib/hi3516dv500/gcc_musl \
+ -L$(MEDIA_BASE_DIR)/../middleware/source/common/log/lib/hi3516dv500/gcc_musl
+endif
+
+ifeq ($(CFG_OS_TYPE),OHOS)
+SRC_DEPS_LIB_PATH += -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_liteos \
+ -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_liteos/usr/lib
+else
+SRC_DEPS_LIB_PATH += -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux \
+ -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux/usr/lib
+endif
+
+LIB_SO := $(TRAGET_ROOT)/libaudio_hdmi_port.so
+LIB_A := $(TRAGET_ROOT)/libaudio_hdmi_port.a
+
+.PHONY : clean all
+
+all: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+
+$(LIB_A): $(OBJS)
+ $(AR) -rcv $@ $^
+
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS_CUR) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ $(STRIP) $(LIB_SO)
+
+
+$(OBJS): %.o : %.c
+ $(CC) $(CFLAGS_CUR) $(LFLAGS) $(SRC_DEPS_INC_PATH) -c $< -o $@
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin/audio_hdmi_port_plugin.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin/audio_hdmi_port_plugin.c
new file mode 100755
index 0000000000000000000000000000000000000000..dc5de70b3d0ed9296a0aa0bdeb506b83bd5c42f9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin/audio_hdmi_port_plugin.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin/audio_hdmi_port_plugin.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin/audio_hdmi_port_plugin.h
new file mode 100755
index 0000000000000000000000000000000000000000..396ea930e9c97960b3d6d472ebea506e48f5574b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin/audio_hdmi_port_plugin.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin_common/audio_port_plugin_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin_common/audio_port_plugin_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..f7b0d0382cfb578cf3a9bbbec2c79633837252b0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin_common/audio_port_plugin_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin_common/include/audio_port_plugin_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin_common/include/audio_port_plugin_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..615834051cbf4c58a4dcdbdc07437774385bd7a1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin_common/include/audio_port_plugin_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin_common/src/audio_port_plugin_common.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin_common/src/audio_port_plugin_common.c
new file mode 100755
index 0000000000000000000000000000000000000000..ceac61954d0e8a9b47db47b984a9ecb2864108d9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_port_plugin_common/src/audio_port_plugin_common.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_sub_port_out/audio_hdmi_sub_port_out.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_sub_port_out/audio_hdmi_sub_port_out.c
new file mode 100755
index 0000000000000000000000000000000000000000..314ee8ec5e8f1f5c3176204b7c8561b01e199b31
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_sub_port_out/audio_hdmi_sub_port_out.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_sub_port_out/audio_hdmi_sub_port_out.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_sub_port_out/audio_hdmi_sub_port_out.h
new file mode 100755
index 0000000000000000000000000000000000000000..ccfb167c6861f637bd06ffdf06d1e56c7d8d0b38
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_hdmi/audio_hdmi_sub_port_out/audio_hdmi_sub_port_out.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..afecc485d694601610fdd573f39d7757a47c4f33
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/Makefile
@@ -0,0 +1,106 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+
+#===============================================================================
+# self deps
+#===============================================================================
+AUDIO_PLUGIN_INC_PATH := $(LOCAL_DIR)/../plugin_include
+AUDIO_PORT_PLUGIN_COM_INC_PATH := $(LOCAL_DIR)/audio_usb_port_plugin_common/include
+AUDIO_SUB_PORT_IN_INC_PATH := $(LOCAL_DIR)/audio_usb_sub_port_in
+AUDIO_SUB_PORT_OUT_INC_PATH := $(LOCAL_DIR)/audio_usb_sub_port_out
+AUDIO_INTERFACE_PATH := $(MEDIA_BASE_DIR)/../../../../../../drivers/peripheral/audio/interfaces/include
+
+OTCONFACCESS_INC_PATH := $(MEDIA_BASE_DIR)/../middleware/source/component/otconfaccess/include/
+MW_COMMON_INC_PATH := $(MEDIA_BASE_DIR)/../middleware/source/common/include/
+
+SRC_DEPS_INC_PATH := -I$(AUDIO_HAL_INC_PATH)
+SRC_DEPS_INC_PATH += -I$(AUDIO_DRIVERS_INC_PATH)\
+ -I$(MPP_INC_PATH)\
+ -I$(AUDIO_PORT_PLUGIN_COM_INC_PATH)\
+ -I$(MEDIA_HAL_COMMN_INC_PATH) \
+ -I$(AUDIO_INTERFACE_PATH) \
+ -I$(AUDIO_PLUGIN_INC_PATH) \
+ -I$(AUDIO_SUB_PORT_IN_INC_PATH) \
+ -I$(AUDIO_SUB_PORT_OUT_INC_PATH) \
+ -I$(OTCONFACCESS_INC_PATH) \
+ -I$(MW_COMMON_INC_PATH) \
+ -I$(SECUREC_INC_PATH)
+
+ALSA_INC_PATH := \
+ -I$(MEDIA_BASE_DIR)/../../../../../../third_party/alsa-lib/include
+
+SRC_DEPS_INC_PATH += $(ALSA_INC_PATH)
+#mod dir
+MOD_ROOT := $(LOCAL_DIR)/../..
+SRC_ROOT := $(LOCAL_DIR)
+OBJ_ROOT := $(SRC_ROOT)/obj
+TRAGET_ROOT := $(MOD_ROOT)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+SRCS := $(LOCAL_DIR)/audio_usb_port_plugin/audio_usb_port_plugin.c
+SRCS += $(LOCAL_DIR)/audio_usb_sub_port_in/audio_usb_sub_port_in.c
+SRCS += $(LOCAL_DIR)/audio_usb_sub_port_out/audio_usb_sub_port_out.c
+SRCS += $(LOCAL_DIR)/audio_usb_port_plugin_common/src/audio_port_plugin_common.c
+SRCS := $(sort $(SRCS))
+
+
+OBJS := $(SRCS:%.c=%.o)
+OBJS := $(sort $(OBJS))
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+CFLAGS_CUR := $(CFLAGS) -fdata-sections -fno-omit-frame-pointer
+
+LDFLAGS_SO := $(LDFLAGS)
+
+ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+CFLAGS_CUR += -D__SS626V100__ -D__LINUX__
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi -lsecurec -lpthread -ldl -lm -lmwlog -lotconfaccess -laac_sbr_enc -laac_sbr_dec -lvqe_record -lvqe_res -lss_otp
+else
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi_audio -lsecurec -lpthread -ldl -lm -lmwlog -lotconfaccess -lss_mpi_audio_adp -lopus -laac_sbr_enc -laac_sbr_dec -lmp3_dec -lmp3_enc -lvqe_record -lvqe_res -lss_otp
+endif
+USB_ALSA_LIB_PATH := $(MEDIA_BASE_DIR)/../../../../../../third_party/alsa-lib/lib
+SRC_DEPS_LIB += -lasound
+SRC_DEPS_LIB_PATH += -L$(MPP_LIB_PATH)\
+ -L$(SECUREC_LIB_PATH) \
+ -L$(MEDIA_HAL_COMMN_LIB_PATH) \
+ -L$(USB_ALSA_LIB_PATH)
+
+ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+SRC_DEPS_LIB_PATH += -L$(MEDIA_BASE_DIR)/../middleware/source/component/otconfaccess/lib/ss928v100/clang_musl \
+ -L$(MEDIA_BASE_DIR)/../middleware/source/common/log/lib/ss928v100/clang_musl
+else
+SRC_DEPS_LIB_PATH += -L$(MEDIA_BASE_DIR)/../middleware/source/component/otconfaccess/lib/hi3516dv500/gcc_musl \
+ -L$(MEDIA_BASE_DIR)/../middleware/source/common/log/lib/hi3516dv500/gcc_musl
+endif
+
+ifeq ($(CFG_OS_TYPE),OHOS)
+SRC_DEPS_LIB_PATH += -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_liteos \
+ -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_liteos/usr/lib
+else
+SRC_DEPS_LIB_PATH += -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux \
+ -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux/usr/lib
+endif
+
+LIB_SO := $(TRAGET_ROOT)/libaudio_usb_port.so
+LIB_A := $(TRAGET_ROOT)/libaudio_usb_port.a
+
+.PHONY : clean all
+
+all: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+
+$(LIB_A): $(OBJS)
+ $(AR) -rcv $@ $^
+
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS_CUR) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ $(STRIP) $(LIB_SO)
+
+
+$(OBJS): %.o : %.c
+ $(CC) $(CFLAGS_CUR) $(LFLAGS) $(SRC_DEPS_INC_PATH) -c $< -o $@
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin/audio_usb_port_plugin.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin/audio_usb_port_plugin.c
new file mode 100755
index 0000000000000000000000000000000000000000..5958b57538208210b5dfd4e166655c1849b54231
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin/audio_usb_port_plugin.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin/audio_usb_port_plugin.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin/audio_usb_port_plugin.h
new file mode 100755
index 0000000000000000000000000000000000000000..01072b7fd2778e275c9eda49cdd5cb6d90c6226a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin/audio_usb_port_plugin.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin_common/include/audio_port_plugin_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin_common/include/audio_port_plugin_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..d94272b4d637c31549a65789542f3d6a79cdd0b2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin_common/include/audio_port_plugin_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin_common/src/audio_port_plugin_common.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin_common/src/audio_port_plugin_common.c
new file mode 100755
index 0000000000000000000000000000000000000000..dbe96b0c96b65d07df839cc2a5a1cfe007096861
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_port_plugin_common/src/audio_port_plugin_common.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_in/audio_usb_sub_port_in.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_in/audio_usb_sub_port_in.c
new file mode 100755
index 0000000000000000000000000000000000000000..ab7231a49de38769efaf453c8ae3c102bedd825a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_in/audio_usb_sub_port_in.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_in/audio_usb_sub_port_in.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_in/audio_usb_sub_port_in.h
new file mode 100755
index 0000000000000000000000000000000000000000..178460f974b5c026f7162d2dabf5f6db31ca9bb5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_in/audio_usb_sub_port_in.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_out/audio_usb_sub_port_out.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_out/audio_usb_sub_port_out.c
new file mode 100755
index 0000000000000000000000000000000000000000..b7924e74a655373bcb278c4bcc786cc9fdf1a379
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_out/audio_usb_sub_port_out.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_out/audio_usb_sub_port_out.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_out/audio_usb_sub_port_out.h
new file mode 100755
index 0000000000000000000000000000000000000000..c2c2064619c5ca827fbaf7819c505c46c736b1ba
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/plugins/ss928_usb/audio_usb_sub_port_out/audio_usb_sub_port_out.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_adapter.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_adapter.c
new file mode 100755
index 0000000000000000000000000000000000000000..56394324c09dbb0de2414104ac579ea7bab547b9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_adapter.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_capture.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_capture.c
new file mode 100755
index 0000000000000000000000000000000000000000..8c079ce254770abe0fb41005dc2ad6a94278c843
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_capture.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_internal.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_internal.h
new file mode 100755
index 0000000000000000000000000000000000000000..df046e9e0b151eb9444388c36c36c1f6bffe2743
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_internal.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..5aec9ac8c11278357b616c1b2c7ec069f22401d7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_plugins_manager/include/audio_plugins_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_plugins_manager/include/audio_plugins_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..5e017ca16beb1bd653f35c28823c736b2fba130b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_plugins_manager/include/audio_plugins_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_plugins_manager/src/audio_plugins_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_plugins_manager/src/audio_plugins_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..e55a895625655596cad057004e9e597f2cc42428
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_plugins_manager/src/audio_plugins_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_render.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_render.c
new file mode 100755
index 0000000000000000000000000000000000000000..a6059856a610dfc898a53c684f36059d10a538bd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/audio/source/src/audio_render.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build.sh b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d42eab3a09c5f74dca0c8bcd7459d20de7b9097f
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+# Copyright 2020-2020, Huawei Technologies Co. Ltd.
+#
+# ALL RIGHTS RESERVED
+#
+# Compile media/hal project, this is the entrance script
+
+# error out on errors
+set -e
+OUT_DIR="$1"
+BOARD_NAME="$2"
+KERNEL_TYPE="$3"
+
+function main(){
+ CUR_DIR=$(cd $(dirname "$0");pwd)
+ OS_TYPE=$KERNEL_TYPE
+ if [ "$KERNEL_TYPE" = "linux" ];then
+ OS_TYPE="linux_small"
+ fi
+ cp -rf $CUR_DIR/audio/$BOARD_NAME/$OS_TYPE/libs/libaudio_hw.so $OUT_DIR/
+ #cp -rf $CUR_DIR/audio/$BOARD_NAME/$OS_TYPE/libs/libaudio_input_port.so $OUT_DIR/
+ #cp -rf $CUR_DIR/audio/$BOARD_NAME/$OS_TYPE/libs/libaudio_output_port.so $OUT_DIR/
+ cp -rf $CUR_DIR/audio/$BOARD_NAME/$OS_TYPE/libs/libaudio_primary_port.so $OUT_DIR/
+ cp -rf $CUR_DIR/audio/$BOARD_NAME/$OS_TYPE/libs/libaudio_hdmi_port.so $OUT_DIR/
+ cp -rf $CUR_DIR/audio/$BOARD_NAME/$OS_TYPE/libs/libaudio_usb_port.so $OUT_DIR/
+
+ cp -rf $CUR_DIR/codec/$BOARD_NAME/$OS_TYPE/libs/libcodec.so $OUT_DIR/
+ cp -rf $CUR_DIR/codec/$BOARD_NAME/$OS_TYPE/libs/libhiaacdec.so $OUT_DIR/
+ #cp -rf $CUR_DIR/codec/$BOARD_NAME/$OS_TYPE/libs/libhimp3dec.so $OUT_DIR/
+ cp -rf $CUR_DIR/codec/$BOARD_NAME/$OS_TYPE/libs/libplugin_adec_35xx.so $OUT_DIR/
+ cp -rf $CUR_DIR/codec/$BOARD_NAME/$OS_TYPE/libs/libplugin_aenc_35xx.so $OUT_DIR/
+ cp -rf $CUR_DIR/codec/$BOARD_NAME/$OS_TYPE/libs/libplugin_vdec_35xx.so $OUT_DIR/
+ cp -rf $CUR_DIR/codec/$BOARD_NAME/$OS_TYPE/libs/libplugin_venc_35xx.so $OUT_DIR/
+
+ cp -rf $CUR_DIR/format/$BOARD_NAME/$OS_TYPE/libs/libformat_hw.so $OUT_DIR/
+ cp -rf $CUR_DIR/format/$BOARD_NAME/$OS_TYPE/libs/libplugin_demuxer_ffmpeg.so $OUT_DIR/
+ cp -rf $CUR_DIR/format/$BOARD_NAME/$OS_TYPE/libs/libplugin_demuxer_mpf.so $OUT_DIR/
+ cp -rf $CUR_DIR/format/$BOARD_NAME/$OS_TYPE/libs/libplugin_demuxer_raw.so $OUT_DIR/
+ cp -rf $CUR_DIR/format/$BOARD_NAME/$OS_TYPE/libs/libplugin_muxer_recorder.so $OUT_DIR/
+
+ cp -rf $CUR_DIR/common/$BOARD_NAME/$OS_TYPE/libs/libmedia_hal_common.so $OUT_DIR/
+
+ cp -rf $CUR_DIR/camera/$BOARD_NAME/$OS_TYPE/libs/libhdi_camera.so $OUT_DIR/
+ cp -rf $CUR_DIR/videodisplay/$BOARD_NAME/$OS_TYPE/libs/libhdi_videodisplayer.so $OUT_DIR/
+}
+
+main "$@"
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..8ae93e5d4b8fcac8cb4941eff0a2dc7ccd4163c0
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/Makefile
@@ -0,0 +1,19 @@
+LOCAL_DIR := $(shell pwd)
+
+COMPILE_ROOT := $(LOCAL_DIR)
+
+
+
+.PHONY: all clean hal component
+
+all: hal
+
+hal: component
+ make -C $(COMPILE_ROOT)/../hal VERBOSE=1
+
+component:
+ make -C $(COMPILE_ROOT)/../component VERBOSE=1
+
+clean:
+ @cd $(COMPILE_ROOT)/../hal ;$(MAKE) $(MFLAGS) clean; cd -
+ @cd $(COMPILE_ROOT)/../component;$(MAKE) $(MFLAGS) clean; cd -
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/base.mak b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/base.mak
new file mode 100755
index 0000000000000000000000000000000000000000..aed36a8bd16b9ad1db542fba40019fe8a9c29a92
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/base.mak
@@ -0,0 +1,179 @@
+include $(MEDIA_BASE_DIR)/build/cfg.mak
+
+#====================================================================================
+# export variable
+#====================================================================================
+PROJECT_ROOT := $(MEDIA_BASE_DIR)/../../../../../..
+
+OUT_DIR := $(PROJECT_ROOT)/out
+MEDIA_HAL_COMMN_INC_PATH := $(MEDIA_BASE_DIR)/common/source/include
+
+ifeq ($(CFG_OS_TYPE),Linux)
+ KERNAL_TYPE=linux
+else
+ KERNAL_TYPE=liteos_a
+endif
+
+MIDDLEWARE_DIR := $(MEDIA_BASE_DIR)/../middleware/source
+MIDDLEWARE_COMPONENT := $(MIDDLEWARE_DIR)/component
+MIDDLEWARE_COMMON_DIR := $(MIDDLEWARE_DIR)/common
+MIDDLEWARE_COMMON_INC_DIR := $(MIDDLEWARE_COMMON_DIR)/include
+MIDDLEWARE_COMPONENT_DIR := $(MIDDLEWARE_DIR)/component
+SECUREC_INC_PATH := $(PROJECT_ROOT)/device/soc/hisilicon/ss928v100/sdk_linux/smp/a55_linux/mpp/out/include
+SECUREC_LIB_PATH := $(PROJECT_ROOT)/device/soc/hisilicon/ss928v100/sdk_linux/smp/a55_linux/mpp/out/lib
+THIRDPARTY_DIR := $(PROJECT_ROOT)/third_party
+CODEC_INTERFACE_PATH := $(PROJECT_ROOT)/drivers/peripheral/codec/interfaces/include
+DISPLAY_INTERFACE_PATH := $(PROJECT_ROOT)/drivers/peripheral/display/interfaces/include
+BASE_INTERFACE_PATH := $(PROJECT_ROOT)/drivers/peripheral/base
+
+AT :=
+#====================================================================================
+# compile toolchain
+#====================================================================================
+ifeq ($(CFG_OS_TYPE),OHOS)
+CFG_OS_TYPE_DIR=ohos
+COMPILER_BASE_PATH=$(PROJECT_ROOT)/prebuilts/gcc/linux-x86/arm/arm-linux-ohoseabi-gcc
+COMPILER_PATH := $(COMPILER_BASE_PATH)/bin
+CFG_SDK_TOOLCHAIN=$(COMPILER_PATH)/arm-linux-ohoseabi-
+else
+COMPILER_BASE_PATH := /opt/linux/x86-arm/aarch64-v01c01-linux-musl-gcc
+COMPILER_PATH := $(COMPILER_BASE_PATH)/bin
+CFG_SDK_TOOLCHAIN=$(COMPILER_PATH)/aarch64-v01c01-linux-musl-
+CFG_OS_TYPE_DIR=linux
+endif
+
+CFG_TOOLCHAIN_TYPE_DIR=gcc
+# ifeq ($(CFG_COMPILE_TYPE), clang)
+ifeq ($(findstring clang,$(CFG_COMPILE_TYPE)),clang)
+COMPILER_BASE_PATH=$(PROJECT_ROOT)/prebuilts/clang/ohos/linux-x86_64/llvm
+COMPILER_PATH := $(COMPILER_BASE_PATH)/bin
+CFG_SDK_TOOLCHAIN=$(COMPILER_PATH)/llvm-
+CFG_TOOLCHAIN_TYPE_DIR=llvm
+endif
+
+TARGET_DIR=../libs/$(CFG_CHIP_TYPE)/$(CFG_TOOLCHAIN_TYPE_DIR)/$(CFG_OS_TYPE_DIR)/libs
+MEDIA_HAL_COMMN_LIB_PATH := $(MEDIA_BASE_DIR)/common/libs/$(CFG_CHIP_TYPE)/$(CFG_TOOLCHAIN_TYPE_DIR)/$(CFG_OS_TYPE_DIR)/libs
+CC := $(CFG_SDK_TOOLCHAIN)gcc
+CXX := $(CFG_SDK_TOOLCHAIN)g++
+AR := $(CFG_SDK_TOOLCHAIN)ar
+LD := $(CFG_SDK_TOOLCHAIN)ld
+STRIP := $(CFG_SDK_TOOLCHAIN)strip
+OBJDUMP := $(CFG_SDK_TOOLCHAIN)objdump
+
+# ifeq ($(CFG_COMPILE_TYPE), clang)
+ifeq ($(findstring clang,$(CFG_COMPILE_TYPE)),clang)
+CC := $(COMPILER_PATH)/clang
+CXX := $(COMPILER_PATH)/clang++
+LD := $(COMPILER_PATH)/clang
+endif
+
+SEC_CFLAGS := -O2 -fstack-protector-all -fPIC
+SEC_CFLAGS += -ftrapv -D_FORTIFY_SOURCE=2
+
+# ifneq ($(CFG_COMPILE_TYPE), clang)
+ifneq ($(findstring clang,$(CFG_COMPILE_TYPE)),clang)
+SEC_LFLAGS += -Wl,-z,relro,-z,now,-z,noexecstack
+SEC_CFLAGS += -s
+CFLAGS += -Wall -Werror
+endif
+# CFLAGS += -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4
+CFLAGS += -mcpu=cortex-a55
+CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE64_SOURCE
+
+# ifeq ($(CFG_COMPILE_TYPE), clang)
+ifeq ($(findstring clang,$(CFG_COMPILE_TYPE)),clang)
+CFLAGS += -Wall -Wno-error
+CFLAGS += -march=armv8-a
+CFLAGS += --target=aarch64-linux-ohos
+CFLAGS += --sysroot=$(PROJECT_ROOT)/out/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux/sysroot
+
+LFLAGS += -march=armv8-a
+LFLAGS += --target=aarch64-linux-ohos
+LFLAGS += --sysroot=$(PROJECT_ROOT)/out/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux/sysroot
+endif
+
+ifeq (hi3518ev300, $(CFG_CHIP_TYPE))
+CFLAGS += -D__HI3518EV300__
+endif
+
+ifeq (hi3516dv300, $(CFG_CHIP_TYPE))
+CFLAGS += -D__SUPPORT_STERO__ -D__HI3516DV300__
+endif
+
+ifeq (hispark_ss927v100, $(CFG_CHIP_TYPE))
+CFLAGS += -DENABLE_H8
+endif
+
+ifeq (hispark_ss928v100, $(CFG_CHIP_TYPE))
+CFLAGS += -DENABLE_H8
+endif
+
+ifeq ($(CFG_OS_TYPE),OHOS)
+CFLAGS += -D__OHOS__
+endif
+
+CFLAGS += -DMW_VERSION=\"$(CFG_MW_VERSION)\"
+CFLAGS += $(SEC_CFLAGS)
+CFLAGS += -ffunction-sections
+ifeq ($(CFG_TURNON_LOG),y)
+CFLAGS += -DENABLE_LOG
+endif
+CFLAGS += -DNEED_SYS_INIT
+
+ifeq ($(CFG_ENABLE_FALLOCATE),y)
+CFLAGS += -DFILE_FALLOCATE_ENABLE
+endif
+
+ifeq ($(CFG_CFG_64BIT),y)
+CFLAGS +=-Wextra -Wno-missing-field-initializers -Wformat=2 -Wpointer-arith
+endif
+
+ifeq ($(CFG_SUPPORT_DYNAMIC_LOADING),y)
+CFLAGS += -DSUPPORT_DL
+endif
+
+ifeq ($(CFG_ENABLE_SANITIZERS),y)
+CFLAGS += -fsanitize=address -fsanitize=leak
+endif
+
+MEDIA_CFLAGS := -fno-common
+MEDIA_CFLAGS += -fno-strict-aliasing
+MEDIA_CFLAGS += -Wextra
+MEDIA_CFLAGS += -pipe
+
+CFLAGS += $(MEDIA_CFLAGS)
+CXXFLAGS := $(CFLAGS)
+
+$(CFLAGS) += -fsigned-char
+$(CXXFLAGS) += -Weffc++
+
+LFLAGS += $(SEC_LFLAGS)
+#====================================================================================
+# common funciton
+#====================================================================================
+DEP_DIR := sdk
+ifeq ($(CFG_OS_TYPE),OHOS)
+
+ ifeq ($(CFG_SUPPORT_OPENSOURCE),y)
+ SDK_ROOT := $(PROJECT_ROOT)/device/hisilicon/$(CFG_CHIP_TYPE)/sdk_liteos
+ MPP_ROOT := $(SDK_ROOT)/soc
+ else
+ SDK_ROOT := $(PROJECT_ROOT)/device/hisilicon/$(CFG_CHIP_TYPE)/sdk_liteos
+ MPP_ROOT := $(SDK_ROOT)/mpp
+ endif
+else
+ ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+ SDK_ROOT := $(PROJECT_ROOT)/device/soc/hisilicon/ss928v100/sdk_linux/smp/a55_linux/mpp
+ SOURCE_CHIP_TYPE := ss928v100
+ else
+ SDK_ROOT := $(PROJECT_ROOT)/device/soc/hisilicon/hi3516dv500/sdk_linux/smp/a55_linux/source
+ SOURCE_CHIP_TYPE := hi3516dv500
+ endif
+ MPP_ROOT := $(SDK_ROOT)/out
+endif
+
+MPP_INC_PATH := $(MPP_ROOT)/include
+MPP_LIB_PATH := $(MPP_ROOT)/lib
+
+CreateDir = $(shell [ -d $1 ] || mkdir -p $1 || echo ":mkdir '$1' fail")
+RemoveDir = $(shell [ -d $1 ] && rm -rf $1 && echo -e "rmdir '$1'\t [ OK ]" || echo ":rm dir '$1' fail")
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/build_media_libs_L1.sh b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/build_media_libs_L1.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a0933aee68b53b912cac7d4cb393acfba2c4e48e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/build_media_libs_L1.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+# Copyright (c) 2025 HiSilicon (Shanghai) Technologies 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.
+#
+# Compile mpp/sample project, this is the entrance script
+# error out on errors
+set -e
+OUT_DIR="$1"
+BOARD_NAME="$2"
+HOS_KERNEL_TYPE="$3"
+HOS_BUILD_COMPILER="$4"
+STORAGE_TYPE="$5"
+OHOS_BUILD_PATH_DIR="$6"
+
+function main(){
+ CUR_DIR=$(cd $(dirname "$0");pwd)
+
+ COMPILER_TYPE=$HOS_BUILD_COMPILER
+ if [ "$HOS_BUILD_COMPILER" == "clang" ]; then
+ COMPILER_TYPE=llvm
+ fi
+ #cd $CUR_DIR/media/
+ cd $CUR_DIR
+ if [ "$HOS_KERNEL_TYPE" == "liteos_a" ]; then
+ if [ "$COMPILER_TYPE" == "llvm" ]; then
+ ./build.sh $OUT_DIR $BOARD_NAME $HOS_KERNEL_TYPE $COMPILER_TYPE $OHOS_BUILD_PATH_DIR
+ else
+ ./build.sh $OUT_DIR $BOARD_NAME $HOS_KERNEL_TYPE $COMPILER_TYPE $OHOS_BUILD_PATH_DIR
+ fi
+ elif [ "$HOS_KERNEL_TYPE" == "linux" ]; then
+ if [ "$STORAGE_TYPE" == "emmc" ]; then
+ ./build.sh $OUT_DIR $BOARD_NAME $HOS_KERNEL_TYPE $COMPILER_TYPE $OHOS_BUILD_PATH_DIR
+ else
+ ./build.sh $OUT_DIR $BOARD_NAME $HOS_KERNEL_TYPE $COMPILER_TYPE $OHOS_BUILD_PATH_DIR
+ fi
+ fi
+ cd $CUR_DIR
+}
+
+main "$@"
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/build_media_source_L1.sh b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/build_media_source_L1.sh
new file mode 100755
index 0000000000000000000000000000000000000000..46adbe3e36f17c67afba17db4326a1ce26186de9
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/build_media_source_L1.sh
@@ -0,0 +1,142 @@
+#!/bin/bash
+# Copyright (c) 2025 HiSilicon (Shanghai) Technologies 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.
+#
+# Compile mpp/sample project, this is the entrance script
+
+# error out on errors
+set -e
+OUT_DIR="$1"
+BOARD_NAME="$2"
+HOS_KERNEL_TYPE="$3"
+HOS_BUILD_COMPILER="$4"
+HOS_BUILD_COMPILER_DIR="$5"
+function main(){
+ echo "GN::hardware/media--------------------$OUT_DIR:$BOARD_NAME:$HOS_KERNEL_TYPE:$HOS_BUILD_COMPILER"
+ #衔接具体模块编译的Makefile
+ if [[ "${BOARD_NAME}" =~ "_openharmony" ]]; then
+ sed -i "/^CFG_CHIP_TYPE=/cCFG_CHIP_TYPE=${BOARD_NAME%%_*}" $(pwd)/build/cfg.mak
+ sed -i "s/CFG_SUPPORT_OPENSOURCE=y/CFG_SUPPORT_OPENSOURCE=y/g" $(pwd)/build/cfg.mak
+ else
+ sed -i "/^CFG_CHIP_TYPE=/cCFG_CHIP_TYPE=$BOARD_NAME" $(pwd)/build/cfg.mak
+ sed -i "s/CFG_SUPPORT_OPENSOURCE=y/CFG_SUPPORT_OPENSOURCE=y/g" $(pwd)/build/cfg.mak
+ fi
+ sed -i "/^CFG_COMPILE_DIR=/cCFG_COMPILE_DIR=$HOS_BUILD_COMPILER_DIR" $(pwd)/build/cfg.mak
+ if [ "$HOS_KERNEL_TYPE" = "liteos_a" ];then
+ OS_TYPE="OHOS"
+ KERNEL_OS_TYPE=ohos
+ elif [ "$HOS_KERNEL_TYPE" = "linux" ];then
+ OS_TYPE="Linux"
+ KERNEL_OS_TYPE=linux
+ fi
+ if [ "$HOS_BUILD_COMPILER" = "gcc" ];then
+ TOOLCHAIN_BUILD_COMPILER=gcc
+ COMPILE_TYPE=gcc_musl
+ sed -i "/^CFG_COMPILE_TYPE=/cCFG_COMPILE_TYPE=$COMPILE_TYPE" $(pwd)/build/cfg.mak
+ else
+ TOOLCHAIN_BUILD_COMPILER=llvm
+ COMPILE_TYPE=clang_musl
+ sed -i "/^CFG_COMPILE_TYPE=/cCFG_COMPILE_TYPE=$COMPILE_TYPE" $(pwd)/build/cfg.mak
+ fi
+ # Todo: middleware lib chip type
+if [ "$BOARD_NAME" = "hispark_ss927v100" ];then
+ CHIP_TYPE=ss928v100
+elif [ "$BOARD_NAME" = "hispark_ss928v100" ];then
+ CHIP_TYPE=ss928v100
+else
+ CHIP_TYPE=hi3516dv500
+fi
+ sed -i "/^CFG_OS_TYPE=/cCFG_OS_TYPE=$OS_TYPE" $(pwd)/build/cfg.mak
+
+ pushd .
+ make clean
+ make -j1 VERBOSE=1
+ popd
+ # Rootfs依赖本模块的库
+ ROOT_DIR=$(cd $(dirname "$0")/../;pwd)
+ if [ ! -d "$OUT_DIR/libs" ]; then
+ mkdir -p $OUT_DIR/libs
+ fi
+
+ cp $ROOT_DIR/../middleware/source/component/fileformat/heif/lib/$CHIP_TYPE/$COMPILE_TYPE/libheif.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/fileformat/mp4/lib/$CHIP_TYPE/$COMPILE_TYPE/libmp4.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/fileformat/ts/lib/$CHIP_TYPE/$COMPILE_TYPE/libts.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/fileformat/common/lib/$CHIP_TYPE/$COMPILE_TYPE/libfileformat.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/fileformat/exif/lib/$CHIP_TYPE/$COMPILE_TYPE/libexif.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/recorder_pro/lib/$CHIP_TYPE/$COMPILE_TYPE/librecorder_pro.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/liteplayer/lib/$CHIP_TYPE/$COMPILE_TYPE/libplugin_demuxer_hmf.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/liteplayer/lib/$CHIP_TYPE/$COMPILE_TYPE/libmpf_demuxer.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/liteplayer/lib/$CHIP_TYPE/$COMPILE_TYPE/libplugin_vdec_35xx.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/liteplayer/lib/$CHIP_TYPE/$COMPILE_TYPE/libplugin_adec_35xx.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/liteplayer/lib/$CHIP_TYPE/$COMPILE_TYPE/libavplay_common.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/otconfaccess/lib/$CHIP_TYPE/$COMPILE_TYPE/libotconfaccess.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/component/dtcf/lib/$CHIP_TYPE/$COMPILE_TYPE/libdtcf.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/common/ottimer/lib/$CHIP_TYPE/$COMPILE_TYPE/libottimer.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/common/uproc/lib/$CHIP_TYPE/$COMPILE_TYPE/libuproc.so $OUT_DIR/
+ cp $ROOT_DIR/../middleware/source/common/log/lib/$CHIP_TYPE/$COMPILE_TYPE/libmwlog.so $OUT_DIR/
+ # cp $ROOT_DIR/../middleware/source/common/securec/lib/$CHIP_TYPE/$COMPILE_TYPE/libsecurec.so $OUT_DIR/
+
+ cp $ROOT_DIR/audio/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libaudio_hw.so $OUT_DIR/
+ cp $ROOT_DIR/audio/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libaudio_usb_port.so $OUT_DIR/
+ if [ -f "$ROOT_DIR/audio/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libaudio_primary_port.so" ]; then
+ cp $ROOT_DIR/audio/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libaudio_primary_port.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/audio/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libaudio_hdmi_port.so" ]; then
+ cp $ROOT_DIR/audio/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libaudio_hdmi_port.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/audio/source/plugins/hi35xx/audio_effect_manager/audio_vqe.ini" ]; then
+ cp $ROOT_DIR/audio/source/plugins/hi35xx/audio_effect_manager/audio_vqe.ini $OUT_DIR/data/
+ fi
+ cp $ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libcodec.so $OUT_DIR/
+ if [ -f "$ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_vdec_35xx.so" ]; then
+ cp $ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_vdec_35xx.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_venc_35xx.so" ]; then
+ cp $ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_venc_35xx.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_adec_35xx.so" ]; then
+ cp $ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_adec_35xx.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_aenc_35xx.so" ]; then
+ cp $ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_aenc_35xx.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libotaacdec.so" ]; then
+ cp $ROOT_DIR/codec/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libotaacdec.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libformat_hw.so" ]; then
+ cp $ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libformat_hw.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_demuxer_ffmpeg.so" ]; then
+ cp $ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_demuxer_ffmpeg.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_demuxer_hmf.so" ]; then
+ cp $ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_demuxer_hmf.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_demuxer_raw.so" ]; then
+ cp $ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_demuxer_raw.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_demuxer_mpf.so" ]; then
+ cp $ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_demuxer_mpf.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_muxer_recorder.so" ]; then
+ cp $ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_muxer_recorder.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/common/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libmedia_hal_common.so" ]; then
+ cp $ROOT_DIR/common/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libmedia_hal_common.so $OUT_DIR/
+ fi
+ if [ -f "$ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_muxer_m4a.so" ]; then
+ cp $ROOT_DIR/format/libs/$BOARD_NAME/$TOOLCHAIN_BUILD_COMPILER/$KERNEL_OS_TYPE/libs/libplugin_muxer_m4a.so $OUT_DIR/
+ fi
+}
+
+main "$@"
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/cfg.mak b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/cfg.mak
new file mode 100755
index 0000000000000000000000000000000000000000..d1f10ad3df252aa2f54439ff7d65130f61f1147c
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/cfg.mak
@@ -0,0 +1,12 @@
+CFG_ENABLE_FALLOCATE=y
+CFG_TURNON_LOG=y
+CFG_CHIP_TYPE_HI3516DV300=y
+CFG_CHIP_TYPE=hispark_ss928v100
+CFG_OS_TYPE_LITEOS=
+CFG_OS_TYPE=Linux
+CFG_COMPILE_TYPE=clang_musl
+CFG_COMPILE_DIR=/home/liubowen/hi3403_rkh/pegasus/os/OpenHarmony/ohos/prebuilts/clang/ohos/linux-x86_64/llvm/bin
+CFG_SUPPORT_FORMAT_MUXER=y
+CFG_SUPPORT_FORMAT_DEMUXER=y
+CFG_SUPPORT_DYNAMIC_LOADING=y
+CFG_SUPPORT_DYNAMIC_LOADING_DEMUXER_PLUGIN=y
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/release.sh b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/release.sh
new file mode 100755
index 0000000000000000000000000000000000000000..be53c85a48d8c377c410db2f1506b3dfae3bba9f
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/build/release.sh
@@ -0,0 +1,102 @@
+#!/bin/bash
+# Copyright (c) 2025 HiSilicon (Shanghai) Technologies 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.
+# media release script
+#
+set -e
+
+chip_name=$1
+
+DIRECTORY_TO_BE_RELEASED=(
+../format/source
+)
+
+TO_BE_REMOVED=(
+../format/libs/$chip_name/gcc/linux/libs/libplugin_demuxer_hmf.a
+../format/libs/$chip_name/gcc/linux/libs/libplugin_demuxer_raw.a
+../format/libs/$chip_name/gcc/linux/libs/libplugin_demuxer_mpf.a
+../format/libs/$chip_name/gcc/linux/libs/libplugin_muxer_recorder.a
+../format/libs/$chip_name/gcc/linux/libs/libplugin_muxer_m4a.a
+../format/libs/$chip_name/gcc/linux/libs/libformat_hw.a
+
+../test
+../audio/libs
+../codec/libs
+../camera/libs
+../common/libs
+../format/source/include
+)
+
+# Delete all but exclude include and lib directory.
+function make_publish_directory()
+{
+ if [ $# -lt 1 ]; then
+ return
+ fi
+
+ for dir in "$@" ; do
+ if [ -d "$dir" ]; then
+ pushd ${dir}
+ rm -rf $(ls |egrep -v '(include|lib)')
+ popd
+ fi
+ done
+}
+
+function remove_dirs_and_files()
+{
+ if [ $# -lt 1 ]; then
+ return
+ fi
+
+ for dir in "$@" ; do
+ if [ -a "$dir" ]; then
+ rm -rf ${dir}
+ fi
+ done
+}
+
+function remove_objects()
+{
+ find ./ -name obj | xargs rm -rf
+ find ./ -name *.o | xargs rm -rf
+ find ./ -name *.d | xargs rm -rf
+}
+
+
+function release()
+{
+ echo "DIRECTORY_TO_BE_RELEASED:${DIRECTORY_TO_BE_RELEASED[@]}"
+ make_publish_directory ${DIRECTORY_TO_BE_RELEASED[@]}
+
+ echo "TO_BE_REMOVED:${TO_BE_REMOVED[@]}"
+ remove_dirs_and_files ${TO_BE_REMOVED[@]}
+
+ remove_objects
+}
+
+function main(){
+ module_name=$(pwd | awk -F"/" '{print $NF}')
+ echo "Release module: $module_name start."
+ release
+ if [ "$chip_name" != "hispark_hi3516cv610" ];then
+ pushd ../
+ make clean
+ make
+ make clean
+ popd
+ fi
+ echo "Release module: $module_name end."
+}
+
+main "$@"
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/bundle.json b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/bundle.json
new file mode 100755
index 0000000000000000000000000000000000000000..2fbc15e62e71ad8c6b8dd00aae29a25b175fe756
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/bundle.json
@@ -0,0 +1,35 @@
+{
+ "name": "@ohos/hardware",
+ "description": "hardware media sdk.",
+ "version": "3.1",
+ "license": "Apache License 2.0",
+ "publishAs": "code-segment",
+ "segment": {
+ "destPath": "device/soc/hisilicon/common/hal/media"
+ },
+ "dirs": {},
+ "scripts": {},
+ "component": {
+ "name": "hardware",
+ "subsystem": "vendor",
+ "syscap": [],
+ "features": [],
+ "adapted_system_type": [
+ "mini",
+ "small"
+ ],
+ "rom": "",
+ "ram": "",
+ "deps": {
+ "components": [],
+ "third_party": []
+ },
+ "build": {
+ "sub_component": [
+ "//device/soc/hisilicon/common/hal/media:hardware_media_sdk"
+ ],
+ "inner_kits": [],
+ "test": []
+ }
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3516dv300/linux_small/libs/libhdi_camera.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3516dv300/linux_small/libs/libhdi_camera.so
new file mode 100755
index 0000000000000000000000000000000000000000..dd80d6f6c1fe7ee27da995627ffd32d78a4c3185
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3516dv300/linux_small/libs/libhdi_camera.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3516dv300/linux_standard/libs/libcamera_hw_platform.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3516dv300/linux_standard/libs/libcamera_hw_platform.so
new file mode 100755
index 0000000000000000000000000000000000000000..560aae057521b084b0aaaa3ed1e01f9eb29bbadb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3516dv300/linux_standard/libs/libcamera_hw_platform.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3516dv300/liteos_a/libs/libhdi_camera.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3516dv300/liteos_a/libs/libhdi_camera.so
new file mode 100755
index 0000000000000000000000000000000000000000..b8c46554f8988b959ee93dee87c758f378ec6d6b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3516dv300/liteos_a/libs/libhdi_camera.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3518ev300/liteos_a/libs/libhdi_camera.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3518ev300/liteos_a/libs/libhdi_camera.so
new file mode 100755
index 0000000000000000000000000000000000000000..5414ec38d170cdeaadda7812a01b975058f1edfa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/hi3518ev300/liteos_a/libs/libhdi_camera.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..9473e9aaceaf1ff8ad6870c357f9608c3061a00f
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/BUILD.gn
@@ -0,0 +1,260 @@
+# Copyright (c) 2020 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.
+
+import("//build/lite/config/component/lite_component.gni")
+import("//build/lite/config/subsystem/aafwk/path.gni")
+import("//build/lite/ndk/ndk.gni")
+
+#if (ohos_build_compiler == "clang") {
+# copy("hdi_media") {
+# sources = [ "hal/hdi_media/${board_name}/llvm/ohos/libs/libhdi_media.so" ]
+# outputs = [ "$root_out_dir/libhdi_media.so" ]
+# }
+#}
+
+#if (ohos_build_compiler == "gcc") {
+# copy("hdi_media") {
+# sources = [ "hal/hdi_media/${board_name}/gcc/ohos/libs/libhdi_media.so" ]
+# outputs = [ "$root_out_dir/libhdi_media.so" ]
+# }
+#}
+
+shared_library("hdi_camera") {
+ output_name = "hdi_camera"
+ sources = [
+ "./src/hal_camera.c",
+ "./src/hi_camera_vi.c",
+ "./src/host_uvc.c",
+ "./src/media_vdec.c",
+ ]
+ include_dirs = [
+ "src",
+ "../../common/source/include",
+ "//drivers/peripheral/display/interfaces/include",
+ "//drivers/peripheral/base",
+ "//foundation/multimedia/media_utils_lite/hals",
+ "//device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/include/",
+ "//device/soc/hisilicon/common/hal/middleware/source/common/include/",
+ ]
+ ldflags = [ "-lss_mpi" ]
+ ldflags += [ "-lotconfaccess" ]
+ ldflags += [ "-lsvp_acl" ]
+ ldflags += [ "-lsvp_aicpu" ]
+ ldflags += [ "-lprotobuf-c" ]
+ if (board_name == "hispark_ss928v100" || board_name == "hispark_ss927v100") {
+ ldflags += [ "-lot_osal" ]
+ ldflags += [ "-lot_irq" ]
+ ldflags += [ "-lss_isp" ]
+ ldflags += [ "-lot_mpi_isp" ]
+ ldflags += [ "-lot_isp" ]
+ ldflags += [ "-lot_base" ]
+ ldflags += [ "-lss_crb" ]
+ ldflags += [ "-lss_ir_auto" ]
+ ldflags += [ "-lss_awb" ]
+ ldflags += [ "-lss_ive" ]
+ ldflags += [ "-lss_dnvqe" ]
+ ldflags += [ "-lss_drc" ]
+ ldflags += [ "-lss_ldci" ]
+ ldflags += [ "-lss_upvqe" ]
+ ldflags += [ "-lss_dehaze" ]
+ ldflags += [ "-lss_voice_engine" ]
+ ldflags += [ "-lss_ae" ]
+ ldflags += [ "-lss_bnr" ]
+ ldflags += [ "-lss_acs" ]
+ ldflags += [ "-lss_extend_stats" ]
+ ldflags += [ "-lss_calcflicker" ]
+ ldflags += [ "-lss_hdmi" ]
+ ldflags += [ "-lot_sys" ]
+ ldflags += [ "-lot_chnl" ]
+ ldflags += [ "-lot_rgn" ]
+ ldflags += [ "-lot_dis" ]
+ ldflags += [ "-lot_vpp" ]
+ ldflags += [ "-lot_vi" ]
+ ldflags += [ "-lot_vpss" ]
+ ldflags += [ "-lot_vo" ]
+ ldflags += [ "-lot_vedu" ]
+ ldflags += [ "-lot_rc" ]
+ ldflags += [ "-lot_venc" ]
+ ldflags += [ "-lot_h264e" ]
+ ldflags += [ "-lot_h265e" ]
+ ldflags += [ "-lot_jpege" ]
+ ldflags += [ "-lot_jpegd" ]
+ ldflags += [ "-lot_vfmw" ]
+ ldflags += [ "-lot_vdec" ]
+ ldflags += [ "-lot_aio" ]
+ ldflags += [ "-lot_ai" ]
+ ldflags += [ "-lot_ao" ]
+ ldflags += [ "-lot_aenc" ]
+ ldflags += [ "-lot_adec" ]
+ ldflags += [ "-lot_acodec" ]
+ ldflags += [ "-lot_sensor_i2c" ]
+ ldflags += [ "-lot_gdc" ]
+ ldflags += [ "-lot_vgs" ]
+ } else {
+ ldflags += [ "-lot_mpi_isp" ]
+ ldflags += [ "-lir_auto" ]
+ ldflags += [ "-lss_mpi_awb" ]
+ # ldflags += [ "-live" ]
+ # ldflags += [ "-ldnvqe" ]
+ ldflags += [ "-ldrc" ]
+ ldflags += [ "-lldci" ]
+ # ldflags += [ "-lupvqe" ]
+ ldflags += [ "-ldehaze" ]
+ ldflags += [ "-lvoice_engine" ]
+ ldflags += [ "-lss_mpi_isp" ]
+ ldflags += [ "-lss_mpi_ae" ]
+ ldflags += [ "-lbnr" ]
+ ldflags += [ "-lacs" ]
+ ldflags += [ "-lextend_stats" ]
+ ldflags += [ "-lcalcflicker" ]
+ # ldflags += [ "-lhdmi" ]
+ }
+ deps = [
+ "//third_party/bounds_checking_function:libsec_shared",
+ "//device/soc/hisilicon/common/hal/display:display_layer",
+ "//device/soc/hisilicon/common/hal/media:hardware_media_sdk",
+ ]
+
+ #To enable low latency for distributed cameras, add the macro "ENABLE_DISTRIBUTED_CAMERA_LOW_DELAY " after the [defines] variable.
+ defines = [ "HAVE_DISPLAY" ]
+ if ((board_name == "hi3516dv300" || board_name == "hispark_taurus") &&
+ ohos_kernel_type == "liteos_a") {
+ if (ohos_build_compiler == "clang") {
+ ldflags += [ "-Wl,-L${ohos_root_path}/device/hisilicon/hispark_taurus/sdk_liteos/mpp/lib" ]
+ include_dirs +=
+ [ "//device/hisilicon/hi3516dv300/sdk_liteos/mpp/include" ]
+ deps += [ "//device/hisilicon/build/hi3516dv300/liteos:hi3516dv300_image" ]
+ } else {
+ ldflags += [ "-Wl,-L${ohos_root_path}/device/hisilicon/${board_name}/sdk_liteos/mpp/lib" ]
+ include_dirs +=
+ [ "//device/hisilicon/${board_name}/sdk_liteos/mpp/include" ]
+ #deps += [ "//device/hisilicon/build/hi3516dv300:hi3516dv300_image" ]
+ }
+ } else if ((board_name == "hispark_ss927v100" || board_name == "hispark_ss928v100") && ohos_kernel_type == "linux") {
+ ldflags += [ "-pthread" ]
+ ldflags += [ "-rdynamic" ]
+ defines += [ "__SS928V100__" ]
+ CHIP_TYPE = "ss928v100"
+ COMPILE_TYPE = "clang_musl"
+ ldflags += [ "-L${ohos_root_path}/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/$CHIP_TYPE/$COMPILE_TYPE/" ]
+ ldflags += [ "-Wl,-L${ohos_root_path}/device/soc/hisilicon/ss928v100/sdk_linux/smp/a55_linux/mpp/out/lib" ]
+ include_dirs +=
+ [ "//device/soc/hisilicon/ss928v100/sdk_linux/smp/a55_linux/mpp/out/include" ]
+ include_dirs +=
+ [ "//device/soc/hisilicon/ss928v100/sdk_linux/smp/a55_linux/mpp/cbb/isp/include" ]
+ } else if (ohos_kernel_type == "linux") {
+ ldflags += [ "-pthread" ]
+ if (ohos_build_compiler == "clang") {
+ ldflags += [ "-Wl,-L$ohos_root_path/vendor/hisi/camera/dvkit_product/linux/hi3516dv300/Hi3516CV500_SDK_V2.0.2.0/Hi3516CV500_SDK_V2.0.2.0/smp/a7_linux/mpp/lib" ]
+ include_dirs += [ "//vendor/hisi/camera/dvkit_product/linux/hi3516dv300/Hi3516CV500_SDK_V2.0.2.0/Hi3516CV500_SDK_V2.0.2.0/smp/a7_linux/mpp/include" ]
+ deps += [ "//vendor/hisi/camera/dvkit_product/linux/hi3516dv300/Hi3516CV500_SDK_V2.0.2.0:linux_kernel" ]
+ } else {
+ ldflags += [ "-Wl,-L${ohos_root_path}/device/hisilicon/hi3559v200/sdk_linux/mpp/lib" ]
+ include_dirs +=
+ [ "//device/hisilicon/hi3559v200/sdk_linux/mpp/include" ]
+ }
+ } else if (board_name == "hispark_taurus" && ohos_kernel_type == "linux") {
+ ldflags += [ "-lpthread" ]
+ ldflags += [ "-lhi_irq" ]
+ ldflags += [ "-lsdk" ]
+ ldflags += [ "-lhi_osal" ]
+ ldflags += [ "-laac_dec" ]
+ ldflags += [ "-laac_enc" ]
+ ldflags += [ "-laac_comm" ]
+ ldflags += [ "-l_hiawb" ]
+ ldflags += [ "-lir_auto" ]
+ ldflags += [ "-lhi3516cv500_base" ]
+ ldflags += [ "-lhi3516cv500_sys" ]
+ ldflags += [ "-lhi3516cv500_chnl" ]
+ ldflags += [ "-lhi3516cv500_rgn" ]
+ ldflags += [ "-lhi3516cv500_vo" ]
+ ldflags += [ "-lhi3516cv500_vgs" ]
+ ldflags += [ "-lhi3516cv500_vpss" ]
+ ldflags += [ "-lhi3516cv500_vdec" ]
+ ldflags += [ "-lhi3516cv500_h265e" ]
+ ldflags += [ "-lhi3516cv500_h264e" ]
+ ldflags += [ "-lhi3516cv500_jpege" ]
+ ldflags += [ "-lhi3516cv500_venc" ]
+ ldflags += [ "-lhi3516cv500_vedu" ]
+ ldflags += [ "-lhi3516cv500_vi" ]
+ ldflags += [ "-lhi3516cv500_isp" ]
+ ldflags += [ "-lhi3516cv500_rc" ]
+ ldflags += [ "-lhi3516cv500_jpegd" ]
+ ldflags += [ "-lhi3516cv500_vfmw" ]
+ ldflags += [ "-lhi3516cv500_gdc" ]
+ ldflags += [ "-lhi3516cv500_dis" ]
+ ldflags += [ "-lhi3516cv500_acodec" ]
+ ldflags += [ "-lhi3516cv500_adec" ]
+ ldflags += [ "-lhi3516cv500_aenc" ]
+ ldflags += [ "-lhi3516cv500_aio" ]
+ ldflags += [ "-lhi3516cv500_nnie" ]
+ ldflags += [ "-lhi3516cv500_ive" ]
+ ldflags += [ "-lhi3516cv500_ai" ]
+ ldflags += [ "-lhi3516cv500_ao" ]
+ ldflags += [ "-lhi_sensor_i2c" ]
+ ldflags += [ "-lsecurec" ]
+ ldflags += [ "-Wl,-L$ohos_root_path/device/hisilicon/hispark_taurus/sdk_linux/soc/lib_lite" ]
+ include_dirs += [ "$ohos_root_path/device/hisilicon/hispark_taurus/sdk_linux/soc/src/mpp/cbb/include" ]
+ include_dirs += [ "$ohos_root_path/third_party/bounds_checking_function/include" ]
+ include_dirs += [ "$ohos_root_path/device/hisilicon/hispark_taurus/sdk_linux/huawei_proprietary/include" ]
+ } else if ((board_name == "hi3518ev300" || board_name == "hispark_aries") &&
+ ohos_kernel_type == "liteos_a") {
+ if (ohos_build_compiler == "clang") {
+ ldflags += [ "-Wl,-L${ohos_root_path}/device/hisilicon/hispark_aries/sdk_liteos/mpp/lib/" ]
+ deps += [ "//device/hisilicon/build/hi3518ev300:hi3518ev300_make_kernel" ]
+ include_dirs += [
+ "//device/hisilicon/hi3518ev300/sdk_liteos/mpp/include",
+ ]
+ } else {
+ ldflags += [
+ "-Wl,-L$ohos_root_path/device/hisilicon/hi3518ev300/sdk_liteos/mpp/lib",
+ ]
+ deps += [ "//device/hisilicon/build/hi3518ev300:hi3518ev300_make_kernel" ]
+ include_dirs +=
+ [ "//device/hisilicon/hi3518ev300/sdk_liteos/mpp/include" ]
+ }
+ } else if ((board_name == "hi3518ev300" || board_name == "hispark_aries") &&
+ ohos_kernel_type == "linux") {
+ ldflags += [ "-pthread" ]
+ ldflags += [ "-Wl,-L$ohos_root_path/vendor/hisi/camera/dvkit_product/linux/hi3518ev300/Hi3516EV200_SDK_V1.0.1.2_LINUX/Hi3516EV200_SDK_V1.0.1.2/mpp/lib" ]
+ deps += [ "//vendor/hisi/camera/dvkit_product/linux/hi3518ev300/Hi3516EV200_SDK_V1.0.1.2_LINUX:linux_kernel" ]
+ include_dirs += [ "//vendor/hisi/camera/dvkit_product/linux/hi3518ev300/Hi3516EV200_SDK_V1.0.1.2_LINUX/Hi3516EV200_SDK_V1.0.1.2/mpp/include" ]
+ } else if (board_name == "aegis_hi3516dv300" &&
+ ohos_kernel_type == "liteos_a") {
+ ldflags += [
+ "-Wl,-L${ohos_root_path}/device/hisilicon/$board_name/sdk_liteos/mpp/lib",
+ ]
+ include_dirs += [ "//device/hisilicon/$board_name/sdk_liteos/mpp/include" ]
+ deps += [ "//device/hisilicon/$board_name/build:aegis_hi3516dv300_image" ]
+ }
+}
+
+executable("hal_sample_camera") {
+ sources = [
+ "src/sample_camera.c",
+ ]
+ cflags = [ "-Wall" ]
+ cflags_cc = cflags
+ include_dirs = ["//foundation/multimedia/media_utils_lite/hals"]
+
+ ldflags = [ "-lpthread" ]
+ ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ]
+ ldflags += [ "-lhdi_camera" ]
+ ldflags += [ "-lhdi_videodisplayer" ]
+
+ deps = [
+ ":hdi_camera",
+ "//device/soc/hisilicon/common/hal/display:display_layer",
+ ]
+ output_dir = "$root_out_dir/dev_tools"
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..6c16a38591066521e96eb6105d9a9fe1674db137
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/BUILD.gn
@@ -0,0 +1,73 @@
+# Copyright (c) 2025 HiSilicon (Shanghai) Technologies 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.
+
+import("//build/lite/config/component/lite_component.gni")
+import("//foundation/multimedia/media_utils_lite/config.gni")
+
+shared_library("hdi_virtual_camera") {
+ include_dirs = [
+ "include/dcamera_device",
+ "include/dcamera_provider",
+ "include/dstream_operator",
+ "include/dcamera_decoder",
+ "include/utils",
+ "//drivers/peripheral/codec/interfaces/include",
+ "//drivers/peripheral/display/interfaces/include",
+ "//foundation/multimedia/media_utils_lite/hals",
+ "//drivers/peripheral/base",
+ "//drivers/interface/distributed_camera",
+ "//third_party/jsoncpp/include",
+ "//foundation/multimedia/media_utils_lite/interfaces/kits"
+ ]
+ sources = [
+ "src/dcamera_provider/dcamera_provider.cpp",
+ "src/dcamera_device/distributed_camera_hal.cpp",
+ "src/dstream_operator/dbuffer_manager.cpp",
+ "src/dcamera_decoder/dcamera_decoder.cpp",
+ "src/utils/anonymous_string.cpp",
+ "src/utils/dcamera.cpp",
+ "src/utils/dh_log.cpp",
+ ]
+
+ deps = [
+ "//device/soc/hisilicon/common/hal/display:display_layer",
+ "//third_party/bounds_checking_function:libsec_shared",
+ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
+ "//drivers/interface/camera/metadata:metadata_lite",
+ "//foundation/multimedia/media_utils_lite:media_common",
+ ]
+
+ public_configs = [ ":virtual_camera_external_config" ]
+
+ defines = [
+ "HI_LOG_ENABLE",
+ "DH_LOG_TAG=\"distributedcamerahdf\"",
+ "LOG_DOMAIN=0xD004100",
+ "SUPPORT_NAMESPACE_MEDATA",
+ ]
+ if (enable_distributed_dfx == true) {
+ defines += ["ENABLE_DFX"]
+ }
+}
+
+config("virtual_camera_external_config") {
+ include_dirs = [
+ "include/dcamera_provider",
+ ]
+}
+
+group("hdi_distributed_camera") {
+ deps = [
+ ":hdi_virtual_camera",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_decoder/dcamera_decoder.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_decoder/dcamera_decoder.h
new file mode 100755
index 0000000000000000000000000000000000000000..e3307bdd1d3d4bc43311b80147817e66a9fdbf70
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_decoder/dcamera_decoder.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_device/dcamera_device.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_device/dcamera_device.h
new file mode 100755
index 0000000000000000000000000000000000000000..34927ffc79250df7aeed68f32034907f635fa78b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_device/dcamera_device.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_device/dmetadata_processor.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_device/dmetadata_processor.h
new file mode 100755
index 0000000000000000000000000000000000000000..af9b8263db465f9862132e54c8d088172aa4abb3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_device/dmetadata_processor.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_provider/dcamera_provider.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_provider/dcamera_provider.h
new file mode 100755
index 0000000000000000000000000000000000000000..e4efca9a7499b77f9b1e855b2005053656f8c5cc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dcamera_provider/dcamera_provider.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dstream_operator/dbuffer_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dstream_operator/dbuffer_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..d6578c31b557a5b38a7b549cd63dbe7e9699fb3d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/dstream_operator/dbuffer_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/anonymous_string.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/anonymous_string.h
new file mode 100755
index 0000000000000000000000000000000000000000..7b5ea11ee63864414e378e33f3acced8bd9d9ef5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/anonymous_string.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/constants.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/constants.h
new file mode 100755
index 0000000000000000000000000000000000000000..064ab80b09ab1355b9842fb033718d5bb957d32e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/constants.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/dcamera.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/dcamera.h
new file mode 100755
index 0000000000000000000000000000000000000000..f8bd2341866d84331fb1cc324f46487b64535a52
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/dcamera.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/dcamera_utils.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/dcamera_utils.h
new file mode 100755
index 0000000000000000000000000000000000000000..81e33d910c627a0b1e923ed268127bcf88dade0d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/dcamera_utils.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/dh_log.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/dh_log.h
new file mode 100755
index 0000000000000000000000000000000000000000..f981d1eb575b747b026d08a7c147c7f24dffdfe5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/dh_log.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/distributed_hardware_log.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/distributed_hardware_log.h
new file mode 100755
index 0000000000000000000000000000000000000000..3e69655b0563293ee0d909c114bedb804b1d1b14
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/include/utils/distributed_hardware_log.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_decoder/dcamera_decoder.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_decoder/dcamera_decoder.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..4be2316ef85e931fd4cca6296eaec1db18875e47
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_decoder/dcamera_decoder.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_device/dcamera_device.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_device/dcamera_device.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..1558021520a582f782e431fff0c11c1c912807f5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_device/dcamera_device.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_device/distributed_camera_hal.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_device/distributed_camera_hal.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..21c94c649ef0082f8588aab8f01afeb74adea2ce
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_device/distributed_camera_hal.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_device/dmetadata_processor.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_device/dmetadata_processor.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..61c91c1c42eaeaad87d200beaadec614ffab8044
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_device/dmetadata_processor.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_provider/dcamera_provider.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_provider/dcamera_provider.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..962daca4bc21f3764291033cb926cbdbbc6aa5b3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dcamera_provider/dcamera_provider.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dstream_operator/dbuffer_manager.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dstream_operator/dbuffer_manager.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..fc7f1dd5ee3059d6c0f8fd492275b4c80e470d2a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/dstream_operator/dbuffer_manager.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/utils/anonymous_string.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/utils/anonymous_string.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..74855b6dec9694c2ee9f3b27f9fde72fee762fc7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/utils/anonymous_string.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/utils/dcamera.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/utils/dcamera.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..dc02882e1f00fe7eccc7880ee1da5b842d466438
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/utils/dcamera.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/utils/dh_log.cpp b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/utils/dh_log.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..23b5be01201466a2fdf08750ffaa7fbf0127f688
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/distributed_camera/src/utils/dh_log.cpp differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hal_camera copy.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hal_camera copy.c
new file mode 100755
index 0000000000000000000000000000000000000000..e230578d83c70465d8e0ba93011db1b68a0f6813
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hal_camera copy.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hal_camera.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hal_camera.c
new file mode 100755
index 0000000000000000000000000000000000000000..df823319cb6e5b61150a45c6d2d79376c06b6a20
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hal_camera.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hi_camera_comm.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hi_camera_comm.h
new file mode 100755
index 0000000000000000000000000000000000000000..262843029283386f65e7456ccae57faadf1f621a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hi_camera_comm.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hi_camera_vi.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hi_camera_vi.c
new file mode 100755
index 0000000000000000000000000000000000000000..a644e50dee9ac1223d042ac20f2e87c9880bef13
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hi_camera_vi.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hi_camera_vi.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hi_camera_vi.h
new file mode 100755
index 0000000000000000000000000000000000000000..4dbc35abf0ab39ad032d9d2f28a825a804fbac91
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/hi_camera_vi.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/host_uvc.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/host_uvc.c
new file mode 100755
index 0000000000000000000000000000000000000000..2fa6663f76003ab7071229a9e20cefd716d18c4d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/host_uvc.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/host_uvc.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/host_uvc.h
new file mode 100755
index 0000000000000000000000000000000000000000..2334c2d011bf4859b9e3ae572ff3f6ee3ba1b661
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/host_uvc.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/media_vdec.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/media_vdec.c
new file mode 100755
index 0000000000000000000000000000000000000000..64b728ab48d9ec93c44d6b883717932ff72003e8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/media_vdec.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/media_vdec.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/media_vdec.h
new file mode 100755
index 0000000000000000000000000000000000000000..f03b29d36b12ddba938c92842c055893794037cd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/media_vdec.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/sample_camera.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/sample_camera.c
new file mode 100755
index 0000000000000000000000000000000000000000..d9b361612e26ddb4be4064c4cc5a920d2aade0eb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/sample_camera.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/simsunb_16x32.dat b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/simsunb_16x32.dat
new file mode 100755
index 0000000000000000000000000000000000000000..b4ec6a390d997e9078000045dc33f4c0e18633b7
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/camera/source/src/simsunb_16x32.dat
@@ -0,0 +1,380 @@
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x00 ,0x03 ,0x80 ,0x03 ,0x80 ,0x03 ,0x80 ,0x03 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,
+0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,0x03 ,0x80 ,
+0x03 ,0x80 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x06 ,0x70 ,0x06 ,0x70 ,0x06 ,0x70 ,0x06 ,0x60 ,0x06 ,0x60 ,0x06 ,0x60 ,0x06 ,0x60 ,
+0x06 ,0x20 ,0x04 ,0x40 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x04 ,0x18 ,0x0c ,0x18 ,0x0c ,0x10 ,0x08 ,0x10 ,
+0x08 ,0x10 ,0x7f ,0xfe ,0x7f ,0xfe ,0x08 ,0x10 ,0x08 ,0x10 ,0x08 ,0x10 ,0x08 ,0x10 ,0x08 ,0x10 ,
+0x08 ,0x30 ,0x08 ,0x30 ,0x7f ,0xfe ,0x7f ,0xfe ,0x10 ,0x20 ,0x10 ,0x20 ,0x10 ,0x20 ,0x10 ,0x20 ,
+0x10 ,0x20 ,0x10 ,0x20 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,0x01 ,0x80 ,0x07 ,0xe0 ,0x0d ,0xb0 ,0x19 ,0x98 ,0x19 ,0x98 ,
+0x19 ,0xb8 ,0x19 ,0xb0 ,0x19 ,0x80 ,0x1d ,0x80 ,0x0f ,0x80 ,0x07 ,0x80 ,0x01 ,0xc0 ,0x01 ,0xe0 ,
+0x01 ,0xf0 ,0x01 ,0xb8 ,0x01 ,0x98 ,0x19 ,0x98 ,0x39 ,0x98 ,0x39 ,0x98 ,0x31 ,0x98 ,0x11 ,0x90 ,
+0x0d ,0xe0 ,0x03 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x38 ,0x10 ,0x44 ,0x10 ,0x46 ,0x20 ,0xc6 ,0x20 ,
+0xc6 ,0x20 ,0xc6 ,0x40 ,0xc6 ,0x40 ,0xc6 ,0x80 ,0x46 ,0x80 ,0x44 ,0x80 ,0x3d ,0x18 ,0x01 ,0x64 ,
+0x02 ,0x46 ,0x02 ,0x46 ,0x04 ,0xc6 ,0x04 ,0xc6 ,0x04 ,0xc6 ,0x08 ,0xc6 ,0x08 ,0x46 ,0x10 ,0x46 ,
+0x10 ,0x2c ,0x10 ,0x10 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x0f ,0x80 ,0x18 ,0x80 ,0x10 ,0xc0 ,0x10 ,0xc0 ,
+0x10 ,0xc0 ,0x10 ,0x80 ,0x19 ,0x80 ,0x19 ,0x00 ,0x1a ,0x00 ,0x1c ,0x7c ,0x1c ,0x18 ,0x2c ,0x10 ,
+0x66 ,0x10 ,0x46 ,0x10 ,0xc7 ,0x20 ,0xc3 ,0x20 ,0xc1 ,0xa0 ,0xc1 ,0xc0 ,0x60 ,0xe0 ,0x70 ,0xf2 ,
+0x3f ,0x3e ,0x0c ,0x18 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x03 ,0x00 ,0x03 ,0x80 ,0x03 ,0x00 ,0x03 ,0x00 ,0x03 ,0x00 ,0x03 ,0x00 ,0x03 ,0x00 ,0x02 ,0x00 ,
+0x02 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x04 ,0x00 ,0x0c ,0x00 ,0x18 ,0x00 ,0x10 ,0x00 ,0x20 ,0x00 ,0x60 ,0x00 ,0x40 ,0x00 ,0xc0 ,
+0x00 ,0xc0 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x00 ,0x80 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0x40 ,0x00 ,0x60 ,
+0x00 ,0x30 ,0x00 ,0x10 ,0x00 ,0x08 ,0x00 ,0x04 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x40 ,0x00 ,0x20 ,0x00 ,0x10 ,0x00 ,0x18 ,0x00 ,0x0c ,0x00 ,0x04 ,0x00 ,0x06 ,0x00 ,0x02 ,0x00 ,
+0x03 ,0x00 ,0x03 ,0x00 ,0x01 ,0x00 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x00 ,0x03 ,0x00 ,0x03 ,0x00 ,0x02 ,0x00 ,0x06 ,0x00 ,0x04 ,0x00 ,
+0x0c ,0x00 ,0x18 ,0x00 ,0x10 ,0x00 ,0x20 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x79 ,0x8e ,0x3d ,0xbe ,0x1e ,0xf0 ,0x01 ,0x80 ,0x03 ,0xc0 ,
+0x06 ,0x70 ,0x0c ,0x38 ,0x1c ,0x1c ,0x38 ,0x0c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x7f ,0xfe ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x1c ,0x00 ,0x1e ,0x00 ,
+0x0e ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,0x0c ,0x00 ,0x18 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7f ,0xfe ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x18 ,0x00 ,0x3c ,0x00 ,
+0x3c ,0x00 ,0x18 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x08 ,0x00 ,0x08 ,0x00 ,0x10 ,0x00 ,0x10 ,
+0x00 ,0x20 ,0x00 ,0x20 ,0x00 ,0x40 ,0x00 ,0x40 ,0x00 ,0x80 ,0x00 ,0x80 ,0x01 ,0x00 ,0x01 ,0x00 ,
+0x02 ,0x00 ,0x02 ,0x00 ,0x06 ,0x00 ,0x04 ,0x00 ,0x0c ,0x00 ,0x08 ,0x00 ,0x18 ,0x00 ,0x10 ,0x00 ,
+0x10 ,0x00 ,0x20 ,0x00 ,0x20 ,0x00 ,0x40 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x07 ,0xc0 ,0x0c ,0x30 ,0x18 ,0x30 ,0x18 ,0x18 ,
+0x38 ,0x18 ,0x30 ,0x1c ,0x30 ,0x0c ,0x30 ,0x0c ,0x70 ,0x0c ,0x70 ,0x0c ,0x70 ,0x0c ,0x70 ,0x0c ,
+0x70 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x1c ,0x30 ,0x18 ,0x18 ,0x18 ,0x18 ,0x18 ,0x0c ,0x30 ,
+0x06 ,0x60 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x80 ,0x03 ,0x80 ,0x07 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x07 ,0xf0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x07 ,0xe0 ,0x18 ,0x30 ,0x10 ,0x18 ,0x30 ,0x18 ,
+0x30 ,0x1c ,0x38 ,0x1c ,0x38 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x30 ,0x00 ,0x60 ,0x00 ,0x40 ,
+0x00 ,0x80 ,0x01 ,0x00 ,0x02 ,0x00 ,0x04 ,0x00 ,0x08 ,0x04 ,0x10 ,0x04 ,0x30 ,0x0c ,0x20 ,0x38 ,
+0x3f ,0xf8 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x0f ,0xc0 ,0x18 ,0x30 ,0x30 ,0x30 ,0x30 ,0x18 ,
+0x38 ,0x18 ,0x10 ,0x18 ,0x00 ,0x18 ,0x00 ,0x30 ,0x00 ,0x60 ,0x03 ,0xc0 ,0x01 ,0xe0 ,0x00 ,0x30 ,
+0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x0c ,0x00 ,0x0c ,0x30 ,0x0c ,0x38 ,0x1c ,0x30 ,0x18 ,0x30 ,0x30 ,
+0x0c ,0x60 ,0x03 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x20 ,0x00 ,0x60 ,0x00 ,0xe0 ,0x00 ,0xe0 ,
+0x01 ,0x60 ,0x03 ,0x60 ,0x02 ,0x60 ,0x04 ,0x60 ,0x04 ,0x60 ,0x08 ,0x60 ,0x10 ,0x60 ,0x10 ,0x60 ,
+0x20 ,0x60 ,0x60 ,0x60 ,0x7f ,0xfe ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,
+0x01 ,0xfc ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x1f ,0xf8 ,0x1f ,0xf8 ,0x10 ,0x00 ,0x10 ,0x00 ,
+0x10 ,0x00 ,0x10 ,0x00 ,0x10 ,0x00 ,0x10 ,0x00 ,0x17 ,0xe0 ,0x18 ,0x30 ,0x10 ,0x18 ,0x00 ,0x18 ,
+0x00 ,0x0c ,0x00 ,0x0c ,0x00 ,0x0c ,0x10 ,0x0c ,0x38 ,0x0c ,0x30 ,0x18 ,0x30 ,0x18 ,0x10 ,0x30 ,
+0x0c ,0x60 ,0x03 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0xf0 ,0x04 ,0x18 ,0x08 ,0x18 ,0x18 ,0x18 ,
+0x10 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x33 ,0xf0 ,0x74 ,0x38 ,0x78 ,0x18 ,0x70 ,0x0c ,
+0x70 ,0x0c ,0x70 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x18 ,0x08 ,0x1c ,0x18 ,
+0x0e ,0x70 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x1f ,0xfc ,0x3f ,0xfc ,0x30 ,0x08 ,0x20 ,0x10 ,
+0x20 ,0x10 ,0x00 ,0x20 ,0x00 ,0x20 ,0x00 ,0x60 ,0x00 ,0x40 ,0x00 ,0xc0 ,0x00 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x03 ,0x00 ,0x03 ,0x00 ,0x03 ,0x00 ,0x03 ,0x00 ,0x03 ,0x00 ,0x07 ,0x00 ,
+0x03 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x0f ,0xe0 ,0x18 ,0x10 ,0x30 ,0x18 ,0x30 ,0x0c ,
+0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x08 ,0x38 ,0x18 ,0x1e ,0x30 ,0x0f ,0xe0 ,0x07 ,0xe0 ,0x18 ,0xf0 ,
+0x30 ,0x38 ,0x30 ,0x18 ,0x60 ,0x0c ,0x60 ,0x0c ,0x60 ,0x0c ,0x60 ,0x0c ,0x30 ,0x08 ,0x10 ,0x18 ,
+0x0c ,0x70 ,0x03 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x0f ,0xc0 ,0x18 ,0x30 ,0x30 ,0x18 ,0x30 ,0x18 ,
+0x70 ,0x18 ,0x60 ,0x0c ,0x60 ,0x0c ,0x60 ,0x0c ,0x70 ,0x0c ,0x30 ,0x1c ,0x30 ,0x2c ,0x38 ,0x6c ,
+0x0f ,0xcc ,0x00 ,0x1c ,0x00 ,0x1c ,0x00 ,0x18 ,0x00 ,0x18 ,0x10 ,0x30 ,0x38 ,0x30 ,0x38 ,0x60 ,
+0x18 ,0xc0 ,0x07 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x80 ,0x03 ,0x80 ,0x03 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,0x03 ,0x80 ,
+0x03 ,0x80 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x80 ,0x03 ,0x80 ,0x03 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x80 ,
+0x03 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x00 ,0x03 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x08 ,0x00 ,0x10 ,0x00 ,0x20 ,0x00 ,0x40 ,
+0x00 ,0x80 ,0x01 ,0x00 ,0x02 ,0x00 ,0x04 ,0x00 ,0x08 ,0x00 ,0x10 ,0x00 ,0x30 ,0x00 ,0x18 ,0x00 ,
+0x0c ,0x00 ,0x06 ,0x00 ,0x03 ,0x00 ,0x01 ,0x80 ,0x00 ,0xc0 ,0x00 ,0x60 ,0x00 ,0x30 ,0x00 ,0x18 ,
+0x00 ,0x0c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7f ,0xfe ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x7f ,0xfe ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x20 ,0x00 ,0x30 ,0x00 ,0x18 ,0x00 ,0x0c ,0x00 ,0x06 ,0x00 ,
+0x03 ,0x00 ,0x01 ,0x80 ,0x00 ,0xc0 ,0x00 ,0x60 ,0x00 ,0x30 ,0x00 ,0x18 ,0x00 ,0x0c ,0x00 ,0x18 ,
+0x00 ,0x30 ,0x00 ,0x60 ,0x00 ,0xc0 ,0x01 ,0x80 ,0x03 ,0x00 ,0x06 ,0x00 ,0x0c ,0x00 ,0x18 ,0x00 ,
+0x30 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,0x0f ,0xf0 ,0x10 ,0x18 ,0x30 ,0x1c ,0x20 ,0x0c ,
+0x20 ,0x0c ,0x30 ,0x0c ,0x38 ,0x0c ,0x10 ,0x1c ,0x00 ,0x18 ,0x00 ,0x30 ,0x00 ,0xe0 ,0x01 ,0x80 ,
+0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,0x03 ,0x80 ,
+0x03 ,0x80 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0xf0 ,0x0c ,0x18 ,0x08 ,0x04 ,0x10 ,0x04 ,
+0x30 ,0xf2 ,0x21 ,0x12 ,0x23 ,0x32 ,0x62 ,0x32 ,0x66 ,0x32 ,0x66 ,0x32 ,0x64 ,0x22 ,0x64 ,0x22 ,
+0x64 ,0x22 ,0x64 ,0x64 ,0x64 ,0x64 ,0x26 ,0xb8 ,0x33 ,0x10 ,0x10 ,0x02 ,0x18 ,0x04 ,0x08 ,0x08 ,
+0x06 ,0x70 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,0x03 ,0x80 ,0x03 ,0x80 ,0x02 ,0xc0 ,
+0x02 ,0xc0 ,0x04 ,0xc0 ,0x04 ,0xc0 ,0x04 ,0x60 ,0x04 ,0x60 ,0x08 ,0x60 ,0x08 ,0x60 ,0x08 ,0x30 ,
+0x08 ,0x30 ,0x17 ,0xf0 ,0x10 ,0x30 ,0x10 ,0x30 ,0x10 ,0x18 ,0x20 ,0x18 ,0x20 ,0x18 ,0x20 ,0x18 ,
+0x70 ,0x3e ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7f ,0xe0 ,0x38 ,0x38 ,0x38 ,0x18 ,0x38 ,0x1c ,
+0x38 ,0x0c ,0x38 ,0x0c ,0x38 ,0x1c ,0x38 ,0x18 ,0x38 ,0x30 ,0x3f ,0xc0 ,0x38 ,0x70 ,0x38 ,0x18 ,
+0x38 ,0x0c ,0x38 ,0x0c ,0x38 ,0x0e ,0x38 ,0x0e ,0x38 ,0x0e ,0x38 ,0x0e ,0x38 ,0x0c ,0x38 ,0x18 ,
+0x7f ,0xf0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0xfc ,0x0c ,0x0c ,0x18 ,0x04 ,0x18 ,0x04 ,
+0x30 ,0x02 ,0x30 ,0x00 ,0x70 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,
+0x60 ,0x00 ,0x60 ,0x00 ,0x70 ,0x00 ,0x70 ,0x02 ,0x30 ,0x02 ,0x30 ,0x04 ,0x18 ,0x04 ,0x1c ,0x08 ,
+0x07 ,0xf0 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7f ,0x80 ,0x38 ,0x60 ,0x38 ,0x30 ,0x38 ,0x18 ,
+0x38 ,0x0c ,0x38 ,0x0c ,0x38 ,0x0c ,0x38 ,0x0e ,0x38 ,0x0e ,0x38 ,0x0e ,0x38 ,0x0e ,0x38 ,0x0e ,
+0x38 ,0x0e ,0x38 ,0x0e ,0x38 ,0x0c ,0x38 ,0x0c ,0x38 ,0x0c ,0x38 ,0x18 ,0x38 ,0x18 ,0x38 ,0x70 ,
+0x3f ,0xc0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7f ,0xf8 ,0x18 ,0x1c ,0x18 ,0x04 ,0x18 ,0x04 ,
+0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x20 ,0x18 ,0x20 ,0x1f ,0xe0 ,0x18 ,0x60 ,0x18 ,0x20 ,
+0x18 ,0x20 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x02 ,0x18 ,0x02 ,0x18 ,0x04 ,0x18 ,0x0c ,
+0x7f ,0xfc ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7f ,0xfc ,0x18 ,0x0c ,0x18 ,0x06 ,0x18 ,0x02 ,
+0x18 ,0x02 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x30 ,0x1f ,0xf0 ,0x18 ,0x10 ,
+0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,
+0x7c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x07 ,0xf8 ,0x0c ,0x38 ,0x18 ,0x18 ,0x10 ,0x08 ,
+0x30 ,0x08 ,0x30 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,
+0x60 ,0x7e ,0x60 ,0x18 ,0x60 ,0x18 ,0x70 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x18 ,0x18 ,0x18 ,0x18 ,
+0x0e ,0x20 ,0x01 ,0xc0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xfc ,0x3e ,0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,
+0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,0x3f ,0xfc ,0x30 ,0x1c ,
+0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,0x30 ,0x1c ,
+0x78 ,0x3e ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x1f ,0xf8 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x1f ,0xf0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x07 ,0xfe ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,
+0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,
+0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x30 ,0x40 ,0x30 ,0xc0 ,
+0x3f ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7c ,0x7e ,0x38 ,0x18 ,0x38 ,0x30 ,0x38 ,0x20 ,
+0x38 ,0x40 ,0x38 ,0x80 ,0x38 ,0x80 ,0x39 ,0x00 ,0x3b ,0x00 ,0x3f ,0x80 ,0x3d ,0x80 ,0x39 ,0x80 ,
+0x38 ,0xc0 ,0x38 ,0xc0 ,0x38 ,0x60 ,0x38 ,0x60 ,0x38 ,0x30 ,0x38 ,0x30 ,0x38 ,0x18 ,0x38 ,0x18 ,
+0x7c ,0x3e ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7e ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,
+0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,
+0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x02 ,0x18 ,0x02 ,0x18 ,0x04 ,0x18 ,0x0c ,
+0x7f ,0xfc ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xf0 ,0x1f ,0x30 ,0x1c ,0x30 ,0x1c ,0x38 ,0x1c ,
+0x38 ,0x2c ,0x38 ,0x2c ,0x38 ,0x2c ,0x28 ,0x2c ,0x2c ,0x4c ,0x2c ,0x4c ,0x2c ,0x4c ,0x2c ,0x4c ,
+0x24 ,0x8c ,0x26 ,0x8c ,0x26 ,0x8c ,0x26 ,0x8c ,0x22 ,0x8c ,0x23 ,0x0c ,0x23 ,0x0c ,0x23 ,0x0c ,
+0x73 ,0x1e ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xf0 ,0x1f ,0x38 ,0x04 ,0x38 ,0x04 ,0x2c ,0x04 ,
+0x2c ,0x04 ,0x26 ,0x04 ,0x26 ,0x04 ,0x23 ,0x04 ,0x23 ,0x04 ,0x21 ,0x84 ,0x21 ,0x84 ,0x20 ,0xc4 ,
+0x20 ,0xc4 ,0x20 ,0x64 ,0x20 ,0x74 ,0x20 ,0x34 ,0x20 ,0x3c ,0x20 ,0x1c ,0x20 ,0x1c ,0x20 ,0x0c ,
+0x78 ,0x0c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x07 ,0xe0 ,0x0c ,0x30 ,0x18 ,0x18 ,0x30 ,0x08 ,
+0x30 ,0x0c ,0x30 ,0x0c ,0x70 ,0x0e ,0x70 ,0x0e ,0x60 ,0x06 ,0x60 ,0x06 ,0x60 ,0x06 ,0x60 ,0x06 ,
+0x60 ,0x06 ,0x60 ,0x06 ,0x70 ,0x0e ,0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x18 ,0x18 ,0x08 ,0x10 ,
+0x06 ,0x60 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7f ,0xe0 ,0x18 ,0x18 ,0x18 ,0x0c ,0x18 ,0x0c ,
+0x18 ,0x0e ,0x18 ,0x0e ,0x18 ,0x0e ,0x18 ,0x0c ,0x18 ,0x0c ,0x18 ,0x18 ,0x18 ,0x70 ,0x1f ,0x80 ,
+0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,
+0x7c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x07 ,0xe0 ,0x0c ,0x30 ,0x18 ,0x18 ,0x30 ,0x08 ,
+0x30 ,0x0c ,0x30 ,0x0c ,0x70 ,0x0c ,0x60 ,0x0e ,0x60 ,0x0e ,0x60 ,0x0e ,0x60 ,0x0e ,0x60 ,0x0e ,
+0x60 ,0x0e ,0x60 ,0x0e ,0x60 ,0x0e ,0x77 ,0x8c ,0x3d ,0xcc ,0x38 ,0xcc ,0x18 ,0x58 ,0x18 ,0x70 ,
+0x06 ,0x60 ,0x01 ,0xf0 ,0x00 ,0x3c ,0x00 ,0x3c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7f ,0xe0 ,0x18 ,0x38 ,0x18 ,0x18 ,0x18 ,0x0c ,
+0x18 ,0x0c ,0x18 ,0x0c ,0x18 ,0x0c ,0x18 ,0x1c ,0x18 ,0x18 ,0x18 ,0x70 ,0x1f ,0xc0 ,0x18 ,0xc0 ,
+0x18 ,0xc0 ,0x18 ,0x60 ,0x18 ,0x60 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x18 ,0x18 ,0x18 ,
+0x7c ,0x1e ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x0f ,0xe8 ,0x10 ,0x38 ,0x30 ,0x18 ,0x20 ,0x08 ,
+0x20 ,0x08 ,0x20 ,0x00 ,0x30 ,0x00 ,0x38 ,0x00 ,0x1c ,0x00 ,0x0f ,0x80 ,0x03 ,0xe0 ,0x00 ,0xf0 ,
+0x00 ,0x38 ,0x00 ,0x18 ,0x00 ,0x0c ,0x40 ,0x0c ,0x40 ,0x0c ,0x20 ,0x0c ,0x20 ,0x08 ,0x30 ,0x18 ,
+0x3c ,0x70 ,0x03 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x3f ,0xfc ,0x21 ,0x8c ,0x61 ,0x84 ,0x41 ,0x84 ,
+0x41 ,0x82 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x07 ,0xe0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xfc ,0x1e ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,
+0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,
+0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x30 ,0x08 ,0x18 ,0x10 ,
+0x0e ,0x60 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xfc ,0x3e ,0x30 ,0x08 ,0x30 ,0x08 ,0x18 ,0x08 ,
+0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x0c ,0x10 ,0x0c ,0x20 ,0x0c ,0x20 ,0x0c ,0x20 ,0x06 ,0x40 ,
+0x06 ,0x40 ,0x06 ,0x40 ,0x06 ,0x40 ,0x03 ,0x80 ,0x03 ,0x80 ,0x03 ,0x80 ,0x03 ,0x80 ,0x01 ,0x00 ,
+0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xfb ,0xcf ,0x61 ,0x84 ,0x61 ,0x84 ,0x21 ,0x84 ,
+0x31 ,0x84 ,0x31 ,0x84 ,0x31 ,0xc8 ,0x31 ,0xc8 ,0x31 ,0xc8 ,0x12 ,0xc8 ,0x12 ,0xc8 ,0x1a ,0x50 ,
+0x1a ,0x50 ,0x1a ,0x70 ,0x1c ,0x70 ,0x1c ,0x70 ,0x0c ,0x70 ,0x0c ,0x60 ,0x0c ,0x20 ,0x0c ,0x20 ,
+0x08 ,0x20 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7c ,0x3e ,0x18 ,0x18 ,0x18 ,0x10 ,0x0c ,0x10 ,
+0x0c ,0x20 ,0x06 ,0x20 ,0x06 ,0x40 ,0x02 ,0x40 ,0x03 ,0x80 ,0x03 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x02 ,0xc0 ,0x02 ,0xc0 ,0x04 ,0x60 ,0x04 ,0x60 ,0x0c ,0x30 ,0x08 ,0x30 ,0x08 ,0x18 ,0x10 ,0x18 ,
+0x78 ,0x3e ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7c ,0x3e ,0x30 ,0x08 ,0x18 ,0x08 ,0x18 ,0x10 ,
+0x18 ,0x10 ,0x0c ,0x20 ,0x0c ,0x20 ,0x06 ,0x20 ,0x06 ,0x40 ,0x06 ,0x40 ,0x03 ,0x40 ,0x03 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x07 ,0xe0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x1f ,0xfc ,0x18 ,0x0c ,0x30 ,0x18 ,0x20 ,0x18 ,
+0x00 ,0x30 ,0x00 ,0x70 ,0x00 ,0x60 ,0x00 ,0xe0 ,0x00 ,0xc0 ,0x01 ,0x80 ,0x01 ,0x80 ,0x03 ,0x00 ,
+0x03 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,0x0c ,0x00 ,0x0c ,0x00 ,0x18 ,0x04 ,0x18 ,0x04 ,0x30 ,0x0c ,
+0x7f ,0xf8 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x03 ,0xfc ,0x03 ,0xfc ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,
+0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,
+0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,
+0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x03 ,0xfc ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x10 ,0x00 ,0x10 ,0x00 ,0x18 ,0x00 ,0x08 ,0x00 ,0x0c ,0x00 ,
+0x04 ,0x00 ,0x04 ,0x00 ,0x06 ,0x00 ,0x02 ,0x00 ,0x03 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x80 ,
+0x00 ,0x80 ,0x00 ,0xc0 ,0x00 ,0x40 ,0x00 ,0x40 ,0x00 ,0x60 ,0x00 ,0x20 ,0x00 ,0x30 ,0x00 ,0x10 ,
+0x00 ,0x10 ,0x00 ,0x18 ,0x00 ,0x08 ,0x00 ,0x0c ,0x00 ,0x04 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x3f ,0xc0 ,0x3f ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,
+0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,
+0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,
+0x00 ,0xc0 ,0x00 ,0xc0 ,0x00 ,0xc0 ,0x3f ,0xc0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x03 ,0xc0 ,0x06 ,0xe0 ,0x0c ,0x20 ,0x00 ,0x10 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xff ,0xff ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x1e ,0x00 ,0x07 ,0x00 ,0x01 ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x07 ,0xc0 ,0x18 ,0x30 ,0x30 ,0x10 ,0x30 ,0x18 ,0x00 ,0x18 ,
+0x00 ,0x78 ,0x07 ,0x98 ,0x18 ,0x18 ,0x30 ,0x18 ,0x70 ,0x18 ,0x60 ,0x18 ,0x60 ,0x18 ,0x30 ,0x3a ,
+0x1f ,0xde ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x10 ,0x00 ,0x70 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,
+0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x31 ,0xc0 ,0x32 ,0x30 ,0x34 ,0x18 ,0x38 ,0x0c ,0x38 ,0x0c ,
+0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x18 ,0x38 ,0x18 ,
+0x37 ,0xf0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0xe0 ,0x0c ,0x30 ,0x18 ,0x18 ,0x18 ,0x18 ,0x30 ,0x18 ,
+0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x04 ,0x18 ,0x08 ,0x18 ,0x08 ,
+0x0f ,0x70 ,0x00 ,0xc0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x08 ,0x00 ,0x78 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,
+0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x03 ,0x98 ,0x0e ,0x78 ,0x18 ,0x18 ,0x18 ,0x18 ,0x30 ,0x18 ,
+0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x10 ,0x18 ,0x18 ,0x38 ,
+0x0f ,0xde ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0xc0 ,0x0c ,0x30 ,0x18 ,0x18 ,0x10 ,0x18 ,0x30 ,0x0c ,
+0x30 ,0x0c ,0x30 ,0x0c ,0x3f ,0xf0 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x18 ,0x08 ,0x18 ,0x08 ,
+0x07 ,0x70 ,0x00 ,0xc0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xf8 ,0x01 ,0x06 ,0x03 ,0x06 ,0x02 ,0x04 ,
+0x02 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,0x3f ,0xf8 ,0x06 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,
+0x06 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,0x06 ,0x00 ,
+0x1f ,0xe0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x8e ,0x0c ,0x76 ,0x18 ,0x30 ,0x10 ,0x10 ,0x10 ,0x10 ,
+0x10 ,0x10 ,0x18 ,0x10 ,0x08 ,0x30 ,0x0e ,0xe0 ,0x11 ,0x00 ,0x10 ,0x00 ,0x1f ,0x80 ,0x0f ,0xf8 ,
+0x10 ,0x3c ,0x20 ,0x0c ,0x20 ,0x0c ,0x20 ,0x0c ,0x10 ,0x18 ,0x0f ,0xf0 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x10 ,0x00 ,0x70 ,0x00 ,0x10 ,0x00 ,0x10 ,0x00 ,0x10 ,0x00 ,
+0x10 ,0x00 ,0x10 ,0x00 ,0x10 ,0x00 ,0x11 ,0xe0 ,0x17 ,0x30 ,0x1c ,0x18 ,0x18 ,0x18 ,0x10 ,0x18 ,
+0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,
+0x7c ,0x3c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,0x03 ,0xc0 ,0x01 ,0x80 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x80 ,0x1f ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x0f ,0xf0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x38 ,0x00 ,0x38 ,0x00 ,0x30 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0xf0 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,
+0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,
+0x00 ,0x30 ,0x00 ,0x30 ,0x00 ,0x30 ,0x38 ,0x20 ,0x18 ,0x60 ,0x0f ,0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x08 ,0x00 ,0x78 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,
+0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x7c ,0x18 ,0x30 ,0x18 ,0x60 ,0x18 ,0x40 ,0x18 ,0x80 ,
+0x19 ,0x00 ,0x1b ,0x80 ,0x1c ,0xc0 ,0x18 ,0xc0 ,0x18 ,0x60 ,0x18 ,0x70 ,0x18 ,0x30 ,0x18 ,0x18 ,
+0x7c ,0x3c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x80 ,0x1f ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x1f ,0xf0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xe7 ,0x38 ,0x69 ,0xcc ,0x71 ,0x84 ,0x61 ,0x86 ,0x61 ,0x86 ,
+0x61 ,0x86 ,0x61 ,0x86 ,0x61 ,0x86 ,0x61 ,0x86 ,0x61 ,0x86 ,0x61 ,0x86 ,0x61 ,0x86 ,0x61 ,0x86 ,
+0x73 ,0xce ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x71 ,0xe0 ,0x12 ,0x30 ,0x1c ,0x18 ,0x18 ,0x18 ,0x10 ,0x18 ,
+0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,
+0x7c ,0x3c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0xc0 ,0x0c ,0x30 ,0x18 ,0x18 ,0x30 ,0x08 ,0x30 ,0x0c ,
+0x30 ,0x0c ,0x60 ,0x0c ,0x60 ,0x0c ,0x60 ,0x0c ,0x30 ,0x0c ,0x30 ,0x0c ,0x30 ,0x08 ,0x18 ,0x18 ,
+0x0c ,0x20 ,0x03 ,0xc0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x71 ,0xc0 ,0x36 ,0x30 ,0x14 ,0x18 ,0x18 ,0x0c ,0x10 ,0x0c ,
+0x10 ,0x0c ,0x10 ,0x0c ,0x10 ,0x0c ,0x10 ,0x0c ,0x10 ,0x0c ,0x10 ,0x0c ,0x18 ,0x18 ,0x18 ,0x18 ,
+0x16 ,0x70 ,0x11 ,0x80 ,0x10 ,0x00 ,0x10 ,0x00 ,0x10 ,0x00 ,0x7e ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x88 ,0x0c ,0x68 ,0x18 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,
+0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x18 ,0x38 ,
+0x0f ,0xd8 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x18 ,0x00 ,0x7e ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7c ,0x38 ,0x0c ,0x4c ,0x0c ,0x8c ,0x0d ,0x00 ,0x0e ,0x00 ,
+0x0c ,0x00 ,0x0c ,0x00 ,0x0c ,0x00 ,0x0c ,0x00 ,0x0c ,0x00 ,0x0c ,0x00 ,0x0c ,0x00 ,0x0c ,0x00 ,
+0x7f ,0xc0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0xc8 ,0x0c ,0x38 ,0x18 ,0x18 ,0x18 ,0x08 ,0x18 ,0x00 ,
+0x1c ,0x00 ,0x0f ,0x80 ,0x01 ,0xe0 ,0x00 ,0x78 ,0x00 ,0x18 ,0x10 ,0x0c ,0x10 ,0x08 ,0x18 ,0x08 ,
+0x1f ,0xf0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,
+0x02 ,0x00 ,0x02 ,0x00 ,0x06 ,0x00 ,0x3f ,0xf0 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,
+0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x00 ,0x02 ,0x04 ,0x02 ,0x08 ,0x03 ,0x08 ,
+0x01 ,0xf0 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x70 ,0x78 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,
+0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x30 ,0x18 ,0x10 ,0x18 ,0x10 ,0x18 ,0x18 ,0x38 ,
+0x0f ,0xde ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7c ,0x3e ,0x18 ,0x18 ,0x18 ,0x10 ,0x18 ,0x10 ,0x0c ,0x10 ,
+0x0c ,0x20 ,0x0c ,0x20 ,0x06 ,0x20 ,0x06 ,0x40 ,0x02 ,0x40 ,0x03 ,0x80 ,0x03 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xfb ,0xdf ,0x61 ,0x84 ,0x21 ,0x84 ,0x31 ,0x84 ,0x31 ,0x88 ,
+0x31 ,0xc8 ,0x12 ,0xc8 ,0x12 ,0xc8 ,0x1a ,0x50 ,0x1a ,0x50 ,0x0c ,0x70 ,0x0c ,0x70 ,0x0c ,0x20 ,
+0x0c ,0x20 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x3e ,0x7c ,0x1c ,0x10 ,0x0c ,0x30 ,0x06 ,0x20 ,0x06 ,0x40 ,
+0x03 ,0xc0 ,0x01 ,0x80 ,0x01 ,0x80 ,0x03 ,0xc0 ,0x02 ,0x40 ,0x04 ,0x60 ,0x08 ,0x30 ,0x08 ,0x30 ,
+0x78 ,0x7c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x7e ,0x7e ,0x18 ,0x18 ,0x18 ,0x10 ,0x0c ,0x10 ,0x0c ,0x30 ,
+0x0c ,0x20 ,0x06 ,0x20 ,0x06 ,0x60 ,0x02 ,0x40 ,0x03 ,0x40 ,0x03 ,0x80 ,0x01 ,0x80 ,0x01 ,0x80 ,
+0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x02 ,0x00 ,0x3e ,0x00 ,0x1c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x1f ,0xf8 ,0x38 ,0x30 ,0x30 ,0x30 ,0x20 ,0x60 ,0x20 ,0xc0 ,
+0x00 ,0xc0 ,0x01 ,0x80 ,0x03 ,0x00 ,0x03 ,0x00 ,0x06 ,0x04 ,0x0c ,0x08 ,0x0c ,0x08 ,0x18 ,0x08 ,
+0x3f ,0xf8 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x0c ,0x00 ,0x30 ,0x00 ,0x20 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,
+0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x40 ,0x00 ,0x40 ,0x00 ,0xc0 ,0x01 ,0x00 ,0x00 ,0xc0 ,
+0x00 ,0x40 ,0x00 ,0x40 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,0x00 ,0x60 ,
+0x00 ,0x60 ,0x00 ,0x20 ,0x00 ,0x20 ,0x00 ,0x38 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,
+0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,
+0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,
+0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x30 ,0x00 ,0x0c ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,
+0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x06 ,0x00 ,0x03 ,0x00 ,0x00 ,0x80 ,0x03 ,0x00 ,
+0x06 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,
+0x04 ,0x00 ,0x04 ,0x00 ,0x04 ,0x00 ,0x18 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x23 ,0x02 ,0x41 ,0x82 ,0x40 ,0xc4 ,0x00 ,0x6c ,0x00 ,0x30 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
+0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libcodec.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libcodec.so
new file mode 100755
index 0000000000000000000000000000000000000000..dd1aaad57f88f01856a9cedf6d05d55d9054d345
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libcodec.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libhiaacdec.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libhiaacdec.so
new file mode 100755
index 0000000000000000000000000000000000000000..f15426e8a9323e3328e07a8f572d3ba6f7757c1c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libhiaacdec.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_adec_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_adec_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..928d26137eec783a16a5c79bee0f5a574f0ce75d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_adec_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_aenc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_aenc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..3d4e246b8f96c4d594daaf8033475b691c8608a5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_aenc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_vdec_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_vdec_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..ee989ee1d5e284b1cf7a6de2d8aa45ff5a7db3da
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_vdec_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_venc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_venc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..c4fc2f862638d4929c44d90b17a9b01bb2805f13
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_small/libs/libplugin_venc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libcodec.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libcodec.so
new file mode 100755
index 0000000000000000000000000000000000000000..8205d7e21b23c7fd9719c7b5d8c63b4f01ff52f4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libcodec.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libhiaacdec.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libhiaacdec.so
new file mode 100755
index 0000000000000000000000000000000000000000..324c5c31b7e40fc7f0155dd4bbbded4561c60aa2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libhiaacdec.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_adec_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_adec_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..55a7890548cb43eaf9afd4d40871801b7d80f685
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_adec_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_aenc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_aenc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..5607ef8f345ed474c2f5dc19095bad31e8b37d9f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_aenc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_vdec_3516D.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_vdec_3516D.so
new file mode 100755
index 0000000000000000000000000000000000000000..c9118a6ad825b1dd8b1b38af6ea09b9b22b978b1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_vdec_3516D.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_venc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_venc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..e48369323f4569eb443e6e6f55ed7eea029d96d0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/linux_standard/libs/libplugin_venc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libcodec.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libcodec.so
new file mode 100755
index 0000000000000000000000000000000000000000..f98926bb7121c24d7ba08b0a74223df9df8e19dc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libcodec.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libhiaacdec.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libhiaacdec.so
new file mode 100755
index 0000000000000000000000000000000000000000..8753f2ff872cde1fca249a69c667b58727c7491a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libhiaacdec.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_adec_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_adec_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..cd61c8673201b5e7fff63f985fbdce7b1530cd09
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_adec_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_aenc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_aenc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..58173c032d5f69c2f2171ead4843842c99e57086
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_aenc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_vdec_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_vdec_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..d41433ffd302e9cec8f4d5069d2feb6c8dac5f9f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_vdec_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_venc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_venc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..c4e145bf6ac166b07a7d25c4e00f3bf3d2c0bd93
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3516dv300/liteos_a/libs/libplugin_venc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libcodec.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libcodec.so
new file mode 100755
index 0000000000000000000000000000000000000000..f98926bb7121c24d7ba08b0a74223df9df8e19dc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libcodec.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libhiaacdec.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libhiaacdec.so
new file mode 100755
index 0000000000000000000000000000000000000000..8753f2ff872cde1fca249a69c667b58727c7491a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libhiaacdec.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libplugin_adec_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libplugin_adec_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..cd61c8673201b5e7fff63f985fbdce7b1530cd09
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libplugin_adec_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libplugin_aenc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libplugin_aenc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..58173c032d5f69c2f2171ead4843842c99e57086
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libplugin_aenc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libplugin_venc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libplugin_venc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..ed00d39a5691d4661225baa023aedb93d441f89a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/hi3518ev300/liteos_a/libs/libplugin_venc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libcodec.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libcodec.a
new file mode 100755
index 0000000000000000000000000000000000000000..770ef7a283266c98e47973ee2c1d1deb9fd0f82f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libcodec.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libcodec.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libcodec.so
new file mode 100755
index 0000000000000000000000000000000000000000..806250dffe3cc06f8cbab22e194b7386a14495b7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libcodec.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_aenc_35xx.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_aenc_35xx.a
new file mode 100755
index 0000000000000000000000000000000000000000..5bd5983413d488e7111e20834d8b13865af6c9eb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_aenc_35xx.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_aenc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_aenc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..ea5f1a69b4e20b75d48bf62241ef1d6190164dc0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_aenc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_venc_35xx.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_venc_35xx.a
new file mode 100755
index 0000000000000000000000000000000000000000..1d0996733bfa09979b0fc5a5e50e781bf2fcaf21
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_venc_35xx.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_venc_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_venc_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..a81a5e50fef7781319c2138aacf86d0dde4ecdea
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/libs/hispark_ss928v100/llvm/linux/libs/libplugin_venc_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..23ee5371ed27b15cd5ecc62275d7beb1fb20d900
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/Makefile
@@ -0,0 +1,73 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+#===============================================================================
+# common deps
+#===============================================================================
+
+#===============================================================================
+# component deps
+#===============================================================================
+COMM_INC_DIR := $(MIDDLEWARE_DIR)/common/include
+
+#===============================================================================
+# self deps
+#===============================================================================
+CODEC_INCLUDE := $(LOCAL_DIR)/include
+
+INC_ROOT := $(LOCAL_DIR)
+INC_PATH := $(sort $(dir $(shell find $(INC_ROOT) -name '*.h')))
+
+SRC_DEPS_INC_PATH := $(foreach dir, $(INC_PATH), -I$(dir))
+SRC_DEPS_INC_PATH += -I$(CODEC_INCLUDE)\
+ -I$(MPP_INC_PATH)\
+ -I$(MEDIA_HAL_COMMN_INC_PATH)\
+ -I$(COMM_INC_DIR)\
+ -I$(CODEC_INTERFACE_PATH)\
+ -I$(BASE_INTERFACE_PATH)\
+ -I$(DISPLAY_INTERFACE_PATH)
+
+SRC_ROOT := $(LOCAL_DIR)/src
+OBJ_ROOT := $(SRC_ROOT)/obj
+TRAGET_ROOT := $(LOCAL_DIR)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+SRCS := $(shell find $(SRC_ROOT) -type f -name '*.c' -print)
+SRCS := $(sort $(SRCS))
+OBJS := $(SRCS:%.c=%.o)
+OBJS := $(sort $(OBJS))
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+CFLAGS_CUR := -fdata-sections -fno-omit-frame-pointer
+
+LDFLAGS_SO := $(LDFLAGS)
+
+SRC_DEPS_LIB += -lmedia_hal_common -lsecurec -lpthread -ldl -lm
+SRC_DEPS_LIB_PATH += -L$(SECUREC_LIB_PATH) -L$(MEDIA_HAL_COMMN_LIB_PATH)
+
+LIB_SO := $(TRAGET_ROOT)/libcodec.so
+LIB_A := $(TRAGET_ROOT)/libcodec.a
+
+.PHONY : clean all
+
+all: $(LIB_SO) $(LIB_A) plugin
+ @-rm -f $(OBJS)
+
+$(LIB_A): $(OBJS)
+ $(AR) -rcv $@ $^
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS) $(CFLAGS_CUR) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ $(STRIP) $(LIB_SO)
+
+
+$(OBJS): %.o : %.c
+ @$(CC) $(CFLAGS_SO) $(CFLAGS) $(CFLAGS_CUR) $(LFLAGS) $(SRC_DEPS_INC_PATH) -c $< -o $@
+ @mkdir -p lib
+
+plugin:
+ @pushd $(LOCAL_DIR);cd plugins;make || exit "$$?";popd
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
+ @-pushd $(LOCAL_DIR);cd plugins;make clean;popd
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..020059421c4613526c2e4101bf3ecab3c47e92f1
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/Makefile
@@ -0,0 +1,29 @@
+LOCAL_DIR := $(shell pwd)
+
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../..
+include $(MEDIA_BASE_DIR)/build/cfg.mak
+
+COMPILE_ROOT := $(LOCAL_DIR)
+
+MODNAME :=
+MODNAME += $(shell test -d aac && echo aac)
+MODNAME += $(shell test -d audio_encoder && echo audio_encoder)
+MODNAME += $(shell test -d video_encoder && echo video_encoder)
+
+SUBDIRS =$(MODNAME)
+
+.PHONY: all clean
+
+all:
+ for MOD in $(MODNAME);do\
+ pushd $(LOCAL_DIR);cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) || exit "$$?"; popd ;done
+#all: subdirs
+
+#subdirs: $(SUBDIRS)
+#$(SUBDIRS):
+ #$(MAKE) $(MFLAGS) -C $(COMPILE_ROOT)/$@
+
+clean:
+ @for MOD in $(MODNAME);do\
+ pushd $(LOCAL_DIR);cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) clean; popd ;done
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..fdef4b2e0bcb27f9b27a135c0f1a5084c67a6e3d
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/Makefile
@@ -0,0 +1,19 @@
+LOCAL_DIR := $(shell pwd)
+
+COMPILE_ROOT := $(LOCAL_DIR)
+
+MODNAME :=
+MODNAME += $(shell test -d hi35xx && echo hi35xx)
+
+SUBDIRS =$(MODNAME)
+
+.PHONY: all clean
+
+all:
+ for MOD in $(MODNAME);do\
+ pushd $(LOCAL_DIR);cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) || exit "$$?"; popd ;done
+
+clean:
+ @for MOD in $(MODNAME);do\
+ pushd $(LOCAL_DIR);cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) clean; popd ;done
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..4b59ee6133d10cbda985169cc3f70be7d16e7302
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/Makefile
@@ -0,0 +1,77 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../../../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+#===============================================================================
+# common deps
+#===============================================================================
+
+#===============================================================================
+# component deps
+#===============================================================================
+COMM_INC_DIR := $(MIDDLEWARE_DIR)/common/include
+
+#===============================================================================
+# self deps
+#===============================================================================
+CODEC_DIR := $(LOCAL_DIR)/../../../
+CODEC_INCLUDE := $(CODEC_DIR)/include
+
+INC_ROOT := $(LOCAL_DIR)
+INC_PATH := $(sort $(dir $(shell find $(INC_ROOT) -name '*.h')))
+
+SRC_DEPS_INC_PATH := $(foreach dir, $(INC_PATH), -I$(dir))
+SRC_DEPS_INC_PATH += -I$(CODEC_INCLUDE)\
+ -I$(MPP_INC_PATH)\
+ -I$(MEDIA_HAL_COMMN_INC_PATH)\
+ -I$(COMM_INC_DIR)\
+ -I$(CODEC_DIR)/src/pluginManager/codec_plugin_base \
+ -I$(CODEC_DIR)/src/common\
+ -I$(CODEC_INTERFACE_PATH)
+
+SRC_ROOT := $(LOCAL_DIR)/
+OBJ_ROOT := $(SRC_ROOT)/obj
+TRAGET_ROOT := $(CODEC_DIR)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+SRCS := $(shell find $(SRC_ROOT) -type f -name '*.c' -print)
+SRCS := $(sort $(SRCS))
+OBJS := $(SRCS:%.c=%.o)
+OBJS := $(sort $(OBJS))
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+CFLAGS_CUR := $(CFLAGS) -fdata-sections -fno-omit-frame-pointer
+LDFLAGS_SO := $(LDFLAGS)
+
+ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+CFLAGS_CUR += -D__SS626V100__
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi -lss_dnvqe -lss_upvqe -laac_enc -laac_comm -lss_voice_engine -lsecurec -lpthread -ldl -lm
+else
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi -lss_mpi_audio -lss_mpi_sysbind -ldnvqe -lupvqe -laac_enc -laac_comm -lvoice_engine -lsecurec -lpthread -ldl -lm
+endif
+
+SRC_DEPS_LIB_PATH += -L$(MPP_LIB_PATH)\
+ -L$(SECUREC_LIB_PATH)\
+ -L$(MEDIA_HAL_COMMN_LIB_PATH)
+
+LIB_SO := $(TRAGET_ROOT)/libplugin_aenc_35xx.so
+LIB_A := $(TRAGET_ROOT)/libplugin_aenc_35xx.a
+
+.PHONY : clean all
+
+all: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+
+$(LIB_A): $(OBJS)
+ $(AR) -rcv $@ $^
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS_CUR) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ $(STRIP) $(LIB_SO)
+
+
+$(OBJS): %.o : %.c
+ @$(CC) $(CFLAGS_SO) $(CFLAGS_CUR) $(LFLAGS) $(SRC_DEPS_INC_PATH) -c $< -o $@
+ @mkdir -p lib
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/audio_aac_intf.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/audio_aac_intf.c
new file mode 100755
index 0000000000000000000000000000000000000000..64e9db067bdf6bc49c6eeb48d93e6f7684135a95
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/audio_aac_intf.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/audio_aac_intf.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/audio_aac_intf.h
new file mode 100755
index 0000000000000000000000000000000000000000..4c73a534afd863b243a3d14a3d76cdae25911c5a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/audio_aac_intf.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/native_aenc.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/native_aenc.c
new file mode 100755
index 0000000000000000000000000000000000000000..c4d42d42ff6275941b2704bee0ab21367ca75bed
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/audio_encoder/hi35xx/native_aenc.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/video_encoder/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/video_encoder/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..fdef4b2e0bcb27f9b27a135c0f1a5084c67a6e3d
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/video_encoder/Makefile
@@ -0,0 +1,19 @@
+LOCAL_DIR := $(shell pwd)
+
+COMPILE_ROOT := $(LOCAL_DIR)
+
+MODNAME :=
+MODNAME += $(shell test -d hi35xx && echo hi35xx)
+
+SUBDIRS =$(MODNAME)
+
+.PHONY: all clean
+
+all:
+ for MOD in $(MODNAME);do\
+ pushd $(LOCAL_DIR);cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) || exit "$$?"; popd ;done
+
+clean:
+ @for MOD in $(MODNAME);do\
+ pushd $(LOCAL_DIR);cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) clean; popd ;done
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/video_encoder/hi35xx/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/video_encoder/hi35xx/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..0abef9ede42c3db89690fd9831bd4d63a9f7c85a
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/video_encoder/hi35xx/Makefile
@@ -0,0 +1,80 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../../../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+#===============================================================================
+# self deps
+#===============================================================================
+CODEC_DIR := $(LOCAL_DIR)/../../../
+CODEC_INCLUDE := $(CODEC_DIR)/include
+
+INC_ROOT := $(LOCAL_DIR)
+INC_PATH := $(sort $(dir $(shell find $(INC_ROOT) -name '*.h')))
+
+SRC_DEPS_INC_PATH := $(foreach dir, $(INC_PATH), -I$(dir))
+SRC_DEPS_INC_PATH += -I$(CODEC_INCLUDE)\
+ -I$(MPP_INC_PATH)\
+ -I$(MEDIA_HAL_COMMN_INC_PATH)\
+ -I$(MIDDLEWARE_COMMON_INC_DIR)\
+ -I$(CODEC_DIR)/src/pluginManager/codec_plugin_base \
+ -I$(CODEC_DIR)/src/common\
+ -I$(CODEC_INTERFACE_PATH)
+
+SRC_ROOT := $(LOCAL_DIR)/
+OBJ_ROOT := $(SRC_ROOT)/obj
+TRAGET_ROOT := $(CODEC_DIR)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+SRCS := $(shell find $(SRC_ROOT) -type f -name '*.c' -print)
+SRCS := $(sort $(SRCS))
+OBJS := $(SRCS:%.c=%.o)
+OBJS := $(sort $(OBJS))
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+#--------------------------------------
+# enable distributed low delay
+# To enable low delay for distributed cameras, add the macro after the CFLAGS_CUR variable.
+# -DENABLE_DISTRIBUTED_CAMERA_LOW_DELAY
+#--------------------------------------
+CFLAGS_CUR := $(CFLAGS) -fdata-sections -fno-omit-frame-pointer
+
+LDFLAGS_SO := $(LDFLAGS)
+
+ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+CFLAGS_CUR += -D__SS626V100__
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi -lss_dnvqe -lss_upvqe -lss_voice_engine -lsecurec -lpthread -ldl -lm
+else
+SRC_DEPS_LIB += -lmedia_hal_common -lss_mpi -lss_mpi_sysbind -ldnvqe -lupvqe -lvoice_engine -lsecurec -lpthread -ldl -lm
+endif
+
+SRC_DEPS_LIB_PATH += -L$(MPP_LIB_PATH) -L$(SECUREC_LIB_PATH) -L$(MEDIA_HAL_COMMN_LIB_PATH)
+ifeq ($(CFG_OS_TYPE),OHOS)
+SRC_DEPS_LIB_PATH += -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_liteos \
+ -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_liteos/usr/lib
+else
+SRC_DEPS_LIB_PATH += -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux \
+ -L$(OUT_DIR)/$(CFG_CHIP_TYPE)/ipcamera_$(CFG_CHIP_TYPE)_linux/usr/lib
+endif
+
+LIB_SO := $(TRAGET_ROOT)/libplugin_venc_35xx.so
+LIB_A := $(TRAGET_ROOT)/libplugin_venc_35xx.a
+
+.PHONY : clean all
+ @-rm -f $(OBJS)
+
+all: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+
+$(LIB_A): $(OBJS)
+ $(AR) -rcv $@ $^
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS_CUR) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ $(STRIP) $(LIB_SO)
+
+
+$(OBJS): %.o : %.c
+ @$(CC) $(CFLAGS_SO) $(CFLAGS_CUR) $(LFLAGS) $(SRC_DEPS_INC_PATH) -c $< -o $@
+ @mkdir -p lib
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/video_encoder/hi35xx/native_venc.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/video_encoder/hi35xx/native_venc.c
new file mode 100755
index 0000000000000000000000000000000000000000..32edba3b4297f35a1a1d2a64d2db53edaa385dff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/plugins/video_encoder/hi35xx/native_venc.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/buffer_channel/buffer_channel.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/buffer_channel/buffer_channel.c
new file mode 100755
index 0000000000000000000000000000000000000000..33b22f0154e99a527c7d5c1876a157e400427976
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/buffer_channel/buffer_channel.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/buffer_channel/buffer_channel.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/buffer_channel/buffer_channel.h
new file mode 100755
index 0000000000000000000000000000000000000000..9ff676e4657f0fb8d5880bb6f4b2f628ecd95ad1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/buffer_channel/buffer_channel.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/codec_config/codec_config.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/codec_config/codec_config.c
new file mode 100755
index 0000000000000000000000000000000000000000..0691dfb5982fb8d0a563b47eb394f2c48b5a01ce
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/codec_config/codec_config.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/codec_config/codec_config.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/codec_config/codec_config.h
new file mode 100755
index 0000000000000000000000000000000000000000..bfd9958d4511633d99b31564ba9e2bbc49dc0f80
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/codec_config/codec_config.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/codec_v2.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/codec_v2.c
new file mode 100755
index 0000000000000000000000000000000000000000..177403aa429c4e90465b33ce995575328001e2aa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/codec_v2.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/av_list.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/av_list.c
new file mode 100755
index 0000000000000000000000000000000000000000..9d64d0e7958123ca473f9ac6a37686883936e847
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/av_list.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/av_list.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/av_list.h
new file mode 100755
index 0000000000000000000000000000000000000000..d6de1231f6055b582952a1a7c4355768639d4d24
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/av_list.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/codec_common.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/codec_common.c
new file mode 100755
index 0000000000000000000000000000000000000000..b938a64536bb99c9e47cc1e206d07850d36083b2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/codec_common.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/codec_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/codec_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..8e500d680f5f1c5d6f6e28dcf15af00c2ad47386
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/common/codec_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/adec_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/adec_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..84032424a691bd8e45ffba0889a3e1e9c5e381ff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/adec_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/aenc_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/aenc_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..f9ed34afae2950ccf56c2152681b5a7d7a3ad530
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/aenc_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/codec_plugin_base.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/codec_plugin_base.h
new file mode 100755
index 0000000000000000000000000000000000000000..ea6227a323de98a28cfe8c292a4304cdcf7b76c2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/codec_plugin_base.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/vdec_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/vdec_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..6558bb42333e97e6f3dcda5fe3c9408ba9f69db9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/vdec_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/venc_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/venc_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..0b5b75631b108c1e6eafece076044f17ca412ec6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_base/venc_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..9b8209c7002c3882829c7306b1d014198d291008
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..73079034d6bc9122531f6df45910ec11fa235623
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/codec/source/src/pluginManager/codec_plugin_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3516dv300/linux_small/libs/libmedia_hal_common.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3516dv300/linux_small/libs/libmedia_hal_common.so
new file mode 100755
index 0000000000000000000000000000000000000000..431ff503d2ccb8c32ae915d0ae4c9d776b26faba
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3516dv300/linux_small/libs/libmedia_hal_common.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3516dv300/linux_standard/libmedia_hal_common.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3516dv300/linux_standard/libmedia_hal_common.so
new file mode 100755
index 0000000000000000000000000000000000000000..757d1e8b5eb3da1458fcff98cedeb07516e324f5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3516dv300/linux_standard/libmedia_hal_common.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3516dv300/liteos_a/libs/libmedia_hal_common.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3516dv300/liteos_a/libs/libmedia_hal_common.so
new file mode 100755
index 0000000000000000000000000000000000000000..268b2db8ca188e6728c9a91515783807d48f5a52
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3516dv300/liteos_a/libs/libmedia_hal_common.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3518ev300/liteos_a/libs/libmedia_hal_common.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3518ev300/liteos_a/libs/libmedia_hal_common.so
new file mode 100755
index 0000000000000000000000000000000000000000..268b2db8ca188e6728c9a91515783807d48f5a52
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3518ev300/liteos_a/libs/libmedia_hal_common.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3751v350/linux_standard/libs/libmedia_hal_common.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3751v350/linux_standard/libs/libmedia_hal_common.so
new file mode 100755
index 0000000000000000000000000000000000000000..cb09d6b75e04b1383630b2737804ae9b8131eb0e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/hi3751v350/linux_standard/libs/libmedia_hal_common.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/libs/hispark_ss928v100/llvm/linux/libs/libmedia_hal_common.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/libs/hispark_ss928v100/llvm/linux/libs/libmedia_hal_common.a
new file mode 100755
index 0000000000000000000000000000000000000000..9ef9226fbe7a010453f18f78751a6fc75cca891f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/libs/hispark_ss928v100/llvm/linux/libs/libmedia_hal_common.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/libs/hispark_ss928v100/llvm/linux/libs/libmedia_hal_common.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/libs/hispark_ss928v100/llvm/linux/libs/libmedia_hal_common.so
new file mode 100755
index 0000000000000000000000000000000000000000..03303bbc22b98715b09ecfe9d8fb8d1561dc3107
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/libs/hispark_ss928v100/llvm/linux/libs/libmedia_hal_common.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..cd03af9a39a53595c31375b117063395ce65023b
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/Makefile
@@ -0,0 +1,53 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+#===============================================================================
+# common deps
+#===============================================================================
+
+SRC_DEPS_INC_PATH :=-I$(LOCAL_DIR)/include
+SRC_DEPS_INC_PATH += -I$(MPP_INC_PATH)\
+ -I$(SECUREC_INC_PATH)
+
+# target source
+SRCS := src/media_hal_common.c
+SRCS += src/list.c
+ifeq ($(filter $(CFG_CHIP_TYPE),hispark_ss927v100 hispark_ss928v100),$(CFG_CHIP_TYPE))
+SRCS += src/audio_aac_adp.c
+SRCS += src/audio_dl_adp.c
+CFLAGS += -D__SS626V100__
+SRC_DEPS_LIB := -lpthread -ldl -lm -lsecurec -lss_mpi -lot_osal -lot_irq -lss_dnvqe -lss_upvqe -laac_dec -laac_comm -lss_voice_engine -laac_sbr_enc -laac_sbr_dec -lss_otp
+else
+SRC_DEPS_LIB := -lpthread -ldl -lm -lsecurec -lss_mpi_audio -ldnvqe -lupvqe -laac_dec -laac_comm -lvoice_engine -lss_mpi_audio_adp -lopus -laac_sbr_enc -laac_sbr_dec -lmp3_dec -lmp3_enc
+endif
+
+OBJS := $(SRCS:%.c=%.o)
+SRC_DEPS_LIB_PATH += -L$(MPP_LIB_PATH)\
+ -L$(SECUREC_LIB_PATH)
+LDFLAGS_SO := $(LDFLAGS)
+
+TRAGET_ROOT := $(LOCAL_DIR)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+LIB_SO:= $(TRAGET_ROOT)/libmedia_hal_common.so
+LIB_A:= $(TRAGET_ROOT)/libmedia_hal_common.a
+
+.PHONY : clean all
+
+all: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ $(STRIP) $(LIB_SO)
+
+$(LIB_A): $(OBJS)
+ $(AT)$(AR) -rcv $@ $^
+
+$(OBJS): %.o : %.c
+ @$(CC) $(CFLAGS) $(CFLAGS_SO) $(SRC_DEPS_INC_PATH) -c $< -o $@
+ @mkdir -p lib
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO)
+ @-rm -f $(OBJS) $(LIB_A)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/audio_aac_adp.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/audio_aac_adp.h
new file mode 100755
index 0000000000000000000000000000000000000000..7d597e51b5a3eb76b10b4f1e743b55689395fe88
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/audio_aac_adp.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/audio_dl_adp.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/audio_dl_adp.h
new file mode 100755
index 0000000000000000000000000000000000000000..355d3d11aa984b576af4c3866979498bd7f0c8be
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/audio_dl_adp.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/list.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/list.h
new file mode 100755
index 0000000000000000000000000000000000000000..1bd8233e535ba4d908c041583f15931eea981efc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/list.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/media_hal_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/media_hal_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..c8ed177f12828bc296fc0e63791247852a291c67
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/include/media_hal_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/audio_aac_adp.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/audio_aac_adp.c
new file mode 100755
index 0000000000000000000000000000000000000000..9a7553eedb7ad22aceb9b3fc5e325a34334b8774
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/audio_aac_adp.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/audio_dl_adp.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/audio_dl_adp.c
new file mode 100755
index 0000000000000000000000000000000000000000..439b7dce939a3ef4f541e90d5d1d987b9efa7f52
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/audio_dl_adp.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/list.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/list.c
new file mode 100755
index 0000000000000000000000000000000000000000..1361bc4033d35cfc4ca6c5f41a5fae6934910fe3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/list.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/media_hal_common.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/media_hal_common.c
new file mode 100755
index 0000000000000000000000000000000000000000..04618cabe2003a59c7210bb1f0c4ca3c80607dbd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/common/source/src/media_hal_common.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libformat_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libformat_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..5fbd1f4eecfe47509b3593403d9efde58d78d6ed
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libformat_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_demuxer_ffmpeg.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_demuxer_ffmpeg.so
new file mode 100755
index 0000000000000000000000000000000000000000..c6d73a3f3c325dcb11de53cdac1fa161b66b8629
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_demuxer_ffmpeg.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_demuxer_mpf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_demuxer_mpf.so
new file mode 100755
index 0000000000000000000000000000000000000000..11dc00a2ededdfa2ca5c7c7f401e33b4fa26574e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_demuxer_mpf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_demuxer_raw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_demuxer_raw.so
new file mode 100755
index 0000000000000000000000000000000000000000..a637dc0d435ee6c510a661fff1784c94ee4e8e82
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_demuxer_raw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_muxer_recorder.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_muxer_recorder.so
new file mode 100755
index 0000000000000000000000000000000000000000..5308ffa7957f3f1f3ea1202a065c1ad5b1db6b57
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_small/libs/libplugin_muxer_recorder.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libformat_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libformat_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..a7993eac29b6af9f49a120719e757f2190777eba
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libformat_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_demuxer_ffmpeg.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_demuxer_ffmpeg.so
new file mode 100755
index 0000000000000000000000000000000000000000..2b2ecbd0ac42446184896d37ece8b18f52c40046
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_demuxer_ffmpeg.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_demuxer_mpf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_demuxer_mpf.so
new file mode 100755
index 0000000000000000000000000000000000000000..b3f90320f5999338383cb7a11c4f442a9b09e909
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_demuxer_mpf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_demuxer_raw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_demuxer_raw.so
new file mode 100755
index 0000000000000000000000000000000000000000..40143c6b0c58bb5f04e7695c7590ca8d61aeedd1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_demuxer_raw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_muxer_recorder.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_muxer_recorder.so
new file mode 100755
index 0000000000000000000000000000000000000000..644d0aacbb77466a13dffcbc2c2e7b561d47942d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/linux_standard/libs/libplugin_muxer_recorder.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libformat_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libformat_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..a60d4381233a247231af87f5305c3ea1c2eedef8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libformat_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_demuxer_ffmpeg.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_demuxer_ffmpeg.so
new file mode 100755
index 0000000000000000000000000000000000000000..940c18f71da20ebe6924c9835755e065b4981941
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_demuxer_ffmpeg.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_demuxer_mpf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_demuxer_mpf.so
new file mode 100755
index 0000000000000000000000000000000000000000..5b049bdb2808c38333996629c31e9a10c4a390fa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_demuxer_mpf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_demuxer_raw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_demuxer_raw.so
new file mode 100755
index 0000000000000000000000000000000000000000..31ae52ec45ec6a4f04a23bdf29470369bed903cb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_demuxer_raw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_muxer_recorder.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_muxer_recorder.so
new file mode 100755
index 0000000000000000000000000000000000000000..b67f6388a21dfe9e8a283aac57de53ff2449d160
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3516dv300/liteos_a/libs/libplugin_muxer_recorder.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libformat_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libformat_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..a60d4381233a247231af87f5305c3ea1c2eedef8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libformat_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_demuxer_ffmpeg.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_demuxer_ffmpeg.so
new file mode 100755
index 0000000000000000000000000000000000000000..940c18f71da20ebe6924c9835755e065b4981941
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_demuxer_ffmpeg.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_demuxer_mpf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_demuxer_mpf.so
new file mode 100755
index 0000000000000000000000000000000000000000..5b049bdb2808c38333996629c31e9a10c4a390fa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_demuxer_mpf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_demuxer_raw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_demuxer_raw.so
new file mode 100755
index 0000000000000000000000000000000000000000..31ae52ec45ec6a4f04a23bdf29470369bed903cb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_demuxer_raw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_muxer_recorder.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_muxer_recorder.so
new file mode 100755
index 0000000000000000000000000000000000000000..b67f6388a21dfe9e8a283aac57de53ff2449d160
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/hi3518ev300/liteos_a/libs/libplugin_muxer_recorder.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libformat_hw.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libformat_hw.a
new file mode 100755
index 0000000000000000000000000000000000000000..a98018e54c1b3492604828370b588ac5ad3ce7cf
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libformat_hw.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libformat_hw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libformat_hw.so
new file mode 100755
index 0000000000000000000000000000000000000000..828f8bc2f7e9419397fd0add09aede2bafdb013f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libformat_hw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_demuxer_raw.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_demuxer_raw.a
new file mode 100755
index 0000000000000000000000000000000000000000..07cabaf2147e522f7742d1d77a5eb67f19659428
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_demuxer_raw.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_demuxer_raw.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_demuxer_raw.so
new file mode 100755
index 0000000000000000000000000000000000000000..11b84aa4e79532d6da49e75218510a5b3a654d4e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_demuxer_raw.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_m4a.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_m4a.a
new file mode 100755
index 0000000000000000000000000000000000000000..4655b0a9f9fb88c5ddb6ef967b75869f59dbccdd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_m4a.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_m4a.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_m4a.so
new file mode 100755
index 0000000000000000000000000000000000000000..74431c4e13b76c276e71c6821ad898ef5235f5cf
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_m4a.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_recorder.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_recorder.a
new file mode 100755
index 0000000000000000000000000000000000000000..cbe258bd78e62deb6da8d5f3cc49e1206e138c76
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_recorder.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_recorder.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_recorder.so
new file mode 100755
index 0000000000000000000000000000000000000000..cae2e34931872609bf65a1aa554e79959c48aa37
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/libs/hispark_ss928v100/llvm/linux/libs/libplugin_muxer_recorder.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..aeeb7b3fe5cc530668815e446ac38605418c6056
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/Makefile
@@ -0,0 +1,68 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+COMMON_DIR := $(MIDDLEWARE_COMMON_DIR)
+FORMAT_INTERFACE_PATH := $(MEDIA_BASE_DIR)/../../../../../../drivers/peripheral/format/interfaces/include
+SS_DEMUXER_INC_DIR := $(MIDDLEWARE_COMPONENT)/liteplayer/include
+SS_DEMUXER_LIB_DIR := $(MIDDLEWARE_COMPONENT)/liteplayer/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+FILEFORMAT_LIB_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/common/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+
+APP_INC :=
+APP_INC += -I$(MIDDLEWARE_COMMON_INC_DIR) \
+ -I$(SECUREC_INC_PATH) \
+ -I$(MPP_INC_PATH) \
+ -I$(MEDIA_HAL_COMMN_INC_PATH)\
+ -I$(SS_DEMUXER_INC_DIR)\
+ -I$(FORMAT_INTERFACE_PATH)
+
+$(warning "APP_INC: $(APP_INC)")
+
+SRCS := $(sort $(shell find $(LOCAL_DIR)/src -name '*.c' -print))
+$(warning "SRCS: $(SRCS)")
+
+OBJS := $(patsubst %.c,%.o,$(SRCS))
+
+INC_FLAGS += -I$(LOCAL_DIR)/include \
+ -I$(LOCAL_DIR)/src/format_common/include \
+ -I$(LOCAL_DIR)/src/plugins_manager_common/include \
+ -I$(LOCAL_DIR)/src/demuxer_plugins_manager/include \
+ -I$(LOCAL_DIR)/src/muxer_plugins_manager/include \
+ -I$(LOCAL_DIR)/src/protocol_plugins_manager/include \
+ -I$(LOCAL_DIR)/src/muxer_manager/include \
+ -I$(LOCAL_DIR)/src/demuxer_manager/include \
+
+CFLAGS_SO := -L$(MEDIA_HAL_COMMN_LIB_PATH) -L$(SECUREC_LIB_PATH) -L$(SS_DEMUXER_LIB_DIR) -L$(FILEFORMAT_LIB_DIR) -lfileformat -lmedia_hal_common -lpthread -ldl -lm -lsecurec -lplugin_demuxer_hmf -lmpf_demuxer
+LDFLAGS_SO := $(LDFLAGS)
+
+APP_INC += $(INC_FLAGS)
+CFLAGS_CUR := $(CFLAGS) -DENABLE_DEMUXER -DENABLE_MUXER
+
+TRAGET_ROOT := $(LOCAL_DIR)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+LIB_A := $(TRAGET_ROOT)/libformat_hw.a
+LIB_SO := $(TRAGET_ROOT)/libformat_hw.so
+
+.PHONY : all clean
+
+all: format_demuxer
+
+format_demuxer: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS) $(CFLAGS_CUR) $(LFLAGS) -fPIC -shared $(CFLAGS_SO) -o $@ $^
+ $(STRIP) $(LIB_SO)
+
+$(LIB_A): $(OBJS)
+ $(AT)$(AR) -rcv $@ $^
+
+$(OBJS): %.o : %.c
+ $(CC) $(CFLAGS_CUR) $(APP_INC) -c $< -o $@
+ pushd $(LOCAL_DIR);cd $(LOCAL_DIR)/plugins ;$(MAKE) $(MFLAGS) || exit "$$?"; popd ;
+
+clean:
+ pushd $(LOCAL_DIR);cd $(LOCAL_DIR)/plugins ;$(MAKE) clean; popd ;
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
+
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/demuxer_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/demuxer_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..946d2006fbdd27119bfa475cf8e4e6ad116465fe
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/demuxer_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/demuxer_common_err.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/demuxer_common_err.h
new file mode 100755
index 0000000000000000000000000000000000000000..76b3c650f29e373905043a4b68f7870a349c40ca
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/demuxer_common_err.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/demuxer_interface.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/demuxer_interface.h
new file mode 100755
index 0000000000000000000000000000000000000000..9576974c5ea6d745c3554ac7f3cfe8f20d061427
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/demuxer_interface.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/muxer_interface.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/muxer_interface.h
new file mode 100755
index 0000000000000000000000000000000000000000..5757d450ad7d8eac5d76d65f0a97af1eef7e7048
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/muxer_interface.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/plugin_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/plugin_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..31c2e0a02d9bf280acbdffeadc4b107c3988ec92
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/plugin_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/protocol_interface.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/protocol_interface.h
new file mode 100755
index 0000000000000000000000000000000000000000..af756c6128ff523c1af9632c6abf90ebdda330d0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/include/protocol_interface.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..2f300037be6d781ffc04bb65197e553ab64ece58
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/Makefile
@@ -0,0 +1,21 @@
+LOCAL_DIR := $(shell pwd)
+
+COMPILE_ROOT := $(LOCAL_DIR)
+
+MODNAME :=
+MODNAME += $(shell test -d hisi_raw_demuxer && echo hisi_raw_demuxer)
+MODNAME += $(shell test -d hisi_recorder_muxer && echo hisi_recorder_muxer)
+MODNAME += $(shell test -d hisi_m4a_muxer && echo hisi_m4a_muxer)
+
+SUBDIRS =$(MODNAME)
+
+.PHONY: all clean
+
+all:
+ for MOD in $(MODNAME);do\
+ pushd $(LOCAL_DIR);cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) || exit "$$?" ; popd ;done
+
+clean:
+ @for MOD in $(MODNAME);do\
+ pushd $(LOCAL_DIR);cd $(COMPILE_ROOT)/$$MOD ;$(MAKE) $(MFLAGS) clean; popd ;done
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/common/dtcf_manager/dtcf_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/common/dtcf_manager/dtcf_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..b8c7c0351b18350657917a00eabc50c8bdab4765
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/common/dtcf_manager/dtcf_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/common/dtcf_manager/dtcf_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/common/dtcf_manager/dtcf_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..423e6a58b2280bdbf5d959c7d1e0cb23cb977483
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/common/dtcf_manager/dtcf_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_m4a_muxer/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_m4a_muxer/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..e4198c1d8d261da14bc0080cc8e51c0a27fd6507
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_m4a_muxer/Makefile
@@ -0,0 +1,102 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+#===============================================================================
+# common deps
+#===============================================================================
+FORMAT_INC_PATH := $(LOCAL_DIR)/../include
+
+
+#===============================================================================
+# component deps
+#===============================================================================
+REC_INC_DIR := $(MIDDLEWARE_COMPONENT)/recorder_pro/include
+DTCF_LIB_DIR := $(MIDDLEWARE_COMPONENT_DIR)/dtcf/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+DTCF_INC_DIR := $(MIDDLEWARE_COMPONENT_DIR)/dtcf/include
+MP4_LIB_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/mp4/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+MP4_INC_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/mp4/include
+FILEFORMAT_LIB_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/common/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+FILEFORMAT_INC_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/common/include
+OT_TIMER_LIB_DIR := $(MIDDLEWARE_COMMON_DIR)/ottimer/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+FORMAT_INTERFACE_PATH := $(MEDIA_BASE_DIR)/../../../../../../drivers/peripheral/format/interfaces/include
+DTCF_MANAGER_PATH := $(LOCAL_DIR)/../common/dtcf_manager
+UPROC_LIB_DIR := $(MIDDLEWARE_COMMON_DIR)/uproc/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+MWLOG_LIB_DIR := $(MIDDLEWARE_COMMON_DIR)/log/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+SS_DEMUXER_INC_DIR := $(MIDDLEWARE_COMPONENT)/liteplayer/include
+
+#===============================================================================
+# z deps
+#===============================================================================
+RECORDER_INCLUDE := $(LOCAL_DIR)/../hisi_recorder_muxer
+
+SRC_DEPS_INC_PATH := -I$(FORMAT_INC_PATH)
+SRC_DEPS_INC_PATH += -I$(RECORDER_INCLUDE)\
+ -I$(MEDIA_HAL_COMMN_INC_PATH)\
+ -I$(DTCF_INC_DIR)\
+ -I$(SS_DEMUXER_INC_DIR)\
+ -I$(REC_INC_DIR)\
+ -I$(MP4_INC_DIR)\
+ -I$(FILEFORMAT_INC_DIR) \
+ -I$(MIDDLEWARE_COMMON_INC_DIR) \
+ -I$(MPP_INC_PATH) \
+ -I$(LOCAL_DIR)/../../include \
+ -I$(FORMAT_INTERFACE_PATH) \
+ -I$(DTCF_MANAGER_PATH)
+
+$(warning "**********SRC_DEPS_INC_PATH: $(SRC_DEPS_INC_PATH) **********")
+$(warning "**********MEDIA_USR_LIBS_LINK: $(MEDIA_USR_LIBS_LINK) **********")
+$(warning "**********MEDIA_LIBS_PATH_LINK: $(MEDIA_LIBS_PATH_LINK) **********")
+
+SRC_ROOT := $(LOCAL_DIR)
+SRC_ROOT += $(LOCAL_DIR)/../common/dtcf_manager
+OBJ_ROOT := $(SRC_ROOT)/obj
+TRAGET_ROOT := $(LOCAL_DIR)/../../$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+SRCS := $(shell find $(SRC_ROOT) -maxdepth 1 -type f -name '*.c' -print)
+$(warning "**********MEDIA_LIBS_PATH_LINK: $(SRC_ROOT) **********")
+SRCS := $(sort $(SRCS))
+OBJS := $(SRCS:%.c=%.o)
+OBJS := $(sort $(OBJS))
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+CFLAGS += -fdata-sections -fno-omit-frame-pointer
+
+LDFLAGS_SO := $(LDFLAGS)
+
+SRC_DEPS_LIB := -lmp4 -lfileformat -ldtcf -lsecurec -lottimer -lmedia_hal_common -luproc -lmwlog
+
+SRC_DEPS_LIB_PATH += -L$(MEDIA_HAL_COMMN_LIB_PATH) \
+ -L$(RECORDER_INCLUDE)\
+ -L$(DTCF_LIB_DIR) \
+ -L$(FILEFORMAT_LIB_DIR) \
+ -L$(MP4_LIB_DIR)\
+ -L$(OT_TIMER_LIB_DIR) \
+ $(MEDIA_LIBS_PATH_LINK) \
+ -L$(SECUREC_LIB_PATH) \
+ -L$(UPROC_LIB_DIR) \
+ -L$(MWLOG_LIB_DIR)
+CFLAGS_SO := $(CFLAGS)
+
+$(warning "**********CFLAGS_SO: $(CFLAGS_SO) **********")
+
+LIB_SO := $(TRAGET_ROOT)/libplugin_muxer_m4a.so
+LIB_A := $(TRAGET_ROOT)/libplugin_muxer_m4a.a
+
+.PHONY : clean all
+
+all: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+
+$(LIB_A): $(OBJS)
+ $(AR) -rcv $@ $^
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS_SO) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ $(STRIP) $(LIB_SO)
+
+$(OBJS): %.o : %.c
+ $(CC) $(CFLAGS_SO) $(SRC_DEPS_INC_PATH) -c $< -o $@
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_m4a_muxer/m4a_muxer.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_m4a_muxer/m4a_muxer.c
new file mode 100755
index 0000000000000000000000000000000000000000..f4147ca3ca249ea88826f19cccb91aa35cce2557
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_m4a_muxer/m4a_muxer.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_raw_demuxer/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_raw_demuxer/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..7076aa94a8bce798e9d6c7c49e155396c359706e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_raw_demuxer/Makefile
@@ -0,0 +1,100 @@
+#===============================================================================
+# export variable
+#===============================================================================
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+#===============================================================================
+# local variable
+#===============================================================================
+#mod dir
+MOD_ROOT := $(LOCAL_DIR)/../..
+OBJ_ROOT := $(LOCAL_DIR)/obj
+TRAGET_ROOT := $(MOD_ROOT)/$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+SRC_ROOT := $(LOCAL_DIR)
+TASK_DIR := $(LOCAL_DIR)/task
+HAL_FORMAT_DIR := $(LOCAL_DIR)/../..
+#src files
+SRCS := $(shell find $(SRC_ROOT) -type f -name '*.c' -print)
+SRCS := $(sort $(SRCS))
+
+#obj files
+OBJS := $(SRCS:$(SRC_ROOT)%.c=$(OBJ_ROOT)%.o)
+OBJS := $(sort $(OBJS))
+OBJ_DIR := $(dir $(OBJS))
+
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+#include path
+FORMAT_INTERFACE_PATH := $(MEDIA_BASE_DIR)/../../../../../../drivers/peripheral/format/interfaces/include
+
+MEDIA_INCLUDE_PATH += -I$(MIDDLEWARE_COMMON_INC_DIR)
+MEDIA_INCLUDE_PATH += -I$(MPP_INC_PATH)
+MEDIA_INCLUDE_PATH += -I$(SECUREC_INC_PATH)
+MEDIA_INCLUDE_PATH += -I$(HAL_FORMAT_DIR)/include
+MEDIA_INCLUDE_PATH += -I$(MEDIA_HAL_COMMN_INC_PATH)
+MEDIA_INCLUDE_PATH += -I$(FORMAT_INTERFACE_PATH)
+MEDIA_INCLUDE_PATH += -I$(MIDDLEWARE_COMPONENT)/liteplayer/include
+
+# create obj dir $$ target dir
+CreateResult :=
+dummy := $(call CreateDir, $(OBJ_ROOT))
+dummy += $(call CreateDir, $(TRAGET_ROOT))
+dummy += $(foreach dir, $(OBJ_DIR), CreateResult += $(call CreateDir, $(dir)))
+ifneq ($(strip $(CreateResult)),)
+ $(error $(CreateResult))
+endif
+
+MUXER_LIB = -L$(MEDIA_HAL_COMMN_LIB_PATH) -lmedia_hal_common -L$(SECUREC_LIB_PATH) -lsecurec -lm
+$(warning "COMPILER_BASE_PATH-------> $(COMPILER_BASE_PATH)")
+#target
+TARGET_A := $(TRAGET_ROOT)/libplugin_demuxer_raw.a
+TARGET_SO := $(TRAGET_ROOT)/libplugin_demuxer_raw.so
+
+#===============================================================================
+# rules
+#===============================================================================
+COMPILE = $(CC) $(CFLAGS) -c "$<" -o "$@" $(MEDIA_INCLUDE_PATH)
+COMPILEDEP = $(CC) -MM "$<" $(MEDIA_INCLUDE_PATH)
+LINK = $(CC) $(CFLAGS)
+
+.PHONY: all clean install uninstall
+
+all: $(TARGET_A) $(TARGET_SO)
+ rm -rf $(OBJ_ROOT)
+
+$(TARGET_A): $(OBJS)
+ $(AT)$(AR) -rcv $@ $^
+
+$(TARGET_SO): $(OBJS)
+ $(AT)$(CC) $(LDFLAGS) $(LFLAGS) $(CFLAGS) -fPIC -shared -o $@ $^ $(MUXER_LIB)
+ $(STRIP) $(TARGET_SO)
+
+$(OBJS): $(OBJ_ROOT)/%.o :$(SRC_ROOT)/%.c
+ $(AT)$(COMPILE)
+
+$(SRC_DEPS): $(OBJ_ROOT)/%.d : $(SRC_ROOT)/%.c
+ $(AT)set -e;rm -f $@;$(COMPILEDEP) > $@.$$$$; \
+ sed 's,.*\.o[ :]*,$(@:%.d=%.o) $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+-include $(SRC_DEPS)
+
+install: all
+# $(AT)mkdir -p $(OUT_LIB_DIR)
+# $(AT)mkdir -p $(OUT_HEADER_DIR)
+ $(AT)cp -af $(TARGET_A) $(OUT_LIB_DIR)/
+ $(AT)cp -af $(TARGET_SO) $(OUT_LIB_DIR)/
+
+uninstall:
+ $(AT)rm -rf $(OUT_LIB_DIR)/$(notdir $(TARGET_A))
+ $(AT)rm -rf $(OUT_LIB_DIR)/$(notdir $(TARGET_SO))
+
+clean:
+ $(AT)rm -rf $(SRC_DEPS)
+ $(AT)rm -rf $(OBJS)
+ $(AT)rm -rf $(OBJ_ROOT)
+ $(AT)rm -rf $(TARGET_A)
+ $(AT)rm -rf $(TARGET_SO)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_raw_demuxer/hi_buffer_format.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_raw_demuxer/hi_buffer_format.c
new file mode 100755
index 0000000000000000000000000000000000000000..9950a9b73cc298408f7f16aa31412631307daa09
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_raw_demuxer/hi_buffer_format.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_raw_demuxer/hi_buffer_format.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_raw_demuxer/hi_buffer_format.h
new file mode 100755
index 0000000000000000000000000000000000000000..7ec127ee4599c9b4f9389a848ac9d97633085161
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_raw_demuxer/hi_buffer_format.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..c8076ed010920841d2e3d98b44ced017e3f72176
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/Makefile
@@ -0,0 +1,107 @@
+LOCAL_DIR := $(shell pwd)
+MEDIA_BASE_DIR := $(LOCAL_DIR)/../../../..
+include $(MEDIA_BASE_DIR)/build/base.mak
+
+#===============================================================================
+# common deps
+#===============================================================================
+FORMAT_INC_PATH := $(LOCAL_DIR)/../include
+
+#===============================================================================
+# component deps
+#===============================================================================
+REC_LIB_DIR := $(MIDDLEWARE_COMPONENT)/recorder_pro/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+REC_INC_DIR := $(MIDDLEWARE_COMPONENT)/recorder_pro/include
+DTCF_LIB_DIR := $(MIDDLEWARE_COMPONENT_DIR)/dtcf/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+DTCF_INC_DIR := $(MIDDLEWARE_COMPONENT_DIR)/dtcf/include
+MP4_LIB_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/mp4/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+MP4_INC_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/mp4/include
+TS_LIB_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/ts/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+TS_INC_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/ts/include
+FILEFORMAT_LIB_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/common/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+FILEFORMAT_INC_DIR := $(MIDDLEWARE_COMPONENT)/fileformat/common/include
+OT_TIMER_LIB_DIR := $(MIDDLEWARE_COMMON_DIR)/ottimer/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+UPROC_LIB_DIR := $(MIDDLEWARE_COMMON_DIR)/uproc/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+FORMAT_INTERFACE_PATH := $(MEDIA_BASE_DIR)/../../../../../../drivers/peripheral/format/interfaces/include
+DTCF_MANAGER_PATH := $(LOCAL_DIR)/../common/dtcf_manager
+MWLOG_LIB_DIR := $(MIDDLEWARE_COMMON_DIR)/log/lib/$(SOURCE_CHIP_TYPE)/$(CFG_COMPILE_TYPE)
+SS_DEMUXER_INC_DIR := $(MIDDLEWARE_COMPONENT)/liteplayer/include
+
+#===============================================================================
+# z deps
+#===============================================================================
+RECORDER_INCLUDE := $(LOCAL_DIR)/include
+
+SRC_DEPS_INC_PATH := -I$(FORMAT_INC_PATH)
+SRC_DEPS_INC_PATH += -I$(RECORDER_INCLUDE)\
+ -I$(MEDIA_HAL_COMMN_INC_PATH)\
+ -I$(SS_DEMUXER_INC_DIR)\
+ -I$(DTCF_INC_DIR)\
+ -I$(REC_INC_DIR)\
+ -I$(MP4_INC_DIR)\
+ -I$(TS_INC_DIR) \
+ -I$(FILEFORMAT_INC_DIR) \
+ -I$(MIDDLEWARE_COMMON_INC_DIR) \
+ -I$(MPP_INC_PATH) \
+ -I$(LOCAL_DIR)/../../include \
+ -I$(FORMAT_INTERFACE_PATH) \
+ -I$(DTCF_MANAGER_PATH)
+
+$(warning "**********SRC_DEPS_INC_PATH: $(SRC_DEPS_INC_PATH) **********")
+$(warning "**********MEDIA_USR_LIBS_LINK: $(MEDIA_USR_LIBS_LINK) **********")
+$(warning "**********MEDIA_LIBS_PATH_LINK: $(MEDIA_LIBS_PATH_LINK) **********")
+
+SRC_ROOT := $(LOCAL_DIR)
+SRC_ROOT += $(LOCAL_DIR)/../common/dtcf_manager
+OBJ_ROOT := $(SRC_ROOT)/obj
+TRAGET_ROOT := $(LOCAL_DIR)/../../$(TARGET_DIR)
+$(shell if [ ! -e $(TRAGET_ROOT) ]; then mkdir -p $(TRAGET_ROOT); fi)
+
+SRCS := $(shell find $(SRC_ROOT) -maxdepth 1 -type f -name '*.c' -print)
+SRCS := $(sort $(SRCS))
+OBJS := $(SRCS:%.c=%.o)
+OBJS := $(sort $(OBJS))
+SRC_DEPS := $(OBJS:%.o=%.d)
+
+CFLAGS += -fdata-sections -fno-omit-frame-pointer
+
+LDFLAGS_SO := $(LDFLAGS)
+
+SRC_DEPS_LIB := -lmp4 -lts -lrecorder_pro -lfileformat -ldtcf -lottimer -lmedia_hal_common -lsecurec -lmwlog -luproc
+
+SRC_DEPS_LIB_PATH += -L$(MEDIA_HAL_COMMN_LIB_PATH) \
+ -L$(TS_LIB_DIR)\
+ -L$(REC_LIB_DIR) \
+ -L$(DTCF_LIB_DIR) \
+ -L$(FILEFORMAT_LIB_DIR) \
+ -L$(MP4_LIB_DIR)\
+ -L$(OT_TIMER_LIB_DIR) \
+ $(MEDIA_LIBS_PATH_LINK) \
+ -L$(SECUREC_LIB_PATH) \
+ -L$(MWLOG_LIB_DIR) \
+ -L$(UPROC_LIB_DIR)
+
+CFLAGS_SO := $(CFLAGS)
+
+$(warning "**********CFLAGS_SO: $(CFLAGS_SO) **********")
+
+LIB_SO := $(TRAGET_ROOT)/libplugin_muxer_recorder.so
+LIB_A := $(TRAGET_ROOT)/libplugin_muxer_recorder.a
+
+.PHONY : clean all
+
+all: $(LIB_SO) $(LIB_A)
+ @-rm -f $(OBJS)
+
+$(LIB_A): $(OBJS)
+ $(AR) -rcv $@ $^
+
+$(LIB_SO): $(OBJS)
+ $(CC) $(LDFLAGS_SO) $(CFLAGS_SO) $(LFLAGS) -fPIC -shared -o $@ $^ $(SRC_DEPS_LIB_PATH) $(SRC_DEPS_LIB)
+ $(STRIP) $(LIB_SO)
+
+$(OBJS): %.o : %.c
+ $(CC) $(CFLAGS_SO) $(SRC_DEPS_INC_PATH) -c $< -o $@
+
+clean:
+ @-rm -f $(OBJS) $(LIB_SO) $(LIB_A)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_buffer_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_buffer_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..eeffbc39c12f6698f41776b506cd5faee2ffcd6a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_buffer_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_buffer_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_buffer_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..1c129136a15dae26f5b8c73b743e672068659743
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_buffer_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_muxer.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_muxer.c
new file mode 100755
index 0000000000000000000000000000000000000000..e20af5e640d1356bb00163671afc10b98b9d34be
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_muxer.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_muxer_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_muxer_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..037dab22a652d7ec6234b1e19feea5fed3eafa1a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_muxer_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_muxer_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_muxer_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..9e91e5946d5bb35c976eef65b92d8e55a97ca7db
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/plugins/hisi_recorder_muxer/rec_muxer_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_manager/include/demuxer_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_manager/include/demuxer_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..920a9759bf91671df044cb5963001d4d2cd738d8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_manager/include/demuxer_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_manager/src/demuxer_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_manager/src/demuxer_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..16c56910b531434ed63a93de9ba87dd7e88c36c5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_manager/src/demuxer_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_plugins_manager/include/demuxer_plugins_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_plugins_manager/include/demuxer_plugins_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..17081d3c0dbeebf99fc2e0b1f474a453d809af02
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_plugins_manager/include/demuxer_plugins_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_plugins_manager/src/demuxer_plugins_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_plugins_manager/src/demuxer_plugins_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..16198519d250339edf1814c682ccf95289161b55
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/demuxer_plugins_manager/src/demuxer_plugins_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/format_common/include/format_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/format_common/include/format_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..e144fe442a29930b0824672fb09419ccb9d00305
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/format_common/include/format_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/format_common/src/format_common.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/format_common/src/format_common.c
new file mode 100755
index 0000000000000000000000000000000000000000..1cefa656b8341f83a9a6738f25f28ba182a8b5fd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/format_common/src/format_common.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/format_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/format_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..9086e2513e656bb15d3258ddee8e7b95f7fca03f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/format_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_manager/include/muxer_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_manager/include/muxer_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..d6fa624fc94caf00dd8f4a7fabe0cb3c7200de22
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_manager/include/muxer_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_manager/src/muxer_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_manager/src/muxer_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..43baaff7546b5dcab1a0c261f902602125c54df6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_manager/src/muxer_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_plugins_manager/include/muxer_plugins_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_plugins_manager/include/muxer_plugins_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..0fcaff56c9beb20c7713f3362e7ea120f15ccac1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_plugins_manager/include/muxer_plugins_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_plugins_manager/src/muxer_plugins_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_plugins_manager/src/muxer_plugins_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..d4994afd0ed3b0a885b7fff93a3eb5e2e4ab1006
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/muxer_plugins_manager/src/muxer_plugins_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/plugins_manager_common/include/plugins_manager_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/plugins_manager_common/include/plugins_manager_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..8b606825449dd4a626fc5883679973bba77a484f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/plugins_manager_common/include/plugins_manager_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/plugins_manager_common/src/plugins_manager_common.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/plugins_manager_common/src/plugins_manager_common.c
new file mode 100755
index 0000000000000000000000000000000000000000..c88830085f8d4bfb927d5ea25047842a4cfe0f2e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/plugins_manager_common/src/plugins_manager_common.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/protocol_plugins_manager/include/protocol_plugins_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/protocol_plugins_manager/include/protocol_plugins_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..77b4117f3c11e4cd589865f4fb65fcd87a4ca922
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/protocol_plugins_manager/include/protocol_plugins_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/protocol_plugins_manager/src/protocol_plugins_manager.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/protocol_plugins_manager/src/protocol_plugins_manager.c
new file mode 100755
index 0000000000000000000000000000000000000000..2df1a469ffcab78de56b5a5d58555cbaf6a674d2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/format/source/src/protocol_plugins_manager/src/protocol_plugins_manager.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3516dv300/linux_small/libs/libhdi_videodisplayer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3516dv300/linux_small/libs/libhdi_videodisplayer.so
new file mode 100755
index 0000000000000000000000000000000000000000..f812d5bd4c6e07b9d9c751d4d23b3aba7e1a7656
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3516dv300/linux_small/libs/libhdi_videodisplayer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3516dv300/linux_standard/libs/libvideo_display_layer.z.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3516dv300/linux_standard/libs/libvideo_display_layer.z.so
new file mode 100755
index 0000000000000000000000000000000000000000..56cdc2de4b5eed6e61910923dcc1ea85095d996f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3516dv300/linux_standard/libs/libvideo_display_layer.z.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3516dv300/liteos_a/libs/libhdi_videodisplayer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3516dv300/liteos_a/libs/libhdi_videodisplayer.so
new file mode 100755
index 0000000000000000000000000000000000000000..f153a5e3d2b1e426abd395957265c798188cacf1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3516dv300/liteos_a/libs/libhdi_videodisplayer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3518ev300/liteos_a/libs/libhdi_videodisplayer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3518ev300/liteos_a/libs/libhdi_videodisplayer.so
new file mode 100755
index 0000000000000000000000000000000000000000..5bc8bcd741125b767c4893aee05d29188dd280a2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/media/videodisplay/hi3518ev300/liteos_a/libs/libhdi_videodisplayer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..bbca7ae0b76ba0078855204f7915c6ba3a54a6ab
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/BUILD.gn
@@ -0,0 +1,108 @@
+# Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2021. All rights reserved.
+
+if (defined(ohos_lite)) {
+ import("//build/lite/config/component/lite_component.gni")
+} else {
+ import("//build/ohos.gni")
+}
+
+if (defined(ohos_lite)) {
+ board = board_name
+ if (board_name == "hispark_taurus" || board_name == "aegis_hi3516dv300") {
+ board = "hi3516dv300"
+ } else if (board_name == "hispark_aries") {
+ board = "hi3518ev300"
+ } else if (board_name == "hispark_ss927v100") {
+ board = "ss928v100"
+ } else if (board_name == "hispark_ss928v100") {
+ board = "ss928v100"
+ }
+
+ build_ext_component("middleware_source_sdk") {
+ exec_path = rebase_path(".", root_build_dir)
+ outdir = rebase_path("$root_out_dir")
+ clang_dir = ""
+ if (ohos_build_compiler_dir != "") {
+ clang_dir = rebase_path("${ohos_build_compiler_dir}/bin")
+ }
+ sysroot_path = rebase_path(ohos_current_sysroot)
+ arch_cflags = string_join(" ", target_arch_cflags)
+ arch_cflags += " --target=$target_triple -fuse-ld=lld --rtlib=compiler-rt"
+ command = "./build.sh ${outdir} ${board} ${ohos_kernel_type} ${clang_dir} ${sysroot_path} \"${arch_cflags}\""
+ }
+} else {
+ group("middleware_group") {
+ deps = [
+ ":dtcf",
+ ":exif",
+ ":fileformat",
+ ":hitimer",
+ ":mbuf",
+ ":messagehandler",
+ ":mp4",
+ ":mwlog",
+ ":recorder_pro",
+ ":ts",
+ ]
+ }
+
+ ohos_prebuilt_shared_library("hitimer") {
+ source = "common/hitimer/lib/linux_standard/libhitimer.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("mbuf") {
+ source = "common/mbuffer/lib/linux_standard/libmbuf.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("messagehandler") {
+ source = "common/msghandler/lib/linux_standard/libmessagehandler.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("mwlog") {
+ source = "common/log/lib/linux_standard/libmwlog.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("dtcf") {
+ source = "component/dtcf/lib/linux_standard/libdtcf.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("recorder_pro") {
+ source = "component/recorder_pro/lib/linux_standard/librecorder_pro.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("exif") {
+ source = "component/fileformat/exif/lib/linux_standard/libexif.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("fileformat") {
+ source = "component/fileformat/common/lib/linux_standard/libfileformat.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("mp4") {
+ source = "component/fileformat/mp4/lib/linux_standard/libmp4.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+
+ ohos_prebuilt_shared_library("ts") {
+ source = "component/fileformat/ts/lib/linux_standard/libts.so"
+ install_images = [ chipset_base_dir ]
+ subsystem_name = "hisilicon_products"
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/build.sh b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..af73b74870eeb74743862c8883c2085996974310
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/build.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+# Compile middleware project, this is the entrance script
+
+# error out on errors
+set -e
+OUT_DIR="$1"
+BOARD_NAME="$2"
+KERNEL_TYPE="$3"
+CC_PATH="$4"
+
+function main(){
+ CUR_DIR=$(cd $(dirname "$0");pwd)
+
+ OS_TYPE=$KERNEL_TYPE
+ if [ "$KERNEL_TYPE" = "linux" ];then
+ OS_TYPE="linux_small"
+ fi
+
+ echo "BOARD_NAME=${BOARD_NAME} OS_TYPE=${OS_TYPE} CC_PATH=${CC_PATH}"
+ #######################################
+ # build ffmpeg library
+ #######################################
+ ./ffmpeg_adapt/build_ffmpeg.sh $OUT_DIR $BOARD_NAME $OS_TYPE $CC_PATH
+
+ cp -rf $CUR_DIR/component/fileformat/mp4/lib/$OS_TYPE/libmp4.so $OUT_DIR/
+ cp -rf $CUR_DIR/component/fileformat/ts/lib/$OS_TYPE/libts.so $OUT_DIR/
+ cp -rf $CUR_DIR/component/fileformat/exif/lib/$OS_TYPE/libexif.so $OUT_DIR/
+ cp -rf $CUR_DIR/component/fileformat/common/lib/$OS_TYPE/libfileformat.so $OUT_DIR/
+ cp -rf $CUR_DIR/component/recorder_pro/lib/$OS_TYPE/librecorder_pro.so $OUT_DIR/
+ cp -rf $CUR_DIR/component/dtcf/lib/$OS_TYPE/libdtcf.so $OUT_DIR/
+ cp -rf $CUR_DIR/component/fstool/lib/$OS_TYPE/libfstool.so $OUT_DIR/
+ cp -rf $CUR_DIR/common/hitimer/lib/$OS_TYPE/libhitimer.so $OUT_DIR/
+ cp -rf $CUR_DIR/common/mbuffer/lib/$OS_TYPE/libmbuf.so $OUT_DIR/
+ cp -rf $CUR_DIR/common/log/lib/$OS_TYPE/libmwlog.so $OUT_DIR/
+}
+
+if [ "x" != "x$5" ]; then
+export SYSROOT_PATH=$5
+fi
+if [ "x" != "x$6" ]; then
+export ARCH_CFLAGS="$6"
+fi
+main "$@"
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/bundle.json b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/bundle.json
new file mode 100755
index 0000000000000000000000000000000000000000..07dafc6c08cedea9d67f1daee55f2d5553996ea5
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/bundle.json
@@ -0,0 +1,35 @@
+{
+ "name": "@ohos/middleware",
+ "description": "middleware source sdk.",
+ "version": "3.1",
+ "license": "Apache License 2.0",
+ "publishAs": "code-segment",
+ "segment": {
+ "destPath": "device/soc/hisilicon/common/hal/middleware"
+ },
+ "dirs": {},
+ "scripts": {},
+ "component": {
+ "name": "middleware",
+ "subsystem": "vendor",
+ "syscap": [],
+ "features": [],
+ "adapted_system_type": [
+ "mini",
+ "small"
+ ],
+ "rom": "",
+ "ram": "",
+ "deps": {
+ "components": [],
+ "third_party": []
+ },
+ "build": {
+ "sub_component": [
+ "//device/soc/hisilicon/common/hal/middleware:middleware_source_sdk"
+ ],
+ "inner_kits": [],
+ "test": []
+ }
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/linux_small/libhitimer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/linux_small/libhitimer.so
new file mode 100755
index 0000000000000000000000000000000000000000..43932a1e639a0febe8f15d33336a73df90a65328
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/linux_small/libhitimer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/linux_standard/libhitimer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/linux_standard/libhitimer.so
new file mode 100755
index 0000000000000000000000000000000000000000..78553a12f2c8610cadcce11f036735187d0ad308
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/linux_standard/libhitimer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/liteos_a/libhitimer.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/liteos_a/libhitimer.a
new file mode 100755
index 0000000000000000000000000000000000000000..b144e43e541314e902cdc526934bc9b9de7264c5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/liteos_a/libhitimer.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/liteos_a/libhitimer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/liteos_a/libhitimer.so
new file mode 100755
index 0000000000000000000000000000000000000000..b2e2b59f025cdf59d221ca0bca259cb12e59cd88
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/hitimer/lib/liteos_a/libhitimer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/linux_small/libmwlog.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/linux_small/libmwlog.so
new file mode 100755
index 0000000000000000000000000000000000000000..538089396c004e715e30969a1200b987d71dcd78
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/linux_small/libmwlog.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/linux_standard/libmwlog.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/linux_standard/libmwlog.so
new file mode 100755
index 0000000000000000000000000000000000000000..ae69b42a5915481685f4fffa8de56aeebeec0164
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/linux_standard/libmwlog.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/liteos_a/libmwlog.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/liteos_a/libmwlog.a
new file mode 100755
index 0000000000000000000000000000000000000000..8d0acebd9d77edc61f136478a7d6b65f05abdb43
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/liteos_a/libmwlog.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/liteos_a/libmwlog.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/liteos_a/libmwlog.so
new file mode 100755
index 0000000000000000000000000000000000000000..03c0f6ec4189de79b7d17e4c8edb86ac358f6d77
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/log/lib/liteos_a/libmwlog.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/linux_small/libmbuf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/linux_small/libmbuf.so
new file mode 100755
index 0000000000000000000000000000000000000000..f4ea9f3341394a32f0177b51d47684721c4e754c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/linux_small/libmbuf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/linux_standard/libmbuf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/linux_standard/libmbuf.so
new file mode 100755
index 0000000000000000000000000000000000000000..2ea0c0689a69de5d226a7002c79b6f4c80f0f03f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/linux_standard/libmbuf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/liteos_a/libmbuf.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/liteos_a/libmbuf.a
new file mode 100755
index 0000000000000000000000000000000000000000..6d05f2d8add293f431fa8860a265d3e5a0ee5686
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/liteos_a/libmbuf.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/liteos_a/libmbuf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/liteos_a/libmbuf.so
new file mode 100755
index 0000000000000000000000000000000000000000..aacaf4205a1f78bd077bfe9027e4ad36de203ce8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/mbuffer/lib/liteos_a/libmbuf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/linux_small/libmessagehandler.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/linux_small/libmessagehandler.so
new file mode 100755
index 0000000000000000000000000000000000000000..ca529d9f0935eabed2bb10b28e5c7635869cdb00
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/linux_small/libmessagehandler.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/linux_standard/libmessagehandler.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/linux_standard/libmessagehandler.so
new file mode 100755
index 0000000000000000000000000000000000000000..7a7e5a50e09d935dfd3a1765a1b4e0e258a567cd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/linux_standard/libmessagehandler.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/liteos_a/libmessagehandler.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/liteos_a/libmessagehandler.a
new file mode 100755
index 0000000000000000000000000000000000000000..40f6f7c2ee72a7bfdd99658a3d8a9e0471b6f95b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/liteos_a/libmessagehandler.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/liteos_a/libmessagehandler.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/liteos_a/libmessagehandler.so
new file mode 100755
index 0000000000000000000000000000000000000000..663ca48b79a769ae7b5472cf1775e0fa77e780bc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/common/msghandler/lib/liteos_a/libmessagehandler.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/linux_small/libdtcf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/linux_small/libdtcf.so
new file mode 100755
index 0000000000000000000000000000000000000000..941c2b2c0d53dab4672ed1d853c65dde4935fc5c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/linux_small/libdtcf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/linux_standard/libdtcf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/linux_standard/libdtcf.so
new file mode 100755
index 0000000000000000000000000000000000000000..5db27dd2739c1dddb6c8613f0f4382e623fa914f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/linux_standard/libdtcf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/liteos_a/libdtcf.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/liteos_a/libdtcf.a
new file mode 100755
index 0000000000000000000000000000000000000000..a432c57e69dd5ecd6171aa26c67a2feaae0fc695
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/liteos_a/libdtcf.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/liteos_a/libdtcf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/liteos_a/libdtcf.so
new file mode 100755
index 0000000000000000000000000000000000000000..e468368d1628716656e5e79ab18449ade910a3b8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/dtcf/lib/liteos_a/libdtcf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/linux_small/libfileformat.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/linux_small/libfileformat.so
new file mode 100755
index 0000000000000000000000000000000000000000..5c9436a6257bf4e9415a11b66cfabdefbffb06c0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/linux_small/libfileformat.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/linux_standard/libfileformat.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/linux_standard/libfileformat.so
new file mode 100755
index 0000000000000000000000000000000000000000..70ced79df64c8ab7146473615f245d7cfde475df
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/linux_standard/libfileformat.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/liteos_a/libfileformat.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/liteos_a/libfileformat.a
new file mode 100755
index 0000000000000000000000000000000000000000..59b1cb5e8a828bd2fb520d6b74b1772788f8e991
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/liteos_a/libfileformat.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/liteos_a/libfileformat.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/liteos_a/libfileformat.so
new file mode 100755
index 0000000000000000000000000000000000000000..ff13997418ada6ce595006f2564630eacfcfed4f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/common/lib/liteos_a/libfileformat.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/linux_small/libexif.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/linux_small/libexif.so
new file mode 100755
index 0000000000000000000000000000000000000000..93d8e1119b98bfc7c89e86d8ab5935dc3f9b2d58
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/linux_small/libexif.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/linux_standard/libexif.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/linux_standard/libexif.so
new file mode 100755
index 0000000000000000000000000000000000000000..6fd427db9b5c20052635c99e4893e2880ea97f9e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/linux_standard/libexif.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/liteos_a/libexif.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/liteos_a/libexif.a
new file mode 100755
index 0000000000000000000000000000000000000000..6911f8eac901a02ee0ba9569c8d4e7cd7972068e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/liteos_a/libexif.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/liteos_a/libexif.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/liteos_a/libexif.so
new file mode 100755
index 0000000000000000000000000000000000000000..4f912620993bc91d5f3532402688bc741c2f3f9d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/exif/lib/liteos_a/libexif.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/linux_small/libmp4.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/linux_small/libmp4.so
new file mode 100755
index 0000000000000000000000000000000000000000..e192fa9dad0a07ff75aca5b5f8f4ded57c42e7a3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/linux_small/libmp4.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/linux_standard/libmp4.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/linux_standard/libmp4.so
new file mode 100755
index 0000000000000000000000000000000000000000..be86d6ee75bdefdb5a6871428d420158768aa8d0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/linux_standard/libmp4.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/liteos_a/libmp4.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/liteos_a/libmp4.a
new file mode 100755
index 0000000000000000000000000000000000000000..76756309fccd86c453ca8c0225624ccadbc6b8f2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/liteos_a/libmp4.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/liteos_a/libmp4.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/liteos_a/libmp4.so
new file mode 100755
index 0000000000000000000000000000000000000000..39359deec5709cbf53196ea283e47390e4b6af87
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/mp4/lib/liteos_a/libmp4.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/linux_small/libts.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/linux_small/libts.so
new file mode 100755
index 0000000000000000000000000000000000000000..01ef0d26ded4972e706af8ba7b797d71cdf8311f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/linux_small/libts.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/linux_standard/libts.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/linux_standard/libts.so
new file mode 100755
index 0000000000000000000000000000000000000000..89c2c2c310b2325054d63e7d93084e56a55a550a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/linux_standard/libts.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/liteos_a/libts.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/liteos_a/libts.a
new file mode 100755
index 0000000000000000000000000000000000000000..bebba8d6b14d746248ea16721905a74eddbc231a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/liteos_a/libts.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/liteos_a/libts.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/liteos_a/libts.so
new file mode 100755
index 0000000000000000000000000000000000000000..23174c87b087701441bd6c9d864ea4538864a30a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fileformat/ts/lib/liteos_a/libts.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/linux_small/libfstool.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/linux_small/libfstool.a
new file mode 100755
index 0000000000000000000000000000000000000000..bc7048603cb4ee991d993219e0bfd7642c5fba6a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/linux_small/libfstool.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/linux_small/libfstool.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/linux_small/libfstool.so
new file mode 100755
index 0000000000000000000000000000000000000000..6a76771790829686fe06cec09a24018fff804d8b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/linux_small/libfstool.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/liteos_a/libfstool.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/liteos_a/libfstool.a
new file mode 100755
index 0000000000000000000000000000000000000000..7ee33799a182827d129e715db92020f3756fba8a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/liteos_a/libfstool.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/liteos_a/libfstool.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/liteos_a/libfstool.so
new file mode 100755
index 0000000000000000000000000000000000000000..70444857affa79a8597870108378e53b680858ae
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/fstool/lib/liteos_a/libfstool.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/recorder_pro/lib/linux_small/librecorder_pro.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/recorder_pro/lib/linux_small/librecorder_pro.so
new file mode 100755
index 0000000000000000000000000000000000000000..a3e0ea02ea9a56c96614873e100fce070b78674c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/recorder_pro/lib/linux_small/librecorder_pro.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/recorder_pro/lib/linux_standard/librecorder_pro.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/recorder_pro/lib/linux_standard/librecorder_pro.so
new file mode 100755
index 0000000000000000000000000000000000000000..9a311677936a8d949b36bfd6170deefb90c1a529
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/recorder_pro/lib/linux_standard/librecorder_pro.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/recorder_pro/lib/liteos_a/librecorder_pro.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/recorder_pro/lib/liteos_a/librecorder_pro.so
new file mode 100755
index 0000000000000000000000000000000000000000..269e93b28f55a76e91bc2c327faac25604107e8f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/component/recorder_pro/lib/liteos_a/librecorder_pro.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/Makefile_llvm b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/Makefile_llvm
new file mode 100755
index 0000000000000000000000000000000000000000..bbae0f0ce3d93426c98c55b4d9ce1549355ee417
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/Makefile_llvm
@@ -0,0 +1,198 @@
+MAIN_MAKEFILE=1
+include ffbuild/config.mak
+
+vpath %.c $(SRC_PATH)
+vpath %.cpp $(SRC_PATH)
+vpath %.h $(SRC_PATH)
+vpath %.inc $(SRC_PATH)
+vpath %.m $(SRC_PATH)
+vpath %.S $(SRC_PATH)
+vpath %.asm $(SRC_PATH)
+vpath %.rc $(SRC_PATH)
+vpath %.v $(SRC_PATH)
+vpath %.texi $(SRC_PATH)
+vpath %.cu $(SRC_PATH)
+vpath %.ptx $(SRC_PATH)
+vpath %/fate_config.sh.template $(SRC_PATH)
+
+TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch
+HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
+
+# $(FFLIBS-yes) needs to be in linking order
+FFLIBS-$(CONFIG_AVDEVICE) += avdevice
+FFLIBS-$(CONFIG_AVFILTER) += avfilter
+FFLIBS-$(CONFIG_AVFORMAT) += avformat
+FFLIBS-$(CONFIG_AVCODEC) += avcodec
+FFLIBS-$(CONFIG_AVRESAMPLE) += avresample
+FFLIBS-$(CONFIG_POSTPROC) += postproc
+FFLIBS-$(CONFIG_SWRESAMPLE) += swresample
+FFLIBS-$(CONFIG_SWSCALE) += swscale
+
+FFLIBS := avutil
+
+DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.ffpreset) $(SRC_PATH)/doc/ffprobe.xsd
+
+SKIPHEADERS = compat/w32pthreads.h
+
+# first so "all" becomes default target
+all: all-yes
+
+include $(SRC_PATH)/tools/Makefile
+include $(SRC_PATH)/ffbuild/common.mak
+
+ifeq ($(LLVM_COMPILER), y)
+SYSROOT_PATH ?= ../../../../../sysroot
+ARCH_CFLAGS ?= --target=arm-liteos-ohos
+CFLAGS += --sysroot=$(SYSROOT_PATH) $(ARCH_CFLAGS)
+LDFLAGS += --sysroot=$(SYSROOT_PATH) $(ARCH_CFLAGS)
+endif
+
+FF_EXTRALIBS := $(FFEXTRALIBS)
+FF_DEP_LIBS := $(DEP_LIBS)
+FF_STATIC_DEP_LIBS := $(STATIC_DEP_LIBS)
+
+$(TOOLS): %$(EXESUF): %.o
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(EXTRALIBS-$(*F)) $(EXTRALIBS) $(ELIBS)
+
+target_dec_%_fuzzer$(EXESUF): target_dec_%_fuzzer.o $(FF_DEP_LIBS)
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
+
+tools/target_bsf_%_fuzzer$(EXESUF): tools/target_bsf_%_fuzzer.o $(FF_DEP_LIBS)
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
+
+target_dem_%_fuzzer$(EXESUF): target_dem_%_fuzzer.o $(FF_DEP_LIBS)
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
+
+tools/target_dem_fuzzer$(EXESUF): tools/target_dem_fuzzer.o $(FF_DEP_LIBS)
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
+
+tools/target_io_dem_fuzzer$(EXESUF): tools/target_io_dem_fuzzer.o $(FF_DEP_LIBS)
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
+
+
+tools/enum_options$(EXESUF): ELIBS = $(FF_EXTRALIBS)
+tools/enum_options$(EXESUF): $(FF_DEP_LIBS)
+tools/sofa2wavs$(EXESUF): ELIBS = $(FF_EXTRALIBS)
+tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
+tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
+tools/target_dec_%_fuzzer$(EXESUF): $(FF_DEP_LIBS)
+tools/target_dem_%_fuzzer$(EXESUF): $(FF_DEP_LIBS)
+
+CONFIGURABLE_COMPONENTS = \
+ $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c)) \
+ $(SRC_PATH)/libavcodec/bitstream_filters.c \
+ $(SRC_PATH)/libavcodec/parsers.c \
+ $(SRC_PATH)/libavformat/protocols.c \
+
+config.h: ffbuild/.config
+ffbuild/.config: $(CONFIGURABLE_COMPONENTS)
+ @-tput bold 2>/dev/null
+ @-printf '\nWARNING: $(?) newer than config.h, rerun configure\n\n'
+ @-tput sgr0 2>/dev/null
+
+SUBDIR_VARS := CLEANFILES FFLIBS HOSTPROGS TESTPROGS TOOLS \
+ HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS \
+ ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \
+ ALTIVEC-OBJS VSX-OBJS MMX-OBJS X86ASM-OBJS \
+ MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSP-OBJS MSA-OBJS \
+ MMI-OBJS OBJS SLIBOBJS HOSTOBJS TESTOBJS
+
+define RESET
+$(1) :=
+$(1)-yes :=
+endef
+
+define DOSUBDIR
+$(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
+SUBDIR := $(1)/
+include $(SRC_PATH)/$(1)/Makefile
+-include $(SRC_PATH)/$(1)/$(ARCH)/Makefile
+-include $(SRC_PATH)/$(1)/$(INTRINSICS)/Makefile
+include $(SRC_PATH)/ffbuild/library.mak
+endef
+
+$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
+
+include $(SRC_PATH)/fftools/Makefile
+include $(SRC_PATH)/doc/Makefile
+include $(SRC_PATH)/doc/examples/Makefile
+
+libavcodec/avcodec.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h
+
+$(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
+ifeq ($(STRIPTYPE),direct)
+ $(STRIP) -o $@ $<
+else
+ $(CP) $< $@
+ $(STRIP) $@
+endif
+
+%$(PROGSSUF)_g$(EXESUF): $(FF_DEP_LIBS)
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
+
+VERSION_SH = $(SRC_PATH)/ffbuild/version.sh
+GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
+
+.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) ffbuild/config.mak
+.version: M=@
+
+libavutil/ffversion.h .version:
+ $(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION)
+ $(Q)touch .version
+
+# force version.sh to run whenever version might have changed
+-include .version
+
+install: install-libs install-headers
+
+install-libs: install-libs-yes
+
+install-data: $(DATA_FILES)
+ $(Q)mkdir -p "$(DATADIR)"
+ $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
+
+uninstall: uninstall-data uninstall-headers uninstall-libs uninstall-pkgconfig
+
+uninstall-data:
+ $(RM) -r "$(DATADIR)"
+
+clean::
+ $(RM) $(CLEANSUFFIXES)
+ $(RM) $(addprefix compat/,$(CLEANSUFFIXES)) $(addprefix compat/*/,$(CLEANSUFFIXES)) $(addprefix compat/*/*/,$(CLEANSUFFIXES))
+ $(RM) -r coverage-html
+ $(RM) -rf coverage.info coverage.info.in lcov
+
+distclean:: clean
+ $(RM) .version avversion.h config.asm config.h mapfile \
+ ffbuild/.config ffbuild/config.* libavutil/avconfig.h \
+ version.h libavutil/ffversion.h libavcodec/codec_names.h \
+ libavcodec/bsf_list.c libavformat/protocol_list.c \
+ libavcodec/codec_list.c libavcodec/parser_list.c \
+ libavfilter/filter_list.c libavdevice/indev_list.c libavdevice/outdev_list.c \
+ libavformat/muxer_list.c libavformat/demuxer_list.c
+ifeq ($(SRC_LINK),src)
+ $(RM) src
+endif
+ $(RM) -rf doc/examples/pc-uninstalled
+
+config:
+ $(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
+
+build: all alltools examples testprogs
+check: all alltools examples testprogs fate
+
+include $(SRC_PATH)/tests/Makefile
+
+$(sort $(OUTDIRS)):
+ $(Q)mkdir -p $@
+
+# Dummy rule to stop make trying to rebuild removed or renamed headers
+%.h:
+ @:
+
+# Disable suffix rules. Most of the builtin rules are suffix rules,
+# so this saves some time on slow systems.
+.SUFFIXES:
+
+.PHONY: all all-yes alltools build check config testprogs
+.PHONY: *clean install* uninstall*
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/Notes.txt b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/Notes.txt
new file mode 100755
index 0000000000000000000000000000000000000000..b587585f97d0f86c674b4014aae0adf5b3716659
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/Notes.txt
@@ -0,0 +1,9 @@
+ffmpeg-adapt is a collection of makefile and configure that have been changed based on the ffmpeg4.3.1
+The users should follow the license of the original file.
+
+##Changed file
+configure_llvm
+configure
+library.mak
+Makefile_llvm
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/adapt_config.sh b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/adapt_config.sh
new file mode 100755
index 0000000000000000000000000000000000000000..de951ac310360780ec249de2894981ca3a75af44
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/adapt_config.sh
@@ -0,0 +1,71 @@
+# Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2022. All rights reserved.
+#!/bin/sh
+
+function cancel_opt
+{
+ pattern=$1
+ sed -i "s/$pattern 1/$pattern 0/g" config.h
+ sed -i "s/$pattern/!$pattern/g" ffbuild/config.mak
+}
+
+function effect_opt
+{
+ pattern=$1
+ echo $pattern
+ sed -i "s/$pattern 0/$pattern 1/g" config.h
+ sed -i "s/!$pattern/$pattern/g" ffbuild/config.mak
+}
+
+function adapt_liteos
+{
+echo "adapt ffmpeg for liteos"
+
+sed -i "/^CFLAGS=/ s/$/ \$(LITEOS_MACRO) \$(LITEOS_OSDRV_INCLUDE) \$(LITEOS_USR_INCLUDE) \$(LITEOS_CMACRO) \$(LITEOS_INCLUDE) \-I\$(LITEOSTOPDIR)\/lib\/cxxstl\/gccinclude/g" ffbuild/config.mak
+
+sed -i "s:atomics\/gcc:atomics\/pthread:g" ffbuild/config.mak
+
+sed -i "/getenv/ s:^://:g" config.h
+
+effect_opt HAVE_UNISTD_H
+effect_opt HAVE_CBRT
+effect_opt HAVE_CBRTF
+effect_opt HAVE_COPYSIGN
+effect_opt HAVE_ERF
+effect_opt HAVE_HYPOT
+effect_opt HAVE_RINT
+effect_opt HAVE_LRINT
+effect_opt HAVE_LRINTF
+effect_opt HAVE_ROUND
+effect_opt HAVE_ROUNDF
+effect_opt HAVE_TRUNC
+effect_opt HAVE_TRUNCF
+effect_opt HAVE_GMTIME_R
+effect_opt HAVE_LOCALTIME_R
+effect_opt HAVE_PTHREAD_CANCEL
+effect_opt HAVE_PTHREADS
+effect_opt HAVE_SIMD_ALIGN_16
+
+cancel_opt HAVE_SYSCONF
+cancel_opt HAVE_SYSCTL
+cancel_opt HAVE_ATOMICS_NATIVE
+cancel_opt HAVE_LLRINTF
+cancel_opt HAVE_MMAP
+cancel_opt HAVE_LZO1X_999_COMPRESS
+cancel_opt HAVE_GETHRTIME
+cancel_opt HAVE_CABS
+cancel_opt HAVE_CEXP
+cancel_opt HAVE_VALGRIND_VALGRIND_H
+cancel_opt HAVE_SYMVER_ASM_LABEL
+#cancel_opt CONFIG_MANPAGES
+#cancel_opt CONFIG_PODPAGES
+#cancel_opt CONFIG_FAAN
+#cancel_opt CONFIG_FAANDCT
+#cancel_opt CONFIG_FAANIDCT
+#cancel_opt CONFIG_FDCTDSP
+
+make clean
+
+echo "already adapt ffmpeg to liteos"
+}
+CURDIR=$(pwd)
+adapt_liteos
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/build_ffmpeg.sh b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/build_ffmpeg.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9d872987ebdad85369f87af02c861f07fac97b6b
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/build_ffmpeg.sh
@@ -0,0 +1,85 @@
+# Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2022. All rights reserved.
+#!/bin/sh
+
+# error out on errors
+set -e
+OUT_DIR="$1"
+BOARD_NAME="$2"
+OS_TYPE="$3"
+CC_PATH="$4"
+
+function main(){
+ CUR_DIR=$(cd $(dirname "$0");pwd)
+ ROOT_DIR=$CUR_DIR/../../../../../../..
+ COMPILER_TYPE="clang"
+ export LLVM_COMPILER=y
+ CONFIGURE_FILE=configure_llvm
+ echo "###### $BOARD_NAME:$OS_TYPE ######"
+
+ FF_CONFIG_SH=disable_decoder_config.sh
+ FFMPEG_ORIGN=$ROOT_DIR/third_party/ffmpeg/old-version/ffmpeg-4.4.1.tar.gz
+ FFMPEG_DIR=$CUR_DIR/ffmpeg
+
+ ############################################
+ # copy ffmpeg file to current path
+ ############################################
+ mkdir -p ${FFMPEG_DIR}
+ cp $FFMPEG_ORIGN ${FFMPEG_DIR}
+ cd ${FFMPEG_DIR}
+ tar -xvf ffmpeg-4.4.1.tar.gz
+ cd -
+
+ ############################################
+ # copy sh to ffmpeg file patch
+ ############################################
+ cp $CUR_DIR/$CONFIGURE_FILE $FFMPEG_DIR/configure_temp
+ cp $CUR_DIR/adapt_config.sh $FFMPEG_DIR/adapt_config.sh
+ cp $CUR_DIR/disable_decoder_config.sh $FFMPEG_DIR/disable_decoder_config.sh
+ cp $CUR_DIR/library.mak $FFMPEG_DIR/ffbuild/library.mak
+ cp $CUR_DIR/Makefile_llvm $FFMPEG_DIR/Makefile
+ chmod -R 777 $FFMPEG_DIR
+ cd $FFMPEG_DIR
+
+ ############################################
+ # run ./disable_decoder_config.sh
+ ############################################
+ echo "######################"
+ echo "###### run ./disable_decoder_config.sh ######"
+ echo "###### BOARD_NAME=$BOARD_NAME OS_TYPE=$OS_TYPE COMPILER_TYPE=$COMPILER_TYPE CC_PATH=$CC_PATH ######"
+ echo "######################"
+ ./disable_decoder_config.sh $CC_PATH;
+
+ ############################################
+ # run ./adapt_config.sh
+ ############################################
+ echo "######################"
+ echo "###### run ./adapt_config.sh ######"
+ echo "######################"
+ ./adapt_config.sh
+
+ ############################################
+ # make and make install
+ ############################################
+ echo "######################"
+ echo "###### run make -j16 ######"
+ echo "######################"
+ make -j16
+
+ echo "######################"
+ echo "###### run make install ######"
+ echo "######################"
+ make install
+
+ #############################################
+ # copy library
+ #############################################
+ cp -rf $FFMPEG_DIR/install/lib/libavcodec.so $OUT_DIR/
+ cp -rf $FFMPEG_DIR/install/lib/libavformat.so $OUT_DIR/
+ cp -rf $FFMPEG_DIR/install/lib/libavutil.so $OUT_DIR/
+ cp -rf $FFMPEG_DIR/install/lib/libswresample.so $OUT_DIR/
+
+ cd -;
+ rm -rf $FFMPEG_DIR
+}
+
+main "$@"
\ No newline at end of file
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/configure_llvm b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/configure_llvm
new file mode 100755
index 0000000000000000000000000000000000000000..5919638f79fcdb3863ff6d0b4ff456f333a297e7
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/configure_llvm
@@ -0,0 +1,7724 @@
+#!/bin/sh
+#
+# FFmpeg configure script
+#
+# Copyright (c) 2000-2002 Fabrice Bellard
+# Copyright (c) 2005-2008 Diego Biurrun
+# Copyright (c) 2005-2008 Mans Rullgard
+#
+
+# Prevent locale nonsense from breaking basic text processing.
+LC_ALL=C
+export LC_ALL
+
+# make sure we are running under a compatible shell
+# try to make this part work with most shells
+
+try_exec(){
+ echo "Trying shell $1"
+ type "$1" > /dev/null 2>&1 && exec "$@"
+}
+
+unset foo
+(: ${foo%%bar}) 2> /dev/null
+E1="$?"
+
+(: ${foo?}) 2> /dev/null
+E2="$?"
+
+if test "$E1" != 0 || test "$E2" = 0; then
+ echo "Broken shell detected. Trying alternatives."
+ export FF_CONF_EXEC
+ if test "0$FF_CONF_EXEC" -lt 1; then
+ FF_CONF_EXEC=1
+ try_exec bash "$0" "$@"
+ fi
+ if test "0$FF_CONF_EXEC" -lt 2; then
+ FF_CONF_EXEC=2
+ try_exec ksh "$0" "$@"
+ fi
+ if test "0$FF_CONF_EXEC" -lt 3; then
+ FF_CONF_EXEC=3
+ try_exec /usr/xpg4/bin/sh "$0" "$@"
+ fi
+ echo "No compatible shell script interpreter found."
+ echo "This configure script requires a POSIX-compatible shell"
+ echo "such as bash or ksh."
+ echo "THIS IS NOT A BUG IN FFMPEG, DO NOT REPORT IT AS SUCH."
+ echo "Instead, install a working POSIX-compatible shell."
+ echo "Disabling this configure test will create a broken FFmpeg."
+ if test "$BASH_VERSION" = '2.04.0(1)-release'; then
+ echo "This bash version ($BASH_VERSION) is broken on your platform."
+ echo "Upgrade to a later version if available."
+ fi
+ exit 1
+fi
+
+test -d /usr/xpg4/bin && PATH=/usr/xpg4/bin:$PATH
+
+show_help(){
+ cat <SPIRV compilation via libglslang [no]
+ --enable-libgme enable Game Music Emu via libgme [no]
+ --enable-libgsm enable GSM de/encoding via libgsm [no]
+ --enable-libiec61883 enable iec61883 via libiec61883 [no]
+ --enable-libilbc enable iLBC de/encoding via libilbc [no]
+ --enable-libjack enable JACK audio sound server [no]
+ --enable-libklvanc enable Kernel Labs VANC processing [no]
+ --enable-libkvazaar enable HEVC encoding via libkvazaar [no]
+ --enable-liblensfun enable lensfun lens correction [no]
+ --enable-libmodplug enable ModPlug via libmodplug [no]
+ --enable-libmp3lame enable MP3 encoding via libmp3lame [no]
+ --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
+ --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
+ --enable-libopencv enable video filtering via libopencv [no]
+ --enable-libopenh264 enable H.264 encoding via OpenH264 [no]
+ --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
+ --enable-libopenmpt enable decoding tracked files via libopenmpt [no]
+ --enable-libopenvino enable OpenVINO as a DNN module backend
+ for DNN based filters like dnn_processing [no]
+ --enable-libopus enable Opus de/encoding via libopus [no]
+ --enable-libpulse enable Pulseaudio input via libpulse [no]
+ --enable-librabbitmq enable RabbitMQ library [no]
+ --enable-librav1e enable AV1 encoding via rav1e [no]
+ --enable-librist enable RIST via librist [no]
+ --enable-librsvg enable SVG rasterization via librsvg [no]
+ --enable-librubberband enable rubberband needed for rubberband filter [no]
+ --enable-librtmp enable RTMP[E] support via librtmp [no]
+ --enable-libshine enable fixed-point MP3 encoding via libshine [no]
+ --enable-libsmbclient enable Samba protocol via libsmbclient [no]
+ --enable-libsnappy enable Snappy compression, needed for hap encoding [no]
+ --enable-libsoxr enable Include libsoxr resampling [no]
+ --enable-libspeex enable Speex de/encoding via libspeex [no]
+ --enable-libsrt enable Haivision SRT protocol via libsrt [no]
+ --enable-libssh enable SFTP protocol via libssh [no]
+ --enable-libsvtav1 enable AV1 encoding via SVT [no]
+ --enable-libtensorflow enable TensorFlow as a DNN module backend
+ for DNN based filters like sr [no]
+ --enable-libtesseract enable Tesseract, needed for ocr filter [no]
+ --enable-libtheora enable Theora encoding via libtheora [no]
+ --enable-libtls enable LibreSSL (via libtls), needed for https support
+ if openssl, gnutls or mbedtls is not used [no]
+ --enable-libtwolame enable MP2 encoding via libtwolame [no]
+ --enable-libuavs3d enable AVS3 decoding via libuavs3d [no]
+ --enable-libv4l2 enable libv4l2/v4l-utils [no]
+ --enable-libvidstab enable video stabilization using vid.stab [no]
+ --enable-libvmaf enable vmaf filter via libvmaf [no]
+ --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
+ --enable-libvorbis enable Vorbis en/decoding via libvorbis,
+ native implementation exists [no]
+ --enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no]
+ --enable-libwebp enable WebP encoding via libwebp [no]
+ --enable-libx264 enable H.264 encoding via x264 [no]
+ --enable-libx265 enable HEVC encoding via x265 [no]
+ --enable-libxavs enable AVS encoding via xavs [no]
+ --enable-libxavs2 enable AVS2 encoding via xavs2 [no]
+ --enable-libxcb enable X11 grabbing using XCB [autodetect]
+ --enable-libxcb-shm enable X11 grabbing shm communication [autodetect]
+ --enable-libxcb-xfixes enable X11 grabbing mouse rendering [autodetect]
+ --enable-libxcb-shape enable X11 grabbing shape rendering [autodetect]
+ --enable-libxvid enable Xvid encoding via xvidcore,
+ native MPEG-4/Xvid encoder exists [no]
+ --enable-libxml2 enable XML parsing using the C library libxml2, needed
+ for dash demuxing support [no]
+ --enable-libzimg enable z.lib, needed for zscale filter [no]
+ --enable-libzmq enable message passing via libzmq [no]
+ --enable-libzvbi enable teletext support via libzvbi [no]
+ --enable-lv2 enable LV2 audio filtering [no]
+ --disable-lzma disable lzma [autodetect]
+ --enable-decklink enable Blackmagic DeckLink I/O support [no]
+ --enable-mbedtls enable mbedTLS, needed for https support
+ if openssl, gnutls or libtls is not used [no]
+ --enable-mediacodec enable Android MediaCodec support [no]
+ --enable-mediafoundation enable encoding via MediaFoundation [auto]
+ --enable-libmysofa enable libmysofa, needed for sofalizer filter [no]
+ --enable-openal enable OpenAL 1.1 capture support [no]
+ --enable-opencl enable OpenCL processing [no]
+ --enable-opengl enable OpenGL rendering [no]
+ --enable-openssl enable openssl, needed for https support
+ if gnutls, libtls or mbedtls is not used [no]
+ --enable-pocketsphinx enable PocketSphinx, needed for asr filter [no]
+ --disable-sndio disable sndio support [autodetect]
+ --disable-schannel disable SChannel SSP, needed for TLS support on
+ Windows if openssl and gnutls are not used [autodetect]
+ --disable-sdl2 disable sdl2 [autodetect]
+ --disable-securetransport disable Secure Transport, needed for TLS support
+ on OSX if openssl and gnutls are not used [autodetect]
+ --enable-vapoursynth enable VapourSynth demuxer [no]
+ --enable-vulkan enable Vulkan code [no]
+ --disable-xlib disable xlib [autodetect]
+ --disable-zlib disable zlib [autodetect]
+
+ The following libraries provide various hardware acceleration features:
+ --disable-amf disable AMF video encoding code [autodetect]
+ --disable-audiotoolbox disable Apple AudioToolbox code [autodetect]
+ --enable-cuda-nvcc enable Nvidia CUDA compiler [no]
+ --disable-cuda-llvm disable CUDA compilation using clang [autodetect]
+ --disable-cuvid disable Nvidia CUVID support [autodetect]
+ --disable-d3d11va disable Microsoft Direct3D 11 video acceleration code [autodetect]
+ --disable-dxva2 disable Microsoft DirectX 9 video acceleration code [autodetect]
+ --disable-ffnvcodec disable dynamically linked Nvidia code [autodetect]
+ --enable-libdrm enable DRM code (Linux) [no]
+ --enable-libmfx enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no]
+ --enable-libnpp enable Nvidia Performance Primitives-based code [no]
+ --enable-mmal enable Broadcom Multi-Media Abstraction Layer (Raspberry Pi) via MMAL [no]
+ --disable-nvdec disable Nvidia video decoding acceleration (via hwaccel) [autodetect]
+ --disable-nvenc disable Nvidia video encoding code [autodetect]
+ --enable-omx enable OpenMAX IL code [no]
+ --enable-omx-rpi enable OpenMAX IL code for Raspberry Pi [no]
+ --enable-rkmpp enable Rockchip Media Process Platform code [no]
+ --disable-v4l2-m2m disable V4L2 mem2mem code [autodetect]
+ --disable-vaapi disable Video Acceleration API (mainly Unix/Intel) code [autodetect]
+ --disable-vdpau disable Nvidia Video Decode and Presentation API for Unix code [autodetect]
+ --disable-videotoolbox disable VideoToolbox code [autodetect]
+
+Toolchain options:
+ --arch=ARCH select architecture [$arch]
+ --cpu=CPU select the minimum required CPU (affects
+ instruction selection, may crash on older CPUs)
+ --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]
+ --progs-suffix=SUFFIX program name suffix []
+ --enable-cross-compile assume a cross-compiler is used
+ --sysroot=PATH root of cross-build tree
+ --sysinclude=PATH location of cross-build system headers
+ --target-os=OS compiler targets OS [$target_os]
+ --target-exec=CMD command to run executables on target
+ --target-path=DIR path to view of build directory on target
+ --target-samples=DIR path to samples directory on target
+ --tempprefix=PATH force fixed dir/prefix instead of mktemp for checks
+ --toolchain=NAME set tool defaults according to NAME
+ (gcc-asan, clang-asan, gcc-msan, clang-msan,
+ gcc-tsan, clang-tsan, gcc-usan, clang-usan,
+ valgrind-massif, valgrind-memcheck,
+ msvc, icl, gcov, llvm-cov, hardened)
+ --nm=NM use nm tool NM [$nm_default]
+ --ar=AR use archive tool AR [$ar_default]
+ --as=AS use assembler AS [$as_default]
+ --ln_s=LN_S use symbolic link tool LN_S [$ln_s_default]
+ --strip=STRIP use strip tool STRIP [$strip_default]
+ --windres=WINDRES use windows resource compiler WINDRES [$windres_default]
+ --x86asmexe=EXE use nasm-compatible assembler EXE [$x86asmexe_default]
+ --cc=CC use C compiler CC [$cc_default]
+ --cxx=CXX use C compiler CXX [$cxx_default]
+ --objcc=OCC use ObjC compiler OCC [$cc_default]
+ --dep-cc=DEPCC use dependency generator DEPCC [$cc_default]
+ --nvcc=NVCC use Nvidia CUDA compiler NVCC or clang [$nvcc_default]
+ --ld=LD use linker LD [$ld_default]
+ --pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [$pkg_config_default]
+ --pkg-config-flags=FLAGS pass additional flags to pkgconf []
+ --ranlib=RANLIB use ranlib RANLIB [$ranlib_default]
+ --doxygen=DOXYGEN use DOXYGEN to generate API doc [$doxygen_default]
+ --host-cc=HOSTCC use host C compiler HOSTCC
+ --host-cflags=HCFLAGS use HCFLAGS when compiling for host
+ --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host
+ --host-ld=HOSTLD use host linker HOSTLD
+ --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
+ --host-extralibs=HLIBS use libs HLIBS when linking for host
+ --host-os=OS compiler host OS [$target_os]
+ --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
+ --extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS]
+ --extra-objcflags=FLAGS add FLAGS to OBJCFLAGS [$CFLAGS]
+ --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
+ --extra-ldexeflags=ELDFLAGS add ELDFLAGS to LDEXEFLAGS [$LDEXEFLAGS]
+ --extra-ldsoflags=ELDFLAGS add ELDFLAGS to LDSOFLAGS [$LDSOFLAGS]
+ --extra-libs=ELIBS add ELIBS [$ELIBS]
+ --extra-version=STRING version string suffix []
+ --optflags=OPTFLAGS override optimization-related compiler flags
+ --nvccflags=NVCCFLAGS override nvcc flags [$nvccflags_default]
+ --build-suffix=SUFFIX library name suffix []
+ --enable-pic build position-independent code
+ --enable-thumb compile for Thumb instruction set
+ --enable-lto use link-time optimization
+ --env="ENV=override" override the environment variables
+
+Advanced options (experts only):
+ --malloc-prefix=PREFIX prefix malloc and related names with PREFIX
+ --custom-allocator=NAME use a supported custom allocator
+ --disable-symver disable symbol versioning
+ --enable-hardcoded-tables use hardcoded tables instead of runtime generation
+ --disable-safe-bitstream-reader
+ disable buffer boundary checking in bitreaders
+ (faster, but may crash)
+ --sws-max-filter-size=N the max filter size swscale uses [$sws_max_filter_size_default]
+
+Optimization options (experts only):
+ --disable-asm disable all assembly optimizations
+ --disable-altivec disable AltiVec optimizations
+ --disable-vsx disable VSX optimizations
+ --disable-power8 disable POWER8 optimizations
+ --disable-amd3dnow disable 3DNow! optimizations
+ --disable-amd3dnowext disable 3DNow! extended optimizations
+ --disable-mmx disable MMX optimizations
+ --disable-mmxext disable MMXEXT optimizations
+ --disable-sse disable SSE optimizations
+ --disable-sse2 disable SSE2 optimizations
+ --disable-sse3 disable SSE3 optimizations
+ --disable-ssse3 disable SSSE3 optimizations
+ --disable-sse4 disable SSE4 optimizations
+ --disable-sse42 disable SSE4.2 optimizations
+ --disable-avx disable AVX optimizations
+ --disable-xop disable XOP optimizations
+ --disable-fma3 disable FMA3 optimizations
+ --disable-fma4 disable FMA4 optimizations
+ --disable-avx2 disable AVX2 optimizations
+ --disable-avx512 disable AVX-512 optimizations
+ --disable-aesni disable AESNI optimizations
+ --disable-armv5te disable armv5te optimizations
+ --disable-armv6 disable armv6 optimizations
+ --disable-armv6t2 disable armv6t2 optimizations
+ --disable-vfp disable VFP optimizations
+ --disable-neon disable NEON optimizations
+ --disable-inline-asm disable use of inline assembly
+ --disable-x86asm disable use of standalone x86 assembly
+ --disable-mipsdsp disable MIPS DSP ASE R1 optimizations
+ --disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations
+ --disable-msa disable MSA optimizations
+ --disable-msa2 disable MSA2 optimizations
+ --disable-mipsfpu disable floating point MIPS optimizations
+ --disable-mmi disable Loongson SIMD optimizations
+ --disable-fast-unaligned consider unaligned accesses slow
+
+Developer options (useful when working on FFmpeg itself):
+ --disable-debug disable debugging symbols
+ --enable-debug=LEVEL set the debug level [$debuglevel]
+ --disable-optimizations disable compiler optimizations
+ --enable-extra-warnings enable more compiler warnings
+ --disable-stripping disable stripping of executables and shared libraries
+ --assert-level=level 0(default), 1 or 2, amount of assertion testing,
+ 2 causes a slowdown at runtime.
+ --enable-memory-poisoning fill heap uninitialized allocated space with arbitrary data
+ --valgrind=VALGRIND run "make fate" tests through valgrind to detect memory
+ leaks and errors, using the specified valgrind binary.
+ Cannot be combined with --target-exec
+ --enable-ftrapv Trap arithmetic overflows
+ --samples=PATH location of test samples for FATE, if not set use
+ \$FATE_SAMPLES at make invocation time.
+ --enable-neon-clobber-test check NEON registers for clobbering (should be
+ used only for debugging purposes)
+ --enable-xmm-clobber-test check XMM registers for clobbering (Win64-only;
+ should be used only for debugging purposes)
+ --enable-random randomly enable/disable components
+ --disable-random
+ --enable-random=LIST randomly enable/disable specific components or
+ --disable-random=LIST component groups. LIST is a comma-separated list
+ of NAME[:PROB] entries where NAME is a component
+ (group) and PROB the probability associated with
+ NAME (default 0.5).
+ --random-seed=VALUE seed value for --enable/disable-random
+ --disable-valgrind-backtrace do not print a backtrace under Valgrind
+ (only applies to --disable-optimizations builds)
+ --enable-ossfuzz Enable building fuzzer tool
+ --libfuzzer=PATH path to libfuzzer
+ --ignore-tests=TESTS comma-separated list (without "fate-" prefix
+ in the name) of tests whose result is ignored
+ --enable-linux-perf enable Linux Performance Monitor API
+ --disable-large-tests disable tests that use a large amount of memory
+
+NOTE: Object files are built at the place where configure is launched.
+EOF
+ exit 0
+}
+
+if test -t 1 && which tput >/dev/null 2>&1; then
+ ncolors=$(tput colors)
+ if test -n "$ncolors" && test $ncolors -ge 8; then
+ bold_color=$(tput bold)
+ warn_color=$(tput setaf 3)
+ error_color=$(tput setaf 1)
+ reset_color=$(tput sgr0)
+ fi
+ # 72 used instead of 80 since that's the default of pr
+ ncols=$(tput cols)
+fi
+: ${ncols:=72}
+
+log(){
+ echo "$@" >> $logfile
+}
+
+log_file(){
+ log BEGIN "$1"
+ log_file_i=1
+ while IFS= read -r log_file_line; do
+ printf '%5d\t%s\n' "$log_file_i" "$log_file_line"
+ log_file_i=$(($log_file_i+1))
+ done < "$1" >> "$logfile"
+ log END "$1"
+}
+
+warn(){
+ log "WARNING: $*"
+ WARNINGS="${WARNINGS}WARNING: $*\n"
+}
+
+die(){
+ log "$@"
+ echo "$error_color$bold_color$@$reset_color"
+ cat <>file;
+ } else if (file ~ /\\.asm\$/) {
+ printf(\"%%define %s %d\\n\", c, v) >>file;
+ } else if (file ~ /\\.mak\$/) {
+ n = -v ? \"\" : \"!\";
+ printf(\"%s%s=yes\\n\", n, c) >>file;
+ } else if (file ~ /\\.texi\$/) {
+ pre = -v ? \"\" : \"@c \";
+ yesno = \$2;
+ c2 = tolower(c);
+ gsub(/_/, \"-\", c2);
+ printf(\"%s@set %s %s\\n\", pre, c2, yesno) >>file;
+ }
+ }
+ }"
+}
+
+print_enabled(){
+ suf=$1
+ shift
+ for v; do
+ enabled $v && printf "%s\n" ${v%$suf}
+ done
+}
+
+append(){
+ var=$1
+ shift
+ eval "$var=\"\$$var $*\""
+}
+
+prepend(){
+ var=$1
+ shift
+ eval "$var=\"$* \$$var\""
+}
+
+reverse () {
+ eval '
+ reverse_out=
+ for v in $'$1'; do
+ reverse_out="$v $reverse_out"
+ done
+ '$1'=$reverse_out
+ '
+}
+
+# keeps the last occurence of each non-unique item
+unique(){
+ unique_out=
+ eval unique_in=\$$1
+ reverse unique_in
+ for v in $unique_in; do
+ # " $unique_out" +space such that every item is surrounded with spaces
+ case " $unique_out" in *" $v "*) continue; esac # already in list
+ unique_out="$unique_out$v "
+ done
+ reverse unique_out
+ eval $1=\$unique_out
+}
+
+resolve(){
+ resolve_out=
+ eval resolve_in=\$$1
+ for v in $resolve_in; do
+ eval 'resolve_out="$resolve_out$'$v' "'
+ done
+ eval $1=\$resolve_out
+}
+
+add_cppflags(){
+ append CPPFLAGS "$@"
+}
+
+add_cflags(){
+ append CFLAGS $($cflags_filter "$@")
+}
+
+add_cflags_headers(){
+ append CFLAGS_HEADERS $($cflags_filter "$@")
+}
+
+add_cxxflags(){
+ append CXXFLAGS $($cflags_filter "$@")
+}
+
+add_objcflags(){
+ append OBJCFLAGS $($objcflags_filter "$@")
+}
+
+add_asflags(){
+ append ASFLAGS $($asflags_filter "$@")
+}
+
+add_ldflags(){
+ append LDFLAGS $($ldflags_filter "$@")
+}
+
+add_ldexeflags(){
+ append LDEXEFLAGS $($ldflags_filter "$@")
+}
+
+add_ldsoflags(){
+ append LDSOFLAGS $($ldflags_filter "$@")
+}
+
+add_extralibs(){
+ prepend extralibs $($ldflags_filter "$@")
+}
+
+add_stripflags(){
+ append ASMSTRIPFLAGS "$@"
+}
+
+add_host_cppflags(){
+ append host_cppflags "$@"
+}
+
+add_host_cflags(){
+ append host_cflags $($host_cflags_filter "$@")
+}
+
+add_host_ldflags(){
+ append host_ldflags $($host_ldflags_filter "$@")
+}
+
+add_compat(){
+ append compat_objs $1
+ shift
+ map 'add_cppflags -D$v' "$@"
+}
+
+test_cmd(){
+ log "$@"
+ "$@" >> $logfile 2>&1
+}
+
+test_stat(){
+ log test_stat "$@"
+ stat "$1" >> $logfile 2>&1
+}
+
+cc_e(){
+ eval printf '%s\\n' $CC_E
+}
+
+cc_o(){
+ eval printf '%s\\n' $CC_O
+}
+
+as_o(){
+ eval printf '%s\\n' $AS_O
+}
+
+x86asm_o(){
+ eval printf '%s\\n' $X86ASM_O
+}
+
+ld_o(){
+ eval printf '%s\\n' $LD_O
+}
+
+hostcc_e(){
+ eval printf '%s\\n' $HOSTCC_E
+}
+
+hostcc_o(){
+ eval printf '%s\\n' $HOSTCC_O
+}
+
+nvcc_o(){
+ eval printf '%s\\n' $NVCC_O
+}
+
+test_cc(){
+ log test_cc "$@"
+ cat > $TMPC
+ log_file $TMPC
+ test_cmd $cc $CPPFLAGS $CFLAGS "$@" $CC_C $(cc_o $TMPO) $TMPC
+}
+
+test_cxx(){
+ log test_cxx "$@"
+ cat > $TMPCPP
+ log_file $TMPCPP
+ test_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" $CXX_C -o $TMPO $TMPCPP
+}
+
+test_objcc(){
+ log test_objcc "$@"
+ cat > $TMPM
+ log_file $TMPM
+ test_cmd $objcc -Werror=missing-prototypes $CPPFLAGS $CFLAGS $OBJCFLAGS "$@" $OBJCC_C $(cc_o $TMPO) $TMPM
+}
+
+test_nvcc(){
+ log test_nvcc "$@"
+ cat > $TMPCU
+ log_file $TMPCU
+ tmpcu_=$TMPCU
+ tmpo_=$TMPO
+ [ -x "$(command -v cygpath)" ] && tmpcu_=$(cygpath -m $tmpcu_) && tmpo_=$(cygpath -m $tmpo_)
+ test_cmd $nvcc $nvccflags "$@" $NVCC_C $(nvcc_o $tmpo_) $tmpcu_
+}
+
+check_nvcc() {
+ log check_nvcc "$@"
+ name=$1
+ shift 1
+ disabled $name && return
+ disable $name
+ test_nvcc "$@" < $TMPC
+ log_file $TMPC
+ test_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC
+}
+
+test_as(){
+ log test_as "$@"
+ cat > $TMPS
+ log_file $TMPS
+ test_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C $(as_o $TMPO) $TMPS
+}
+
+test_x86asm(){
+ log test_x86asm "$@"
+ echo "$1" > $TMPASM
+ log_file $TMPASM
+ shift
+ test_cmd $x86asmexe $X86ASMFLAGS -Werror "$@" $(x86asm_o $TMPO) $TMPASM
+}
+
+check_cmd(){
+ log check_cmd "$@"
+ cmd=$1
+ disabled $cmd && return
+ disable $cmd
+ test_cmd $@ && enable $cmd
+}
+
+check_as(){
+ log check_as "$@"
+ name=$1
+ code=$2
+ shift 2
+ disable $name
+ test_as $@ < $TMPC <"
+}
+
+test_code(){
+ log test_code "$@"
+ check=$1
+ headers=$2
+ code=$3
+ shift 3
+ {
+ for hdr in $headers; do
+ print_include $hdr
+ done
+ echo "int main(void) { $code; return 0; }"
+ } | test_$check "$@"
+}
+
+check_cppflags(){
+ log check_cppflags "$@"
+ test_cpp "$@" <
+EOF
+}
+
+test_cflags(){
+ log test_cflags "$@"
+ set -- $($cflags_filter "$@")
+ test_cc "$@" <"
+ echo "int main(void) { return 0; }"
+ } | test_objcc && test_stat "$TMPO" && enable_sanitized $header
+}
+
+check_apple_framework(){
+ log check_apple_framework "$@"
+ framework="$1"
+ name="$(tolower $framework)"
+ header="${framework}/${framework}.h"
+ disable $name
+ check_header_objcc $header &&
+ enable $name && eval ${name}_extralibs='"-framework $framework"'
+}
+
+check_func(){
+ log check_func "$@"
+ func=$1
+ shift
+ disable $func
+ test_ld "cc" "$@" <
+#include
+float foo(complex float f, complex float g) { return $func($args); }
+int main(void){ return (int) foo; }
+EOF
+}
+
+check_mathfunc(){
+ log check_mathfunc "$@"
+ func=$1
+ narg=$2
+ shift 2
+ test $narg = 2 && args="f, g" || args="f"
+ disable $func
+ test_ld "cc" "$@" <
+float foo(float f, float g) { return $func($args); }
+int main(void){ return (int) foo; }
+EOF
+}
+
+check_func_headers(){
+ log check_func_headers "$@"
+ headers=$1
+ funcs=$2
+ shift 2
+ {
+ for hdr in $headers; do
+ print_include $hdr
+ done
+ echo "#include "
+ for func in $funcs; do
+ echo "long check_$func(void) { return (long) $func; }"
+ done
+ echo "int main(void) { int ret = 0;"
+ # LTO could optimize out the test functions without this
+ for func in $funcs; do
+ echo " ret |= ((intptr_t)check_$func) & 0xFFFF;"
+ done
+ echo "return ret; }"
+ } | test_ld "cc" "$@" && enable $funcs && enable_sanitized $headers
+}
+
+check_class_headers_cpp(){
+ log check_class_headers_cpp "$@"
+ headers=$1
+ classes=$2
+ shift 2
+ {
+ for hdr in $headers; do
+ echo "#include <$hdr>"
+ done
+ echo "int main(void) { "
+ i=1
+ for class in $classes; do
+ echo "$class obj$i;"
+ i=$(expr $i + 1)
+ done
+ echo "return 0; }"
+ } | test_ld "cxx" "$@" && enable $funcs && enable_sanitized $headers
+}
+
+test_cpp_condition(){
+ log test_cpp_condition "$@"
+ header=$1
+ condition=$2
+ shift 2
+ test_cpp "$@" <
+#if !($condition)
+#error "unsatisfied condition: $condition"
+#endif
+EOF
+}
+
+check_cpp_condition(){
+ log check_cpp_condition "$@"
+ name=$1
+ shift 1
+ disable $name
+ test_cpp_condition "$@" && enable $name
+}
+
+test_cflags_cc(){
+ log test_cflags_cc "$@"
+ flags=$1
+ header=$2
+ condition=$3
+ shift 3
+ set -- $($cflags_filter "$flags")
+ test_cc "$@" <
+#if !($condition)
+#error "unsatisfied condition: $condition"
+#endif
+EOF
+}
+
+check_lib(){
+ log check_lib "$@"
+ name="$1"
+ headers="$2"
+ funcs="$3"
+ shift 3
+ disable $name
+ check_func_headers "$headers" "$funcs" "$@" &&
+ enable $name && eval ${name}_extralibs="\$@"
+}
+
+check_lib_cpp(){
+ log check_lib_cpp "$@"
+ name="$1"
+ headers="$2"
+ classes="$3"
+ shift 3
+ disable $name
+ check_class_headers_cpp "$headers" "$classes" "$@" &&
+ enable $name && eval ${name}_extralibs="\$@"
+}
+
+test_pkg_config(){
+ log test_pkg_config "$@"
+ name="$1"
+ pkg_version="$2"
+ pkg="${2%% *}"
+ headers="$3"
+ funcs="$4"
+ shift 4
+ disable $name
+ test_cmd $pkg_config --exists --print-errors $pkg_version || return
+ pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
+ pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg)
+ check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
+ enable $name &&
+ set_sanitized "${name}_cflags" $pkg_cflags &&
+ set_sanitized "${name}_extralibs" $pkg_libs
+}
+
+check_pkg_config(){
+ log check_pkg_config "$@"
+ name="$1"
+ test_pkg_config "$@" &&
+ eval add_cflags \$${name}_cflags
+}
+
+test_exec(){
+ test_ld "cc" "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; }
+}
+
+check_exec_crash(){
+ log check_exec_crash "$@"
+ code=$(cat)
+
+ # exit() is not async signal safe. _Exit (C99) and _exit (POSIX)
+ # are safe but may not be available everywhere. Thus we use
+ # raise(SIGTERM) instead. The check is run in a subshell so we
+ # can redirect the "Terminated" message from the shell. SIGBUS
+ # is not defined by standard C so it is used conditionally.
+
+ (test_exec "$@") >> $logfile 2>&1 <
+static void sighandler(int sig){
+ raise(SIGTERM);
+}
+int foo(void){
+ $code
+}
+int (*func_ptr)(void) = foo;
+int main(void){
+ signal(SIGILL, sighandler);
+ signal(SIGFPE, sighandler);
+ signal(SIGSEGV, sighandler);
+#ifdef SIGBUS
+ signal(SIGBUS, sighandler);
+#endif
+ return func_ptr();
+}
+EOF
+}
+
+check_type(){
+ log check_type "$@"
+ headers=$1
+ type=$2
+ shift 2
+ disable_sanitized "$type"
+ test_code cc "$headers" "$type v" "$@" && enable_sanitized "$type"
+}
+
+check_struct(){
+ log check_struct "$@"
+ headers=$1
+ struct=$2
+ member=$3
+ shift 3
+ disable_sanitized "${struct}_${member}"
+ test_code cc "$headers" "const void *p = &(($struct *)0)->$member" "$@" &&
+ enable_sanitized "${struct}_${member}"
+}
+
+check_builtin(){
+ log check_builtin "$@"
+ name=$1
+ headers=$2
+ builtin=$3
+ shift 3
+ disable "$name"
+ test_code ld "$headers" "$builtin" "cc" "$@" && enable "$name"
+}
+
+check_compile_assert(){
+ log check_compile_assert "$@"
+ name=$1
+ headers=$2
+ condition=$3
+ shift 3
+ disable "$name"
+ test_code cc "$headers" "char c[2 * !!($condition) - 1]" "$@" && enable "$name"
+}
+
+check_cc(){
+ log check_cc "$@"
+ name=$1
+ shift
+ disable "$name"
+ test_code cc "$@" && enable "$name"
+}
+
+require(){
+ log require "$@"
+ name_version="$1"
+ name="${1%% *}"
+ shift
+ check_lib $name "$@" || die "ERROR: $name_version not found"
+}
+
+require_cc(){
+ log require_cc "$@"
+ name="$1"
+ check_cc "$@" || die "ERROR: $name failed"
+}
+
+require_cpp(){
+ log require_cpp "$@"
+ name_version="$1"
+ name="${1%% *}"
+ shift
+ check_lib_cpp "$name" "$@" || die "ERROR: $name_version not found"
+}
+
+require_headers(){
+ log require_headers "$@"
+ headers="$1"
+ check_headers "$@" || die "ERROR: $headers not found"
+}
+
+require_cpp_condition(){
+ log require_cpp_condition "$@"
+ condition="$3"
+ check_cpp_condition "$@" || die "ERROR: $condition not satisfied"
+}
+
+require_pkg_config(){
+ log require_pkg_config "$@"
+ pkg_version="$2"
+ check_pkg_config "$@" || die "ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message"
+}
+
+test_host_cc(){
+ log test_host_cc "$@"
+ cat > $TMPC
+ log_file $TMPC
+ test_cmd $host_cc $host_cflags "$@" $HOSTCC_C $(hostcc_o $TMPO) $TMPC
+}
+
+test_host_cpp(){
+ log test_host_cpp "$@"
+ cat > $TMPC
+ log_file $TMPC
+ test_cmd $host_cc $host_cppflags $host_cflags "$@" $(hostcc_e $TMPO) $TMPC
+}
+
+check_host_cppflags(){
+ log check_host_cppflags "$@"
+ test_host_cpp "$@" <
+EOF
+}
+
+check_host_cflags(){
+ log check_host_cflags "$@"
+ set -- $($host_cflags_filter "$@")
+ test_host_cc "$@" <
+#if !($condition)
+#error "unsatisfied condition: $condition"
+#endif
+EOF
+}
+
+check_host_cpp_condition(){
+ log check_host_cpp_condition "$@"
+ name=$1
+ shift 1
+ disable $name
+ test_host_cpp_condition "$@" && enable $name
+}
+
+cp_if_changed(){
+ cmp -s "$1" "$2" && { test "$quiet" != "yes" && echo "$2 is unchanged"; } && return
+ mkdir -p "$(dirname $2)"
+ cp -f "$1" "$2"
+}
+
+# CONFIG_LIST contains configurable options, while HAVE_LIST is for
+# system-dependent things.
+
+AVCODEC_COMPONENTS="
+ bsfs
+ decoders
+ encoders
+ hwaccels
+ parsers
+"
+
+AVDEVICE_COMPONENTS="
+ indevs
+ outdevs
+"
+
+AVFILTER_COMPONENTS="
+ filters
+"
+
+AVFORMAT_COMPONENTS="
+ demuxers
+ muxers
+ protocols
+"
+
+COMPONENT_LIST="
+ $AVCODEC_COMPONENTS
+ $AVDEVICE_COMPONENTS
+ $AVFILTER_COMPONENTS
+ $AVFORMAT_COMPONENTS
+"
+
+EXAMPLE_LIST="
+ avio_list_dir_example
+ avio_reading_example
+ decode_audio_example
+ decode_video_example
+ demuxing_decoding_example
+ encode_audio_example
+ encode_video_example
+ extract_mvs_example
+ filter_audio_example
+ filtering_audio_example
+ filtering_video_example
+ http_multiclient_example
+ hw_decode_example
+ metadata_example
+ muxing_example
+ qsvdec_example
+ remuxing_example
+ resampling_audio_example
+ scaling_video_example
+ transcode_aac_example
+ transcoding_example
+ vaapi_encode_example
+ vaapi_transcode_example
+"
+
+EXTERNAL_AUTODETECT_LIBRARY_LIST="
+ alsa
+ appkit
+ avfoundation
+ bzlib
+ coreimage
+ iconv
+ libxcb
+ libxcb_shm
+ libxcb_shape
+ libxcb_xfixes
+ lzma
+ mediafoundation
+ schannel
+ sdl2
+ securetransport
+ sndio
+ xlib
+ zlib
+"
+
+EXTERNAL_LIBRARY_GPL_LIST="
+ avisynth
+ frei0r
+ libcdio
+ libdavs2
+ librubberband
+ libvidstab
+ libx264
+ libx265
+ libxavs
+ libxavs2
+ libxvid
+"
+
+EXTERNAL_LIBRARY_NONFREE_LIST="
+ decklink
+ libfdk_aac
+ openssl
+ libtls
+"
+
+EXTERNAL_LIBRARY_VERSION3_LIST="
+ gmp
+ libaribb24
+ liblensfun
+ libopencore_amrnb
+ libopencore_amrwb
+ libvo_amrwbenc
+ mbedtls
+ rkmpp
+"
+
+EXTERNAL_LIBRARY_GPLV3_LIST="
+ libsmbclient
+"
+
+EXTERNAL_LIBRARY_LIST="
+ $EXTERNAL_LIBRARY_GPL_LIST
+ $EXTERNAL_LIBRARY_NONFREE_LIST
+ $EXTERNAL_LIBRARY_VERSION3_LIST
+ $EXTERNAL_LIBRARY_GPLV3_LIST
+ chromaprint
+ gcrypt
+ gnutls
+ jni
+ ladspa
+ libaom
+ libass
+ libbluray
+ libbs2b
+ libcaca
+ libcelt
+ libcodec2
+ libdav1d
+ libdc1394
+ libdrm
+ libflite
+ libfontconfig
+ libfreetype
+ libfribidi
+ libglslang
+ libgme
+ libgsm
+ libiec61883
+ libilbc
+ libjack
+ libklvanc
+ libkvazaar
+ libmodplug
+ libmp3lame
+ libmysofa
+ libopencv
+ libopenh264
+ libopenjpeg
+ libopenmpt
+ libopenvino
+ libopus
+ libpulse
+ librabbitmq
+ librav1e
+ librist
+ librsvg
+ librtmp
+ libshine
+ libsmbclient
+ libsnappy
+ libsoxr
+ libspeex
+ libsrt
+ libssh
+ libsvtav1
+ libtensorflow
+ libtesseract
+ libtheora
+ libtwolame
+ libuavs3d
+ libv4l2
+ libvmaf
+ libvorbis
+ libvpx
+ libwebp
+ libxml2
+ libzimg
+ libzmq
+ libzvbi
+ lv2
+ mediacodec
+ openal
+ opengl
+ pocketsphinx
+ vapoursynth
+"
+
+HWACCEL_AUTODETECT_LIBRARY_LIST="
+ amf
+ audiotoolbox
+ crystalhd
+ cuda
+ cuda_llvm
+ cuvid
+ d3d11va
+ dxva2
+ ffnvcodec
+ nvdec
+ nvenc
+ vaapi
+ vdpau
+ videotoolbox
+ v4l2_m2m
+ xvmc
+"
+
+# catchall list of things that require external libs to link
+EXTRALIBS_LIST="
+ cpu_init
+ cws2fws
+"
+
+HWACCEL_LIBRARY_NONFREE_LIST="
+ cuda_nvcc
+ cuda_sdk
+ libnpp
+"
+
+HWACCEL_LIBRARY_LIST="
+ $HWACCEL_LIBRARY_NONFREE_LIST
+ libmfx
+ mmal
+ omx
+ opencl
+ vulkan
+"
+
+DOCUMENT_LIST="
+ doc
+ htmlpages
+ manpages
+ podpages
+ txtpages
+"
+
+FEATURE_LIST="
+ ftrapv
+ gray
+ hardcoded_tables
+ omx_rpi
+ runtime_cpudetect
+ safe_bitstream_reader
+ shared
+ small
+ static
+ swscale_alpha
+"
+
+# this list should be kept in linking order
+LIBRARY_LIST="
+ avdevice
+ avfilter
+ swscale
+ postproc
+ avformat
+ avcodec
+ swresample
+ avresample
+ avutil
+"
+
+LICENSE_LIST="
+ gpl
+ nonfree
+ version3
+"
+
+PROGRAM_LIST="
+ ffplay
+ ffprobe
+ ffmpeg
+"
+
+SUBSYSTEM_LIST="
+ dct
+ dwt
+ error_resilience
+ faan
+ fast_unaligned
+ fft
+ lsp
+ lzo
+ mdct
+ pixelutils
+ network
+ rdft
+"
+
+# COMPONENT_LIST needs to come last to ensure correct dependency checking
+CONFIG_LIST="
+ $DOCUMENT_LIST
+ $EXAMPLE_LIST
+ $EXTERNAL_LIBRARY_LIST
+ $EXTERNAL_AUTODETECT_LIBRARY_LIST
+ $HWACCEL_LIBRARY_LIST
+ $HWACCEL_AUTODETECT_LIBRARY_LIST
+ $FEATURE_LIST
+ $LICENSE_LIST
+ $LIBRARY_LIST
+ $PROGRAM_LIST
+ $SUBSYSTEM_LIST
+ autodetect
+ fontconfig
+ large_tests
+ linux_perf
+ memory_poisoning
+ neon_clobber_test
+ ossfuzz
+ pic
+ thumb
+ valgrind_backtrace
+ xmm_clobber_test
+ $COMPONENT_LIST
+"
+
+THREADS_LIST="
+ pthreads
+ os2threads
+ w32threads
+"
+
+ATOMICS_LIST="
+ atomics_gcc
+ atomics_suncc
+ atomics_win32
+"
+
+AUTODETECT_LIBS="
+ $EXTERNAL_AUTODETECT_LIBRARY_LIST
+ $HWACCEL_AUTODETECT_LIBRARY_LIST
+ $THREADS_LIST
+"
+
+ARCH_LIST="
+ aarch64
+ alpha
+ arm
+ avr32
+ avr32_ap
+ avr32_uc
+ bfin
+ ia64
+ m68k
+ mips
+ mips64
+ parisc
+ ppc
+ ppc64
+ s390
+ sh4
+ sparc
+ sparc64
+ tilegx
+ tilepro
+ tomi
+ x86
+ x86_32
+ x86_64
+"
+
+ARCH_EXT_LIST_ARM="
+ armv5te
+ armv6
+ armv6t2
+ armv8
+ neon
+ vfp
+ vfpv3
+ setend
+"
+
+ARCH_EXT_LIST_MIPS="
+ mipsfpu
+ mips32r2
+ mips32r5
+ mips64r2
+ mips32r6
+ mips64r6
+ mipsdsp
+ mipsdspr2
+ msa
+ msa2
+"
+
+ARCH_EXT_LIST_LOONGSON="
+ loongson2
+ loongson3
+ mmi
+"
+
+ARCH_EXT_LIST_X86_SIMD="
+ aesni
+ amd3dnow
+ amd3dnowext
+ avx
+ avx2
+ avx512
+ fma3
+ fma4
+ mmx
+ mmxext
+ sse
+ sse2
+ sse3
+ sse4
+ sse42
+ ssse3
+ xop
+"
+
+ARCH_EXT_LIST_PPC="
+ altivec
+ dcbzl
+ ldbrx
+ power8
+ ppc4xx
+ vsx
+"
+
+ARCH_EXT_LIST_X86="
+ $ARCH_EXT_LIST_X86_SIMD
+ cpunop
+ i686
+"
+
+ARCH_EXT_LIST="
+ $ARCH_EXT_LIST_ARM
+ $ARCH_EXT_LIST_PPC
+ $ARCH_EXT_LIST_X86
+ $ARCH_EXT_LIST_MIPS
+ $ARCH_EXT_LIST_LOONGSON
+"
+
+ARCH_FEATURES="
+ aligned_stack
+ fast_64bit
+ fast_clz
+ fast_cmov
+ local_aligned
+ simd_align_16
+ simd_align_32
+ simd_align_64
+"
+
+BUILTIN_LIST="
+ atomic_cas_ptr
+ machine_rw_barrier
+ MemoryBarrier
+ mm_empty
+ rdtsc
+ sem_timedwait
+ sync_val_compare_and_swap
+"
+HAVE_LIST_CMDLINE="
+ inline_asm
+ symver
+ x86asm
+"
+
+HAVE_LIST_PUB="
+ bigendian
+ fast_unaligned
+"
+
+HEADERS_LIST="
+ arpa_inet_h
+ asm_types_h
+ cdio_paranoia_h
+ cdio_paranoia_paranoia_h
+ cuda_h
+ dispatch_dispatch_h
+ dev_bktr_ioctl_bt848_h
+ dev_bktr_ioctl_meteor_h
+ dev_ic_bt8xx_h
+ dev_video_bktr_ioctl_bt848_h
+ dev_video_meteor_ioctl_meteor_h
+ direct_h
+ dirent_h
+ dxgidebug_h
+ dxva_h
+ ES2_gl_h
+ gsm_h
+ io_h
+ linux_dma_buf_h
+ linux_perf_event_h
+ machine_ioctl_bt848_h
+ machine_ioctl_meteor_h
+ malloc_h
+ opencv2_core_core_c_h
+ OpenGL_gl3_h
+ poll_h
+ sys_param_h
+ sys_resource_h
+ sys_select_h
+ sys_soundcard_h
+ sys_time_h
+ sys_un_h
+ sys_videoio_h
+ termios_h
+ udplite_h
+ unistd_h
+ valgrind_valgrind_h
+ windows_h
+ winsock2_h
+"
+
+INTRINSICS_LIST="
+ intrinsics_neon
+"
+
+COMPLEX_FUNCS="
+ cabs
+ cexp
+"
+
+MATH_FUNCS="
+ atanf
+ atan2f
+ cbrt
+ cbrtf
+ copysign
+ cosf
+ erf
+ exp2
+ exp2f
+ expf
+ hypot
+ isfinite
+ isinf
+ isnan
+ ldexpf
+ llrint
+ llrintf
+ log2
+ log2f
+ log10f
+ lrint
+ lrintf
+ powf
+ rint
+ round
+ roundf
+ sinf
+ trunc
+ truncf
+"
+
+SYSTEM_FEATURES="
+ dos_paths
+ libc_msvcrt
+ MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
+ section_data_rel_ro
+ threads
+ uwp
+ winrt
+"
+
+SYSTEM_FUNCS="
+ access
+ aligned_malloc
+ arc4random
+ clock_gettime
+ closesocket
+ CommandLineToArgvW
+ fcntl
+ getaddrinfo
+ gethrtime
+ getopt
+ GetModuleHandle
+ GetProcessAffinityMask
+ GetProcessMemoryInfo
+ GetProcessTimes
+ getrusage
+ GetStdHandle
+ GetSystemTimeAsFileTime
+ gettimeofday
+ glob
+ glXGetProcAddress
+ gmtime_r
+ inet_aton
+ isatty
+ kbhit
+ localtime_r
+ lstat
+ lzo1x_999_compress
+ mach_absolute_time
+ MapViewOfFile
+ memalign
+ mkstemp
+ mmap
+ mprotect
+ nanosleep
+ PeekNamedPipe
+ posix_memalign
+ pthread_cancel
+ sched_getaffinity
+ SecItemImport
+ SetConsoleTextAttribute
+ SetConsoleCtrlHandler
+ SetDllDirectory
+ setmode
+ setrlimit
+ Sleep
+ strerror_r
+ sysconf
+ sysctl
+ usleep
+ UTGetOSTypeFromString
+ VirtualAlloc
+ wglGetProcAddress
+"
+
+SYSTEM_LIBRARIES="
+ bcrypt
+ vaapi_drm
+ vaapi_x11
+ vdpau_x11
+"
+
+TOOLCHAIN_FEATURES="
+ as_arch_directive
+ as_dn_directive
+ as_fpu_directive
+ as_func
+ as_object_arch
+ asm_mod_q
+ blocks_extension
+ ebp_available
+ ebx_available
+ gnu_as
+ gnu_windres
+ ibm_asm
+ inline_asm_direct_symbol_refs
+ inline_asm_labels
+ inline_asm_nonlocal_labels
+ pragma_deprecated
+ rsync_contimeout
+ symver_asm_label
+ symver_gnu_asm
+ vfp_args
+ xform_asm
+ xmm_clobbers
+"
+
+TYPES_LIST="
+ kCMVideoCodecType_HEVC
+ kCMVideoCodecType_HEVCWithAlpha
+ kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
+ kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ
+ kCVImageBufferTransferFunction_ITU_R_2100_HLG
+ kCVImageBufferTransferFunction_Linear
+ socklen_t
+ struct_addrinfo
+ struct_group_source_req
+ struct_ip_mreq_source
+ struct_ipv6_mreq
+ struct_msghdr_msg_flags
+ struct_pollfd
+ struct_rusage_ru_maxrss
+ struct_sctp_event_subscribe
+ struct_sockaddr_in6
+ struct_sockaddr_sa_len
+ struct_sockaddr_storage
+ struct_stat_st_mtim_tv_nsec
+ struct_v4l2_frmivalenum_discrete
+"
+
+HAVE_LIST="
+ $ARCH_EXT_LIST
+ $(add_suffix _external $ARCH_EXT_LIST)
+ $(add_suffix _inline $ARCH_EXT_LIST)
+ $ARCH_FEATURES
+ $BUILTIN_LIST
+ $COMPLEX_FUNCS
+ $HAVE_LIST_CMDLINE
+ $HAVE_LIST_PUB
+ $HEADERS_LIST
+ $INTRINSICS_LIST
+ $MATH_FUNCS
+ $SYSTEM_FEATURES
+ $SYSTEM_FUNCS
+ $SYSTEM_LIBRARIES
+ $THREADS_LIST
+ $TOOLCHAIN_FEATURES
+ $TYPES_LIST
+ libdrm_getfb2
+ makeinfo
+ makeinfo_html
+ opencl_d3d11
+ opencl_drm_arm
+ opencl_drm_beignet
+ opencl_dxva2
+ opencl_vaapi_beignet
+ opencl_vaapi_intel_media
+ perl
+ pod2man
+ texi2html
+"
+
+# options emitted with CONFIG_ prefix but not available on the command line
+CONFIG_EXTRA="
+ aandcttables
+ ac3dsp
+ adts_header
+ atsc_a53
+ audio_frame_queue
+ audiodsp
+ blockdsp
+ bswapdsp
+ cabac
+ cbs
+ cbs_av1
+ cbs_h264
+ cbs_h265
+ cbs_jpeg
+ cbs_mpeg2
+ cbs_vp9
+ dirac_parse
+ dnn
+ dvprofile
+ exif
+ faandct
+ faanidct
+ fdctdsp
+ flacdsp
+ fmtconvert
+ frame_thread_encoder
+ g722dsp
+ golomb
+ gplv3
+ h263dsp
+ h264chroma
+ h264dsp
+ h264parse
+ h264pred
+ h264qpel
+ hevcparse
+ hpeldsp
+ huffman
+ huffyuvdsp
+ huffyuvencdsp
+ idctdsp
+ iirfilter
+ mdct15
+ intrax8
+ iso_media
+ ividsp
+ jpegtables
+ lgplv3
+ libx262
+ llauddsp
+ llviddsp
+ llvidencdsp
+ lpc
+ lzf
+ me_cmp
+ mpeg_er
+ mpegaudio
+ mpegaudiodsp
+ mpegaudioheader
+ mpegvideo
+ mpegvideoenc
+ mss34dsp
+ pixblockdsp
+ qpeldsp
+ qsv
+ qsvdec
+ qsvenc
+ qsvvpp
+ rangecoder
+ riffdec
+ riffenc
+ rtpdec
+ rtpenc_chain
+ rv34dsp
+ scene_sad
+ sinewin
+ snappy
+ srtp
+ startcode
+ texturedsp
+ texturedspenc
+ tpeldsp
+ vaapi_1
+ vaapi_encode
+ vc1dsp
+ videodsp
+ vp3dsp
+ vp56dsp
+ vp8dsp
+ wma_freqs
+ wmv2dsp
+"
+
+CMDLINE_SELECT="
+ $ARCH_EXT_LIST
+ $CONFIG_LIST
+ $HAVE_LIST_CMDLINE
+ $THREADS_LIST
+ asm
+ cross_compile
+ debug
+ extra_warnings
+ logging
+ lto
+ optimizations
+ rpath
+ stripping
+"
+
+PATHS_LIST="
+ bindir
+ datadir
+ docdir
+ incdir
+ libdir
+ mandir
+ pkgconfigdir
+ prefix
+ shlibdir
+ install_name_dir
+"
+
+CMDLINE_SET="
+ $PATHS_LIST
+ ar
+ arch
+ as
+ assert_level
+ build_suffix
+ cc
+ objcc
+ cpu
+ cross_prefix
+ custom_allocator
+ cxx
+ dep_cc
+ doxygen
+ env
+ extra_version
+ gas
+ host_cc
+ host_cflags
+ host_extralibs
+ host_ld
+ host_ldflags
+ host_os
+ ignore_tests
+ install
+ ld
+ ln_s
+ logfile
+ malloc_prefix
+ nm
+ optflags
+ nvcc
+ nvccflags
+ pkg_config
+ pkg_config_flags
+ progs_suffix
+ random_seed
+ ranlib
+ samples
+ strip
+ sws_max_filter_size
+ sysinclude
+ sysroot
+ target_exec
+ target_os
+ target_path
+ target_samples
+ tempprefix
+ toolchain
+ valgrind
+ windres
+ x86asmexe
+"
+
+CMDLINE_APPEND="
+ extra_cflags
+ extra_cxxflags
+ extra_objcflags
+ host_cppflags
+"
+
+# code dependency declarations
+
+# architecture extensions
+
+armv5te_deps="arm"
+armv6_deps="arm"
+armv6t2_deps="arm"
+armv8_deps="aarch64"
+neon_deps_any="aarch64 arm"
+intrinsics_neon_deps="neon"
+vfp_deps_any="aarch64 arm"
+vfpv3_deps="vfp"
+setend_deps="arm"
+
+map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM
+
+altivec_deps="ppc"
+dcbzl_deps="ppc"
+ldbrx_deps="ppc"
+ppc4xx_deps="ppc"
+vsx_deps="altivec"
+power8_deps="vsx"
+
+loongson2_deps="mips"
+loongson3_deps="mips"
+mips32r2_deps="mips"
+mips32r5_deps="mips"
+mips32r6_deps="mips"
+mips64r2_deps="mips"
+mips64r6_deps="mips"
+mipsfpu_deps="mips"
+mipsdsp_deps="mips"
+mipsdspr2_deps="mips"
+mmi_deps_any="loongson2 loongson3"
+msa_deps="mipsfpu"
+msa2_deps="msa"
+
+cpunop_deps="i686"
+x86_64_select="i686"
+x86_64_suggest="fast_cmov"
+
+amd3dnow_deps="mmx"
+amd3dnowext_deps="amd3dnow"
+i686_deps="x86"
+mmx_deps="x86"
+mmxext_deps="mmx"
+sse_deps="mmxext"
+sse2_deps="sse"
+sse3_deps="sse2"
+ssse3_deps="sse3"
+sse4_deps="ssse3"
+sse42_deps="sse4"
+aesni_deps="sse42"
+avx_deps="sse42"
+xop_deps="avx"
+fma3_deps="avx"
+fma4_deps="avx"
+avx2_deps="avx"
+avx512_deps="avx2"
+
+mmx_external_deps="x86asm"
+mmx_inline_deps="inline_asm x86"
+mmx_suggest="mmx_external mmx_inline"
+
+for ext in $(filter_out mmx $ARCH_EXT_LIST_X86_SIMD); do
+ eval dep=\$${ext}_deps
+ eval ${ext}_external_deps='"${dep}_external"'
+ eval ${ext}_inline_deps='"${dep}_inline"'
+ eval ${ext}_suggest='"${ext}_external ${ext}_inline"'
+done
+
+aligned_stack_if_any="aarch64 ppc x86"
+fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
+fast_clz_if_any="aarch64 alpha avr32 mips ppc x86"
+fast_unaligned_if_any="aarch64 ppc x86"
+simd_align_16_if_any="altivec neon sse"
+simd_align_32_if_any="avx"
+simd_align_64_if_any="avx512"
+
+# system capabilities
+linux_perf_deps="linux_perf_event_h"
+symver_if_any="symver_asm_label symver_gnu_asm"
+valgrind_backtrace_conflict="optimizations"
+valgrind_backtrace_deps="valgrind_valgrind_h"
+
+# threading support
+atomics_gcc_if="sync_val_compare_and_swap"
+atomics_suncc_if="atomic_cas_ptr machine_rw_barrier"
+atomics_win32_if="MemoryBarrier"
+atomics_native_if_any="$ATOMICS_LIST"
+w32threads_deps="atomics_native"
+threads_if_any="$THREADS_LIST"
+
+# subsystems
+cbs_av1_select="cbs"
+cbs_h264_select="cbs"
+cbs_h265_select="cbs"
+cbs_jpeg_select="cbs"
+cbs_mpeg2_select="cbs"
+cbs_vp9_select="cbs"
+dct_select="rdft"
+dirac_parse_select="golomb"
+dnn_suggest="libtensorflow libopenvino"
+dnn_deps="swscale"
+error_resilience_select="me_cmp"
+faandct_deps="faan"
+faandct_select="fdctdsp"
+faanidct_deps="faan"
+faanidct_select="idctdsp"
+h264dsp_select="startcode"
+hevcparse_select="atsc_a53 golomb"
+frame_thread_encoder_deps="encoders threads"
+intrax8_select="blockdsp idctdsp"
+mdct_select="fft"
+mdct15_select="fft"
+me_cmp_select="fdctdsp idctdsp pixblockdsp"
+mpeg_er_select="error_resilience"
+mpegaudio_select="mpegaudiodsp mpegaudioheader"
+mpegaudiodsp_select="dct"
+mpegvideo_select="blockdsp h264chroma hpeldsp idctdsp me_cmp mpeg_er videodsp"
+mpegvideoenc_select="aandcttables me_cmp mpegvideo pixblockdsp qpeldsp"
+vc1dsp_select="h264chroma qpeldsp startcode"
+rdft_select="fft"
+
+# decoders / encoders
+aac_decoder_select="adts_header mdct15 mdct sinewin"
+aac_fixed_decoder_select="adts_header mdct"
+aac_encoder_select="audio_frame_queue iirfilter lpc mdct sinewin"
+aac_latm_decoder_select="aac_decoder aac_latm_parser"
+ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert mdct"
+ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp mdct"
+ac3_encoder_select="ac3dsp audiodsp mdct me_cmp"
+ac3_fixed_encoder_select="ac3dsp audiodsp mdct me_cmp"
+acelp_kelvin_decoder_select="audiodsp"
+adpcm_g722_decoder_select="g722dsp"
+adpcm_g722_encoder_select="g722dsp"
+aic_decoder_select="golomb idctdsp"
+alac_encoder_select="lpc"
+als_decoder_select="bswapdsp"
+amrnb_decoder_select="lsp"
+amrwb_decoder_select="lsp"
+amv_decoder_select="sp5x_decoder exif"
+amv_encoder_select="jpegtables mpegvideoenc"
+ape_decoder_select="bswapdsp llauddsp"
+apng_decoder_deps="zlib"
+apng_encoder_deps="zlib"
+apng_encoder_select="llvidencdsp"
+aptx_decoder_select="audio_frame_queue"
+aptx_encoder_select="audio_frame_queue"
+aptx_hd_decoder_select="audio_frame_queue"
+aptx_hd_encoder_select="audio_frame_queue"
+asv1_decoder_select="blockdsp bswapdsp idctdsp"
+asv1_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp"
+asv2_decoder_select="blockdsp bswapdsp idctdsp"
+asv2_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp"
+atrac1_decoder_select="mdct sinewin"
+atrac3_decoder_select="mdct"
+atrac3al_decoder_select="mdct"
+atrac3p_decoder_select="mdct sinewin"
+atrac3pal_decoder_select="mdct sinewin"
+atrac9_decoder_select="mdct"
+av1_decoder_select="cbs_av1"
+bink_decoder_select="blockdsp hpeldsp"
+binkaudio_dct_decoder_select="mdct rdft dct sinewin wma_freqs"
+binkaudio_rdft_decoder_select="mdct rdft sinewin wma_freqs"
+cavs_decoder_select="blockdsp golomb h264chroma idctdsp qpeldsp videodsp"
+clearvideo_decoder_select="idctdsp"
+cllc_decoder_select="bswapdsp"
+comfortnoise_encoder_select="lpc"
+cook_decoder_select="audiodsp mdct sinewin"
+cscd_decoder_select="lzo"
+cscd_decoder_suggest="zlib"
+dca_decoder_select="mdct"
+dca_encoder_select="mdct"
+dds_decoder_select="texturedsp"
+dirac_decoder_select="dirac_parse dwt golomb videodsp mpegvideoenc"
+dnxhd_decoder_select="blockdsp idctdsp"
+dnxhd_encoder_select="blockdsp fdctdsp idctdsp mpegvideoenc pixblockdsp"
+dolby_e_decoder_select="mdct"
+dvvideo_decoder_select="dvprofile idctdsp"
+dvvideo_encoder_select="dvprofile fdctdsp me_cmp pixblockdsp"
+dxa_decoder_deps="zlib"
+dxv_decoder_select="lzf texturedsp"
+eac3_decoder_select="ac3_decoder"
+eac3_encoder_select="ac3_encoder"
+eamad_decoder_select="aandcttables blockdsp bswapdsp idctdsp mpegvideo"
+eatgq_decoder_select="aandcttables"
+eatqi_decoder_select="aandcttables blockdsp bswapdsp idctdsp"
+exr_decoder_deps="zlib"
+exr_encoder_deps="zlib"
+ffv1_decoder_select="rangecoder"
+ffv1_encoder_select="rangecoder"
+ffvhuff_decoder_select="huffyuv_decoder"
+ffvhuff_encoder_select="huffyuv_encoder"
+fic_decoder_select="golomb"
+flac_decoder_select="flacdsp"
+flac_encoder_select="bswapdsp flacdsp lpc"
+flashsv2_decoder_deps="zlib"
+flashsv2_encoder_deps="zlib"
+flashsv_decoder_deps="zlib"
+flashsv_encoder_deps="zlib"
+flv_decoder_select="h263_decoder"
+flv_encoder_select="h263_encoder"
+fourxm_decoder_select="blockdsp bswapdsp"
+fraps_decoder_select="bswapdsp huffman"
+g2m_decoder_deps="zlib"
+g2m_decoder_select="blockdsp idctdsp jpegtables"
+g729_decoder_select="audiodsp"
+h261_decoder_select="mpegvideo"
+h261_encoder_select="mpegvideoenc"
+h263_decoder_select="h263_parser h263dsp mpegvideo qpeldsp"
+h263_encoder_select="h263dsp mpegvideoenc"
+h263i_decoder_select="h263_decoder"
+h263p_decoder_select="h263_decoder"
+h263p_encoder_select="h263_encoder"
+h264_decoder_select="atsc_a53 cabac golomb h264chroma h264dsp h264parse h264pred h264qpel videodsp"
+h264_decoder_suggest="error_resilience"
+hap_decoder_select="snappy texturedsp"
+hap_encoder_deps="libsnappy"
+hap_encoder_select="texturedspenc"
+hevc_decoder_select="atsc_a53 bswapdsp cabac golomb hevcparse videodsp"
+huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp"
+huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llvidencdsp"
+hymt_decoder_select="huffyuv_decoder"
+iac_decoder_select="imc_decoder"
+imc_decoder_select="bswapdsp fft mdct sinewin"
+imm4_decoder_select="bswapdsp"
+imm5_decoder_select="h264_decoder hevc_decoder"
+indeo3_decoder_select="hpeldsp"
+indeo4_decoder_select="ividsp"
+indeo5_decoder_select="ividsp"
+interplay_video_decoder_select="hpeldsp"
+ipu_decoder_select="mpegvideo"
+jpegls_decoder_select="mjpeg_decoder"
+jv_decoder_select="blockdsp"
+lagarith_decoder_select="llviddsp"
+ljpeg_encoder_select="idctdsp jpegtables"
+lscr_decoder_deps="zlib"
+magicyuv_decoder_select="llviddsp"
+magicyuv_encoder_select="llvidencdsp"
+mdec_decoder_select="blockdsp bswapdsp idctdsp mpegvideo"
+metasound_decoder_select="lsp mdct sinewin"
+mimic_decoder_select="blockdsp bswapdsp hpeldsp idctdsp"
+mjpeg_decoder_select="blockdsp hpeldsp exif idctdsp jpegtables"
+mjpeg_encoder_select="jpegtables mpegvideoenc"
+mjpegb_decoder_select="mjpeg_decoder"
+mlp_decoder_select="mlp_parser"
+mlp_encoder_select="lpc audio_frame_queue"
+mobiclip_decoder_select="bswapdsp golomb"
+motionpixels_decoder_select="bswapdsp"
+mp1_decoder_select="mpegaudio"
+mp1float_decoder_select="mpegaudio"
+mp2_decoder_select="mpegaudio"
+mp2float_decoder_select="mpegaudio"
+mp3_decoder_select="mpegaudio"
+mp3adu_decoder_select="mpegaudio"
+mp3adufloat_decoder_select="mpegaudio"
+mp3float_decoder_select="mpegaudio"
+mp3on4_decoder_select="mpegaudio"
+mp3on4float_decoder_select="mpegaudio"
+mpc7_decoder_select="bswapdsp mpegaudiodsp"
+mpc8_decoder_select="mpegaudiodsp"
+mpegvideo_decoder_select="mpegvideo"
+mpeg1video_decoder_select="mpegvideo"
+mpeg1video_encoder_select="mpegvideoenc h263dsp"
+mpeg2video_decoder_select="mpegvideo"
+mpeg2video_encoder_select="mpegvideoenc h263dsp"
+mpeg4_decoder_select="h263_decoder mpeg4video_parser"
+mpeg4_encoder_select="h263_encoder"
+msa1_decoder_select="mss34dsp"
+mscc_decoder_deps="zlib"
+msmpeg4v1_decoder_select="h263_decoder"
+msmpeg4v2_decoder_select="h263_decoder"
+msmpeg4v2_encoder_select="h263_encoder"
+msmpeg4v3_decoder_select="h263_decoder"
+msmpeg4v3_encoder_select="h263_encoder"
+mss2_decoder_select="mpegvideo qpeldsp vc1_decoder"
+mts2_decoder_select="jpegtables mss34dsp"
+mv30_decoder_select="aandcttables blockdsp"
+mvha_decoder_deps="zlib"
+mvha_decoder_select="llviddsp"
+mwsc_decoder_deps="zlib"
+mxpeg_decoder_select="mjpeg_decoder"
+nellymoser_decoder_select="mdct sinewin"
+nellymoser_encoder_select="audio_frame_queue mdct sinewin"
+notchlc_decoder_select="lzf"
+nuv_decoder_select="idctdsp lzo"
+on2avc_decoder_select="mdct"
+opus_decoder_deps="swresample"
+opus_decoder_select="mdct15"
+opus_encoder_select="audio_frame_queue mdct15"
+png_decoder_deps="zlib"
+png_encoder_deps="zlib"
+png_encoder_select="llvidencdsp"
+prores_decoder_select="blockdsp idctdsp"
+prores_encoder_select="fdctdsp"
+qcelp_decoder_select="lsp"
+qdm2_decoder_select="mdct rdft mpegaudiodsp"
+ra_144_decoder_select="audiodsp"
+ra_144_encoder_select="audio_frame_queue lpc audiodsp"
+ralf_decoder_select="golomb"
+rasc_decoder_deps="zlib"
+rawvideo_decoder_select="bswapdsp"
+rscc_decoder_deps="zlib"
+rtjpeg_decoder_select="me_cmp"
+rv10_decoder_select="h263_decoder"
+rv10_encoder_select="h263_encoder"
+rv20_decoder_select="h263_decoder"
+rv20_encoder_select="h263_encoder"
+rv30_decoder_select="golomb h264pred h264qpel mpegvideo rv34dsp"
+rv40_decoder_select="golomb h264pred h264qpel mpegvideo rv34dsp"
+screenpresso_decoder_deps="zlib"
+shorten_decoder_select="bswapdsp"
+sipr_decoder_select="lsp"
+smvjpeg_decoder_select="mjpeg_decoder"
+snow_decoder_select="dwt h264qpel hpeldsp me_cmp rangecoder videodsp"
+snow_encoder_select="dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder"
+sonic_decoder_select="golomb rangecoder"
+sonic_encoder_select="golomb rangecoder"
+sonic_ls_encoder_select="golomb rangecoder"
+sp5x_decoder_select="mjpeg_decoder"
+speedhq_decoder_select="mpegvideo"
+speedhq_encoder_select="mpegvideoenc"
+srgc_decoder_deps="zlib"
+svq1_decoder_select="hpeldsp"
+svq1_encoder_select="hpeldsp me_cmp mpegvideoenc"
+svq3_decoder_select="golomb h264dsp h264parse h264pred hpeldsp tpeldsp videodsp"
+svq3_decoder_suggest="zlib"
+tak_decoder_select="audiodsp"
+tdsc_decoder_deps="zlib"
+tdsc_decoder_select="mjpeg_decoder"
+theora_decoder_select="vp3_decoder"
+thp_decoder_select="mjpeg_decoder"
+tiff_decoder_select="mjpeg_decoder"
+tiff_decoder_suggest="zlib lzma"
+tiff_encoder_suggest="zlib"
+truehd_decoder_select="mlp_parser"
+truehd_encoder_select="lpc audio_frame_queue"
+truemotion2_decoder_select="bswapdsp"
+truespeech_decoder_select="bswapdsp"
+tscc_decoder_deps="zlib"
+twinvq_decoder_select="mdct lsp sinewin"
+txd_decoder_select="texturedsp"
+utvideo_decoder_select="bswapdsp llviddsp"
+utvideo_encoder_select="bswapdsp huffman llvidencdsp"
+vble_decoder_select="llviddsp"
+vc1_decoder_select="blockdsp h263_decoder h264qpel intrax8 mpegvideo vc1dsp"
+vc1image_decoder_select="vc1_decoder"
+vorbis_decoder_select="mdct"
+vorbis_encoder_select="audio_frame_queue mdct"
+vp3_decoder_select="hpeldsp vp3dsp videodsp"
+vp4_decoder_select="vp3_decoder"
+vp5_decoder_select="h264chroma hpeldsp videodsp vp3dsp vp56dsp"
+vp6_decoder_select="h264chroma hpeldsp huffman videodsp vp3dsp vp56dsp"
+vp6a_decoder_select="vp6_decoder"
+vp6f_decoder_select="vp6_decoder"
+vp7_decoder_select="h264pred videodsp vp8dsp"
+vp8_decoder_select="h264pred videodsp vp8dsp"
+vp9_decoder_select="videodsp vp9_parser vp9_superframe_split_bsf"
+wcmv_decoder_deps="zlib"
+webp_decoder_select="vp8_decoder exif"
+wmalossless_decoder_select="llauddsp"
+wmapro_decoder_select="mdct sinewin wma_freqs"
+wmav1_decoder_select="mdct sinewin wma_freqs"
+wmav1_encoder_select="mdct sinewin wma_freqs"
+wmav2_decoder_select="mdct sinewin wma_freqs"
+wmav2_encoder_select="mdct sinewin wma_freqs"
+wmavoice_decoder_select="lsp rdft dct mdct sinewin"
+wmv1_decoder_select="h263_decoder"
+wmv1_encoder_select="h263_encoder"
+wmv2_decoder_select="blockdsp error_resilience h263_decoder idctdsp intrax8 videodsp wmv2dsp"
+wmv2_encoder_select="h263_encoder wmv2dsp"
+wmv3_decoder_select="vc1_decoder"
+wmv3image_decoder_select="wmv3_decoder"
+xma1_decoder_select="wmapro_decoder"
+xma2_decoder_select="wmapro_decoder"
+ylc_decoder_select="bswapdsp"
+zerocodec_decoder_deps="zlib"
+zlib_decoder_deps="zlib"
+zlib_encoder_deps="zlib"
+zmbv_decoder_deps="zlib"
+zmbv_encoder_deps="zlib"
+
+# hardware accelerators
+crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
+cuda_deps="ffnvcodec"
+cuvid_deps="ffnvcodec"
+d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext"
+dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32"
+ffnvcodec_deps_any="libdl LoadLibrary"
+nvdec_deps="ffnvcodec"
+vaapi_x11_deps="xlib"
+videotoolbox_hwaccel_deps="videotoolbox pthreads"
+videotoolbox_hwaccel_extralibs="-framework QuartzCore"
+xvmc_deps="X11_extensions_XvMClib_h"
+
+av1_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_AV1"
+av1_d3d11va_hwaccel_select="av1_decoder"
+av1_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_AV1"
+av1_d3d11va2_hwaccel_select="av1_decoder"
+av1_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_AV1"
+av1_dxva2_hwaccel_select="av1_decoder"
+av1_nvdec_hwaccel_deps="nvdec CUVIDAV1PICPARAMS"
+av1_nvdec_hwaccel_select="av1_decoder"
+av1_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferAV1_bit_depth_idx"
+av1_vaapi_hwaccel_select="av1_decoder"
+h263_vaapi_hwaccel_deps="vaapi"
+h263_vaapi_hwaccel_select="h263_decoder"
+h263_videotoolbox_hwaccel_deps="videotoolbox"
+h263_videotoolbox_hwaccel_select="h263_decoder"
+h264_d3d11va_hwaccel_deps="d3d11va"
+h264_d3d11va_hwaccel_select="h264_decoder"
+h264_d3d11va2_hwaccel_deps="d3d11va"
+h264_d3d11va2_hwaccel_select="h264_decoder"
+h264_dxva2_hwaccel_deps="dxva2"
+h264_dxva2_hwaccel_select="h264_decoder"
+h264_nvdec_hwaccel_deps="nvdec"
+h264_nvdec_hwaccel_select="h264_decoder"
+h264_vaapi_hwaccel_deps="vaapi"
+h264_vaapi_hwaccel_select="h264_decoder"
+h264_vdpau_hwaccel_deps="vdpau"
+h264_vdpau_hwaccel_select="h264_decoder"
+h264_videotoolbox_hwaccel_deps="videotoolbox"
+h264_videotoolbox_hwaccel_select="h264_decoder"
+hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC"
+hevc_d3d11va_hwaccel_select="hevc_decoder"
+hevc_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_HEVC"
+hevc_d3d11va2_hwaccel_select="hevc_decoder"
+hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC"
+hevc_dxva2_hwaccel_select="hevc_decoder"
+hevc_nvdec_hwaccel_deps="nvdec"
+hevc_nvdec_hwaccel_select="hevc_decoder"
+hevc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferHEVC"
+hevc_vaapi_hwaccel_select="hevc_decoder"
+hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC"
+hevc_vdpau_hwaccel_select="hevc_decoder"
+hevc_videotoolbox_hwaccel_deps="videotoolbox"
+hevc_videotoolbox_hwaccel_select="hevc_decoder"
+mjpeg_nvdec_hwaccel_deps="nvdec"
+mjpeg_nvdec_hwaccel_select="mjpeg_decoder"
+mjpeg_vaapi_hwaccel_deps="vaapi"
+mjpeg_vaapi_hwaccel_select="mjpeg_decoder"
+mpeg_xvmc_hwaccel_deps="xvmc"
+mpeg_xvmc_hwaccel_select="mpeg2video_decoder"
+mpeg1_nvdec_hwaccel_deps="nvdec"
+mpeg1_nvdec_hwaccel_select="mpeg1video_decoder"
+mpeg1_vdpau_hwaccel_deps="vdpau"
+mpeg1_vdpau_hwaccel_select="mpeg1video_decoder"
+mpeg1_videotoolbox_hwaccel_deps="videotoolbox"
+mpeg1_videotoolbox_hwaccel_select="mpeg1video_decoder"
+mpeg1_xvmc_hwaccel_deps="xvmc"
+mpeg1_xvmc_hwaccel_select="mpeg1video_decoder"
+mpeg2_d3d11va_hwaccel_deps="d3d11va"
+mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder"
+mpeg2_d3d11va2_hwaccel_deps="d3d11va"
+mpeg2_d3d11va2_hwaccel_select="mpeg2video_decoder"
+mpeg2_dxva2_hwaccel_deps="dxva2"
+mpeg2_dxva2_hwaccel_select="mpeg2video_decoder"
+mpeg2_nvdec_hwaccel_deps="nvdec"
+mpeg2_nvdec_hwaccel_select="mpeg2video_decoder"
+mpeg2_vaapi_hwaccel_deps="vaapi"
+mpeg2_vaapi_hwaccel_select="mpeg2video_decoder"
+mpeg2_vdpau_hwaccel_deps="vdpau"
+mpeg2_vdpau_hwaccel_select="mpeg2video_decoder"
+mpeg2_videotoolbox_hwaccel_deps="videotoolbox"
+mpeg2_videotoolbox_hwaccel_select="mpeg2video_decoder"
+mpeg2_xvmc_hwaccel_deps="xvmc"
+mpeg2_xvmc_hwaccel_select="mpeg2video_decoder"
+mpeg4_nvdec_hwaccel_deps="nvdec"
+mpeg4_nvdec_hwaccel_select="mpeg4_decoder"
+mpeg4_vaapi_hwaccel_deps="vaapi"
+mpeg4_vaapi_hwaccel_select="mpeg4_decoder"
+mpeg4_vdpau_hwaccel_deps="vdpau"
+mpeg4_vdpau_hwaccel_select="mpeg4_decoder"
+mpeg4_videotoolbox_hwaccel_deps="videotoolbox"
+mpeg4_videotoolbox_hwaccel_select="mpeg4_decoder"
+vc1_d3d11va_hwaccel_deps="d3d11va"
+vc1_d3d11va_hwaccel_select="vc1_decoder"
+vc1_d3d11va2_hwaccel_deps="d3d11va"
+vc1_d3d11va2_hwaccel_select="vc1_decoder"
+vc1_dxva2_hwaccel_deps="dxva2"
+vc1_dxva2_hwaccel_select="vc1_decoder"
+vc1_nvdec_hwaccel_deps="nvdec"
+vc1_nvdec_hwaccel_select="vc1_decoder"
+vc1_vaapi_hwaccel_deps="vaapi"
+vc1_vaapi_hwaccel_select="vc1_decoder"
+vc1_vdpau_hwaccel_deps="vdpau"
+vc1_vdpau_hwaccel_select="vc1_decoder"
+vp8_nvdec_hwaccel_deps="nvdec"
+vp8_nvdec_hwaccel_select="vp8_decoder"
+vp8_vaapi_hwaccel_deps="vaapi"
+vp8_vaapi_hwaccel_select="vp8_decoder"
+vp9_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_VP9"
+vp9_d3d11va_hwaccel_select="vp9_decoder"
+vp9_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_VP9"
+vp9_d3d11va2_hwaccel_select="vp9_decoder"
+vp9_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_VP9"
+vp9_dxva2_hwaccel_select="vp9_decoder"
+vp9_nvdec_hwaccel_deps="nvdec"
+vp9_nvdec_hwaccel_select="vp9_decoder"
+vp9_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferVP9_bit_depth"
+vp9_vaapi_hwaccel_select="vp9_decoder"
+vp9_vdpau_hwaccel_deps="vdpau VdpPictureInfoVP9"
+vp9_vdpau_hwaccel_select="vp9_decoder"
+wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel"
+wmv3_d3d11va2_hwaccel_select="vc1_d3d11va2_hwaccel"
+wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel"
+wmv3_nvdec_hwaccel_select="vc1_nvdec_hwaccel"
+wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel"
+wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel"
+
+# hardware-accelerated codecs
+mediafoundation_deps="mftransform_h MFCreateAlignedMemoryBuffer"
+mediafoundation_extralibs="-lmfplat -lmfuuid -lole32 -lstrmiids"
+omx_deps="libdl pthreads"
+omx_rpi_select="omx"
+qsv_deps="libmfx"
+qsvdec_select="qsv"
+qsvenc_select="qsv"
+qsvvpp_select="qsv"
+vaapi_encode_deps="vaapi"
+v4l2_m2m_deps="linux_videodev2_h sem_timedwait"
+
+hwupload_cuda_filter_deps="ffnvcodec"
+scale_npp_filter_deps="ffnvcodec libnpp"
+scale_cuda_filter_deps="ffnvcodec"
+scale_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
+thumbnail_cuda_filter_deps="ffnvcodec"
+thumbnail_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
+transpose_npp_filter_deps="ffnvcodec libnpp"
+overlay_cuda_filter_deps="ffnvcodec"
+overlay_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
+
+amf_deps_any="libdl LoadLibrary"
+nvenc_deps="ffnvcodec"
+nvenc_deps_any="libdl LoadLibrary"
+nvenc_encoder_deps="nvenc"
+
+aac_mf_encoder_deps="mediafoundation"
+ac3_mf_encoder_deps="mediafoundation"
+av1_cuvid_decoder_deps="cuvid CUVIDAV1PICPARAMS"
+h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m"
+h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m"
+h264_amf_encoder_deps="amf"
+h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser"
+h264_cuvid_decoder_deps="cuvid"
+h264_cuvid_decoder_select="h264_mp4toannexb_bsf"
+h264_mediacodec_decoder_deps="mediacodec"
+h264_mediacodec_decoder_select="h264_mp4toannexb_bsf h264_parser"
+h264_mf_encoder_deps="mediafoundation"
+h264_mmal_decoder_deps="mmal"
+h264_nvenc_encoder_deps="nvenc"
+h264_nvenc_encoder_select="atsc_a53"
+h264_omx_encoder_deps="omx"
+h264_qsv_decoder_select="h264_mp4toannexb_bsf qsvdec"
+h264_qsv_encoder_select="atsc_a53 qsvenc"
+h264_rkmpp_decoder_deps="rkmpp"
+h264_rkmpp_decoder_select="h264_mp4toannexb_bsf"
+h264_vaapi_encoder_select="cbs_h264 vaapi_encode"
+h264_v4l2m2m_decoder_deps="v4l2_m2m h264_v4l2_m2m"
+h264_v4l2m2m_decoder_select="h264_mp4toannexb_bsf"
+h264_v4l2m2m_encoder_deps="v4l2_m2m h264_v4l2_m2m"
+hevc_amf_encoder_deps="amf"
+hevc_cuvid_decoder_deps="cuvid"
+hevc_cuvid_decoder_select="hevc_mp4toannexb_bsf"
+hevc_mediacodec_decoder_deps="mediacodec"
+hevc_mediacodec_decoder_select="hevc_mp4toannexb_bsf hevc_parser"
+hevc_mf_encoder_deps="mediafoundation"
+hevc_nvenc_encoder_deps="nvenc"
+hevc_nvenc_encoder_select="atsc_a53"
+hevc_qsv_decoder_select="hevc_mp4toannexb_bsf qsvdec"
+hevc_qsv_encoder_select="hevcparse qsvenc"
+hevc_rkmpp_decoder_deps="rkmpp"
+hevc_rkmpp_decoder_select="hevc_mp4toannexb_bsf"
+hevc_vaapi_encoder_deps="VAEncPictureParameterBufferHEVC"
+hevc_vaapi_encoder_select="cbs_h265 vaapi_encode"
+hevc_v4l2m2m_decoder_deps="v4l2_m2m hevc_v4l2_m2m"
+hevc_v4l2m2m_decoder_select="hevc_mp4toannexb_bsf"
+hevc_v4l2m2m_encoder_deps="v4l2_m2m hevc_v4l2_m2m"
+mjpeg_cuvid_decoder_deps="cuvid"
+mjpeg_qsv_decoder_select="qsvdec"
+mjpeg_qsv_encoder_deps="libmfx"
+mjpeg_qsv_encoder_select="qsvenc"
+mjpeg_vaapi_encoder_deps="VAEncPictureParameterBufferJPEG"
+mjpeg_vaapi_encoder_select="cbs_jpeg jpegtables vaapi_encode"
+mp3_mf_encoder_deps="mediafoundation"
+mpeg1_cuvid_decoder_deps="cuvid"
+mpeg1_v4l2m2m_decoder_deps="v4l2_m2m mpeg1_v4l2_m2m"
+mpeg2_crystalhd_decoder_select="crystalhd"
+mpeg2_cuvid_decoder_deps="cuvid"
+mpeg2_mmal_decoder_deps="mmal"
+mpeg2_mediacodec_decoder_deps="mediacodec"
+mpeg2_qsv_decoder_select="qsvdec"
+mpeg2_qsv_encoder_select="qsvenc"
+mpeg2_vaapi_encoder_select="cbs_mpeg2 vaapi_encode"
+mpeg2_v4l2m2m_decoder_deps="v4l2_m2m mpeg2_v4l2_m2m"
+mpeg4_crystalhd_decoder_select="crystalhd"
+mpeg4_cuvid_decoder_deps="cuvid"
+mpeg4_mediacodec_decoder_deps="mediacodec"
+mpeg4_mmal_decoder_deps="mmal"
+mpeg4_omx_encoder_deps="omx"
+mpeg4_v4l2m2m_decoder_deps="v4l2_m2m mpeg4_v4l2_m2m"
+mpeg4_v4l2m2m_encoder_deps="v4l2_m2m mpeg4_v4l2_m2m"
+msmpeg4_crystalhd_decoder_select="crystalhd"
+nvenc_h264_encoder_select="h264_nvenc_encoder"
+nvenc_hevc_encoder_select="hevc_nvenc_encoder"
+vc1_crystalhd_decoder_select="crystalhd"
+vc1_cuvid_decoder_deps="cuvid"
+vc1_mmal_decoder_deps="mmal"
+vc1_qsv_decoder_select="qsvdec"
+vc1_v4l2m2m_decoder_deps="v4l2_m2m vc1_v4l2_m2m"
+vp8_cuvid_decoder_deps="cuvid"
+vp8_mediacodec_decoder_deps="mediacodec"
+vp8_qsv_decoder_select="qsvdec"
+vp8_rkmpp_decoder_deps="rkmpp"
+vp8_vaapi_encoder_deps="VAEncPictureParameterBufferVP8"
+vp8_vaapi_encoder_select="vaapi_encode"
+vp8_v4l2m2m_decoder_deps="v4l2_m2m vp8_v4l2_m2m"
+vp8_v4l2m2m_encoder_deps="v4l2_m2m vp8_v4l2_m2m"
+vp9_cuvid_decoder_deps="cuvid"
+vp9_mediacodec_decoder_deps="mediacodec"
+vp9_qsv_decoder_select="qsvdec"
+vp9_rkmpp_decoder_deps="rkmpp"
+vp9_vaapi_encoder_deps="VAEncPictureParameterBufferVP9"
+vp9_vaapi_encoder_select="vaapi_encode"
+vp9_qsv_encoder_deps="libmfx MFX_CODEC_VP9"
+vp9_qsv_encoder_select="qsvenc"
+vp9_v4l2m2m_decoder_deps="v4l2_m2m vp9_v4l2_m2m"
+wmv3_crystalhd_decoder_select="crystalhd"
+av1_qsv_decoder_select="qsvdec"
+
+# parsers
+aac_parser_select="adts_header"
+av1_parser_select="cbs_av1"
+h264_parser_select="atsc_a53 golomb h264dsp h264parse"
+hevc_parser_select="hevcparse"
+mpegaudio_parser_select="mpegaudioheader"
+mpegvideo_parser_select="mpegvideo"
+mpeg4video_parser_select="h263dsp mpegvideo qpeldsp"
+vc1_parser_select="vc1dsp"
+
+# bitstream_filters
+aac_adtstoasc_bsf_select="adts_header"
+av1_frame_merge_bsf_select="cbs_av1"
+av1_frame_split_bsf_select="cbs_av1"
+av1_metadata_bsf_select="cbs_av1"
+eac3_core_bsf_select="ac3_parser"
+filter_units_bsf_select="cbs"
+h264_metadata_bsf_deps="const_nan"
+h264_metadata_bsf_select="cbs_h264"
+h264_redundant_pps_bsf_select="cbs_h264"
+hevc_metadata_bsf_select="cbs_h265"
+mjpeg2jpeg_bsf_select="jpegtables"
+mpeg2_metadata_bsf_select="cbs_mpeg2"
+trace_headers_bsf_select="cbs"
+vp9_metadata_bsf_select="cbs_vp9"
+
+# external libraries
+aac_at_decoder_deps="audiotoolbox"
+aac_at_decoder_select="aac_adtstoasc_bsf"
+ac3_at_decoder_deps="audiotoolbox"
+ac3_at_decoder_select="ac3_parser"
+adpcm_ima_qt_at_decoder_deps="audiotoolbox"
+alac_at_decoder_deps="audiotoolbox"
+amr_nb_at_decoder_deps="audiotoolbox"
+avisynth_deps_any="libdl LoadLibrary"
+avisynth_demuxer_deps="avisynth"
+avisynth_demuxer_select="riffdec"
+eac3_at_decoder_deps="audiotoolbox"
+eac3_at_decoder_select="ac3_parser"
+gsm_ms_at_decoder_deps="audiotoolbox"
+ilbc_at_decoder_deps="audiotoolbox"
+mp1_at_decoder_deps="audiotoolbox"
+mp2_at_decoder_deps="audiotoolbox"
+mp3_at_decoder_deps="audiotoolbox"
+mp1_at_decoder_select="mpegaudioheader"
+mp2_at_decoder_select="mpegaudioheader"
+mp3_at_decoder_select="mpegaudioheader"
+pcm_alaw_at_decoder_deps="audiotoolbox"
+pcm_mulaw_at_decoder_deps="audiotoolbox"
+qdmc_decoder_select="fft"
+qdmc_at_decoder_deps="audiotoolbox"
+qdm2_at_decoder_deps="audiotoolbox"
+aac_at_encoder_deps="audiotoolbox"
+aac_at_encoder_select="audio_frame_queue"
+alac_at_encoder_deps="audiotoolbox"
+alac_at_encoder_select="audio_frame_queue"
+ilbc_at_encoder_deps="audiotoolbox"
+ilbc_at_encoder_select="audio_frame_queue"
+pcm_alaw_at_encoder_deps="audiotoolbox"
+pcm_alaw_at_encoder_select="audio_frame_queue"
+pcm_mulaw_at_encoder_deps="audiotoolbox"
+pcm_mulaw_at_encoder_select="audio_frame_queue"
+chromaprint_muxer_deps="chromaprint"
+h264_videotoolbox_encoder_deps="pthreads"
+h264_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder"
+hevc_videotoolbox_encoder_deps="pthreads"
+hevc_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder"
+libaom_av1_decoder_deps="libaom"
+libaom_av1_encoder_deps="libaom"
+libaom_av1_encoder_select="extract_extradata_bsf"
+libaribb24_decoder_deps="libaribb24"
+libcelt_decoder_deps="libcelt"
+libcodec2_decoder_deps="libcodec2"
+libcodec2_encoder_deps="libcodec2"
+libdav1d_decoder_deps="libdav1d"
+libdav1d_decoder_select="atsc_a53"
+libdavs2_decoder_deps="libdavs2"
+libfdk_aac_decoder_deps="libfdk_aac"
+libfdk_aac_encoder_deps="libfdk_aac"
+libfdk_aac_encoder_select="audio_frame_queue"
+libgme_demuxer_deps="libgme"
+libgsm_decoder_deps="libgsm"
+libgsm_encoder_deps="libgsm"
+libgsm_ms_decoder_deps="libgsm"
+libgsm_ms_encoder_deps="libgsm"
+libilbc_decoder_deps="libilbc"
+libilbc_encoder_deps="libilbc"
+libkvazaar_encoder_deps="libkvazaar"
+libmodplug_demuxer_deps="libmodplug"
+libmp3lame_encoder_deps="libmp3lame"
+libmp3lame_encoder_select="audio_frame_queue mpegaudioheader"
+libopencore_amrnb_decoder_deps="libopencore_amrnb"
+libopencore_amrnb_encoder_deps="libopencore_amrnb"
+libopencore_amrnb_encoder_select="audio_frame_queue"
+libopencore_amrwb_decoder_deps="libopencore_amrwb"
+libopenh264_decoder_deps="libopenh264"
+libopenh264_decoder_select="h264_mp4toannexb_bsf"
+libopenh264_encoder_deps="libopenh264"
+libopenjpeg_decoder_deps="libopenjpeg"
+libopenjpeg_encoder_deps="libopenjpeg"
+libopenmpt_demuxer_deps="libopenmpt"
+libopus_decoder_deps="libopus"
+libopus_encoder_deps="libopus"
+libopus_encoder_select="audio_frame_queue"
+librav1e_encoder_deps="librav1e"
+librav1e_encoder_select="extract_extradata_bsf"
+librsvg_decoder_deps="librsvg"
+libshine_encoder_deps="libshine"
+libshine_encoder_select="audio_frame_queue"
+libspeex_decoder_deps="libspeex"
+libspeex_encoder_deps="libspeex"
+libspeex_encoder_select="audio_frame_queue"
+libsvtav1_encoder_deps="libsvtav1"
+libtheora_encoder_deps="libtheora"
+libtwolame_encoder_deps="libtwolame"
+libuavs3d_decoder_deps="libuavs3d"
+libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
+libvorbis_decoder_deps="libvorbis"
+libvorbis_encoder_deps="libvorbis libvorbisenc"
+libvorbis_encoder_select="audio_frame_queue"
+libvpx_vp8_decoder_deps="libvpx"
+libvpx_vp8_encoder_deps="libvpx"
+libvpx_vp9_decoder_deps="libvpx"
+libvpx_vp9_encoder_deps="libvpx"
+libwebp_encoder_deps="libwebp"
+libwebp_anim_encoder_deps="libwebp"
+libx262_encoder_deps="libx262"
+libx264_encoder_deps="libx264"
+libx264_encoder_select="atsc_a53"
+libx264rgb_encoder_deps="libx264 x264_csp_bgr"
+libx264rgb_encoder_select="libx264_encoder"
+libx265_encoder_deps="libx265"
+libxavs_encoder_deps="libxavs"
+libxavs2_encoder_deps="libxavs2"
+libxvid_encoder_deps="libxvid"
+libzvbi_teletext_decoder_deps="libzvbi"
+vapoursynth_demuxer_deps="vapoursynth"
+videotoolbox_suggest="coreservices"
+videotoolbox_deps="corefoundation coremedia corevideo"
+videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrames"
+
+# demuxers / muxers
+ac3_demuxer_select="ac3_parser"
+act_demuxer_select="riffdec"
+aiff_muxer_select="iso_media"
+asf_demuxer_select="riffdec"
+asf_o_demuxer_select="riffdec"
+asf_muxer_select="riffenc"
+asf_stream_muxer_select="asf_muxer"
+av1_demuxer_select="av1_frame_merge_bsf av1_parser"
+avi_demuxer_select="riffdec exif"
+avi_muxer_select="riffenc"
+caf_demuxer_select="iso_media"
+caf_muxer_select="iso_media"
+dash_muxer_select="mp4_muxer"
+dash_demuxer_deps="libxml2"
+dirac_demuxer_select="dirac_parser"
+dts_demuxer_select="dca_parser"
+dtshd_demuxer_select="dca_parser"
+dv_demuxer_select="dvprofile"
+dv_muxer_select="dvprofile"
+dxa_demuxer_select="riffdec"
+eac3_demuxer_select="ac3_parser"
+f4v_muxer_select="mov_muxer"
+fifo_muxer_deps="threads"
+flac_demuxer_select="flac_parser"
+flv_muxer_select="aac_adtstoasc_bsf"
+gxf_muxer_select="pcm_rechunk_bsf"
+hds_muxer_select="flv_muxer"
+hls_muxer_select="mpegts_muxer"
+hls_muxer_suggest="gcrypt openssl"
+image2_alias_pix_demuxer_select="image2_demuxer"
+image2_brender_pix_demuxer_select="image2_demuxer"
+ipod_muxer_select="mov_muxer"
+ismv_muxer_select="mov_muxer"
+ivf_muxer_select="av1_metadata_bsf vp9_superframe_bsf"
+latm_muxer_select="aac_adtstoasc_bsf"
+matroska_audio_muxer_select="matroska_muxer"
+matroska_demuxer_select="riffdec"
+matroska_demuxer_suggest="bzlib lzo zlib"
+matroska_muxer_select="riffenc vp9_superframe_bsf aac_adtstoasc_bsf"
+mlp_demuxer_select="mlp_parser"
+mmf_muxer_select="riffenc"
+mov_demuxer_select="iso_media riffdec"
+mov_demuxer_suggest="zlib"
+mov_muxer_select="iso_media riffenc rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf"
+mp3_demuxer_select="mpegaudio_parser"
+mp3_muxer_select="mpegaudioheader"
+mp4_muxer_select="mov_muxer"
+mpegts_demuxer_select="iso_media"
+mpegts_muxer_select="ac3_parser adts_muxer latm_muxer h264_mp4toannexb_bsf hevc_mp4toannexb_bsf"
+mpegtsraw_demuxer_select="mpegts_demuxer"
+mxf_muxer_select="golomb pcm_rechunk_bsf"
+mxf_d10_muxer_select="mxf_muxer"
+mxf_opatom_muxer_select="mxf_muxer"
+nut_muxer_select="riffenc"
+nuv_demuxer_select="riffdec"
+obu_demuxer_select="av1_frame_merge_bsf av1_parser"
+oga_muxer_select="ogg_muxer"
+ogg_demuxer_select="dirac_parse"
+ogv_muxer_select="ogg_muxer"
+opus_muxer_select="ogg_muxer"
+psp_muxer_select="mov_muxer"
+rtp_demuxer_select="sdp_demuxer"
+rtp_muxer_select="golomb jpegtables"
+rtp_mpegts_muxer_select="mpegts_muxer rtp_muxer"
+rtpdec_select="asf_demuxer jpegtables mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol srtp"
+rtsp_demuxer_select="http_protocol rtpdec"
+rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol rtpenc_chain"
+sap_demuxer_select="sdp_demuxer"
+sap_muxer_select="rtp_muxer rtp_protocol rtpenc_chain"
+sdp_demuxer_select="rtpdec"
+smoothstreaming_muxer_select="ismv_muxer"
+spdif_demuxer_select="adts_header"
+spdif_muxer_select="adts_header"
+spx_muxer_select="ogg_muxer"
+swf_demuxer_suggest="zlib"
+tak_demuxer_select="tak_parser"
+truehd_demuxer_select="mlp_parser"
+tg2_muxer_select="mov_muxer"
+tgp_muxer_select="mov_muxer"
+vobsub_demuxer_select="mpegps_demuxer"
+w64_demuxer_select="wav_demuxer"
+w64_muxer_select="wav_muxer"
+wav_demuxer_select="riffdec"
+wav_muxer_select="riffenc"
+webm_chunk_muxer_select="webm_muxer"
+webm_muxer_select="riffenc"
+webm_dash_manifest_demuxer_select="matroska_demuxer"
+wtv_demuxer_select="mpegts_demuxer riffdec"
+wtv_muxer_select="mpegts_muxer riffenc"
+xmv_demuxer_select="riffdec"
+xwma_demuxer_select="riffdec"
+
+# indevs / outdevs
+android_camera_indev_deps="android camera2ndk mediandk pthreads"
+android_camera_indev_extralibs="-landroid -lcamera2ndk -lmediandk"
+alsa_indev_deps="alsa"
+alsa_outdev_deps="alsa"
+avfoundation_indev_deps="avfoundation corevideo coremedia pthreads"
+avfoundation_indev_suggest="coregraphics applicationservices"
+avfoundation_indev_extralibs="-framework Foundation"
+audiotoolbox_outdev_deps="audiotoolbox pthreads"
+audiotoolbox_outdev_extralibs="-framework AudioToolbox -framework CoreAudio"
+bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
+caca_outdev_deps="libcaca"
+decklink_deps_any="libdl LoadLibrary"
+decklink_indev_deps="decklink threads"
+decklink_indev_extralibs="-lstdc++"
+decklink_outdev_deps="decklink threads"
+decklink_outdev_suggest="libklvanc"
+decklink_outdev_extralibs="-lstdc++"
+dshow_indev_deps="IBaseFilter"
+dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid -loleaut32 -lshlwapi"
+fbdev_indev_deps="linux_fb_h"
+fbdev_outdev_deps="linux_fb_h"
+gdigrab_indev_deps="CreateDIBSection"
+gdigrab_indev_extralibs="-lgdi32"
+gdigrab_indev_select="bmp_decoder"
+iec61883_indev_deps="libiec61883"
+jack_indev_deps="libjack"
+jack_indev_deps_any="sem_timedwait dispatch_dispatch_h"
+kmsgrab_indev_deps="libdrm"
+lavfi_indev_deps="avfilter"
+libcdio_indev_deps="libcdio"
+libdc1394_indev_deps="libdc1394"
+openal_indev_deps="openal"
+opengl_outdev_deps="opengl"
+opengl_outdev_suggest="sdl2"
+oss_indev_deps_any="sys_soundcard_h"
+oss_outdev_deps_any="sys_soundcard_h"
+pulse_indev_deps="libpulse"
+pulse_outdev_deps="libpulse"
+sdl2_outdev_deps="sdl2"
+sndio_indev_deps="sndio"
+sndio_outdev_deps="sndio"
+v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
+v4l2_indev_suggest="libv4l2"
+v4l2_outdev_deps_any="linux_videodev2_h sys_videoio_h"
+v4l2_outdev_suggest="libv4l2"
+vfwcap_indev_deps="vfw32 vfwcap_defines"
+xcbgrab_indev_deps="libxcb"
+xcbgrab_indev_suggest="libxcb_shm libxcb_shape libxcb_xfixes"
+xv_outdev_deps="xlib"
+
+# protocols
+async_protocol_deps="threads"
+bluray_protocol_deps="libbluray"
+ffrtmpcrypt_protocol_conflict="librtmp_protocol"
+ffrtmpcrypt_protocol_deps_any="gcrypt gmp openssl mbedtls"
+ffrtmpcrypt_protocol_select="tcp_protocol"
+ffrtmphttp_protocol_conflict="librtmp_protocol"
+ffrtmphttp_protocol_select="http_protocol"
+ftp_protocol_select="tcp_protocol"
+gopher_protocol_select="tcp_protocol"
+gophers_protocol_select="tls_protocol"
+http_protocol_select="tcp_protocol"
+http_protocol_suggest="zlib"
+httpproxy_protocol_select="tcp_protocol"
+httpproxy_protocol_suggest="zlib"
+https_protocol_select="tls_protocol"
+https_protocol_suggest="zlib"
+icecast_protocol_select="http_protocol"
+mmsh_protocol_select="http_protocol"
+mmst_protocol_select="network"
+rtmp_protocol_conflict="librtmp_protocol"
+rtmp_protocol_select="tcp_protocol"
+rtmp_protocol_suggest="zlib"
+rtmpe_protocol_select="ffrtmpcrypt_protocol"
+rtmpe_protocol_suggest="zlib"
+rtmps_protocol_conflict="librtmp_protocol"
+rtmps_protocol_select="tls_protocol"
+rtmps_protocol_suggest="zlib"
+rtmpt_protocol_select="ffrtmphttp_protocol"
+rtmpt_protocol_suggest="zlib"
+rtmpte_protocol_select="ffrtmpcrypt_protocol ffrtmphttp_protocol"
+rtmpte_protocol_suggest="zlib"
+rtmpts_protocol_select="ffrtmphttp_protocol https_protocol"
+rtmpts_protocol_suggest="zlib"
+rtp_protocol_select="udp_protocol"
+schannel_conflict="openssl gnutls libtls mbedtls"
+sctp_protocol_deps="struct_sctp_event_subscribe struct_msghdr_msg_flags"
+sctp_protocol_select="network"
+securetransport_conflict="openssl gnutls libtls mbedtls"
+srtp_protocol_select="rtp_protocol srtp"
+tcp_protocol_select="network"
+tls_protocol_deps_any="gnutls openssl schannel securetransport libtls mbedtls"
+tls_protocol_select="tcp_protocol"
+udp_protocol_select="network"
+udplite_protocol_select="network"
+unix_protocol_deps="sys_un_h"
+unix_protocol_select="network"
+
+# external library protocols
+libamqp_protocol_deps="librabbitmq"
+libamqp_protocol_select="network"
+librist_protocol_deps="librist"
+librist_protocol_select="network"
+librtmp_protocol_deps="librtmp"
+librtmpe_protocol_deps="librtmp"
+librtmps_protocol_deps="librtmp"
+librtmpt_protocol_deps="librtmp"
+librtmpte_protocol_deps="librtmp"
+libsmbclient_protocol_deps="libsmbclient gplv3"
+libsrt_protocol_deps="libsrt"
+libsrt_protocol_select="network"
+libssh_protocol_deps="libssh"
+libtls_conflict="openssl gnutls mbedtls"
+libzmq_protocol_deps="libzmq"
+libzmq_protocol_select="network"
+
+# filters
+afftdn_filter_deps="avcodec"
+afftdn_filter_select="fft"
+afftfilt_filter_deps="avcodec"
+afftfilt_filter_select="fft"
+afir_filter_deps="avcodec"
+afir_filter_select="rdft"
+amovie_filter_deps="avcodec avformat"
+aresample_filter_deps="swresample"
+asoftclip_filter_deps="swresample"
+asr_filter_deps="pocketsphinx"
+ass_filter_deps="libass"
+atempo_filter_deps="avcodec"
+atempo_filter_select="rdft"
+avgblur_opencl_filter_deps="opencl"
+avgblur_vulkan_filter_deps="vulkan libglslang"
+azmq_filter_deps="libzmq"
+blackframe_filter_deps="gpl"
+bm3d_filter_deps="avcodec"
+bm3d_filter_select="dct"
+boxblur_filter_deps="gpl"
+boxblur_opencl_filter_deps="opencl gpl"
+bs2b_filter_deps="libbs2b"
+chromaber_vulkan_filter_deps="vulkan libglslang"
+colorkey_opencl_filter_deps="opencl"
+colormatrix_filter_deps="gpl"
+convolution_opencl_filter_deps="opencl"
+convolve_filter_deps="avcodec"
+convolve_filter_select="fft"
+coreimage_filter_deps="coreimage appkit"
+coreimage_filter_extralibs="-framework OpenGL"
+coreimagesrc_filter_deps="coreimage appkit"
+coreimagesrc_filter_extralibs="-framework OpenGL"
+cover_rect_filter_deps="avcodec avformat gpl"
+cropdetect_filter_deps="gpl"
+deconvolve_filter_deps="avcodec"
+deconvolve_filter_select="fft"
+deinterlace_qsv_filter_deps="libmfx"
+deinterlace_vaapi_filter_deps="vaapi"
+delogo_filter_deps="gpl"
+denoise_vaapi_filter_deps="vaapi"
+derain_filter_select="dnn"
+deshake_filter_select="pixelutils"
+deshake_opencl_filter_deps="opencl"
+dilation_opencl_filter_deps="opencl"
+dnn_processing_filter_select="dnn"
+drawtext_filter_deps="libfreetype"
+drawtext_filter_suggest="libfontconfig libfribidi"
+elbg_filter_deps="avcodec"
+eq_filter_deps="gpl"
+erosion_opencl_filter_deps="opencl"
+fftfilt_filter_deps="avcodec"
+fftfilt_filter_select="rdft"
+fftdnoiz_filter_deps="avcodec"
+fftdnoiz_filter_select="fft"
+find_rect_filter_deps="avcodec avformat gpl"
+firequalizer_filter_deps="avcodec"
+firequalizer_filter_select="rdft"
+flite_filter_deps="libflite"
+framerate_filter_select="scene_sad"
+freezedetect_filter_select="scene_sad"
+frei0r_filter_deps="frei0r libdl"
+frei0r_src_filter_deps="frei0r libdl"
+fspp_filter_deps="gpl"
+headphone_filter_select="fft"
+histeq_filter_deps="gpl"
+hqdn3d_filter_deps="gpl"
+interlace_filter_deps="gpl"
+kerndeint_filter_deps="gpl"
+ladspa_filter_deps="ladspa libdl"
+lensfun_filter_deps="liblensfun version3"
+lv2_filter_deps="lv2"
+mcdeint_filter_deps="avcodec gpl"
+movie_filter_deps="avcodec avformat"
+mpdecimate_filter_deps="gpl"
+mpdecimate_filter_select="pixelutils"
+minterpolate_filter_select="scene_sad"
+mptestsrc_filter_deps="gpl"
+negate_filter_deps="lut_filter"
+nlmeans_opencl_filter_deps="opencl"
+nnedi_filter_deps="gpl"
+ocr_filter_deps="libtesseract"
+ocv_filter_deps="libopencv"
+openclsrc_filter_deps="opencl"
+overlay_opencl_filter_deps="opencl"
+overlay_qsv_filter_deps="libmfx"
+overlay_qsv_filter_select="qsvvpp"
+overlay_vulkan_filter_deps="vulkan libglslang"
+owdenoise_filter_deps="gpl"
+pad_opencl_filter_deps="opencl"
+pan_filter_deps="swresample"
+perspective_filter_deps="gpl"
+phase_filter_deps="gpl"
+pp7_filter_deps="gpl"
+pp_filter_deps="gpl postproc"
+prewitt_opencl_filter_deps="opencl"
+procamp_vaapi_filter_deps="vaapi"
+program_opencl_filter_deps="opencl"
+pullup_filter_deps="gpl"
+removelogo_filter_deps="avcodec avformat swscale"
+repeatfields_filter_deps="gpl"
+resample_filter_deps="avresample"
+roberts_opencl_filter_deps="opencl"
+rubberband_filter_deps="librubberband"
+sab_filter_deps="gpl swscale"
+scale2ref_filter_deps="swscale"
+scale_filter_deps="swscale"
+scale_qsv_filter_deps="libmfx"
+scdet_filter_select="scene_sad"
+select_filter_select="scene_sad"
+sharpness_vaapi_filter_deps="vaapi"
+showcqt_filter_deps="avcodec avformat swscale"
+showcqt_filter_suggest="libfontconfig libfreetype"
+showcqt_filter_select="fft"
+showfreqs_filter_deps="avcodec"
+showfreqs_filter_select="fft"
+showspatial_filter_select="fft"
+showspectrum_filter_deps="avcodec"
+showspectrum_filter_select="fft"
+showspectrumpic_filter_deps="avcodec"
+showspectrumpic_filter_select="fft"
+signature_filter_deps="gpl avcodec avformat"
+sinc_filter_select="rdft"
+smartblur_filter_deps="gpl swscale"
+sobel_opencl_filter_deps="opencl"
+sofalizer_filter_deps="libmysofa avcodec"
+sofalizer_filter_select="fft"
+spectrumsynth_filter_deps="avcodec"
+spectrumsynth_filter_select="fft"
+spp_filter_deps="gpl avcodec"
+spp_filter_select="fft idctdsp fdctdsp me_cmp pixblockdsp"
+sr_filter_deps="avformat swscale"
+sr_filter_select="dnn"
+stereo3d_filter_deps="gpl"
+subtitles_filter_deps="avformat avcodec libass"
+super2xsai_filter_deps="gpl"
+pixfmts_super2xsai_test_deps="super2xsai_filter"
+superequalizer_filter_select="rdft"
+surround_filter_select="rdft"
+tinterlace_filter_deps="gpl"
+tinterlace_merge_test_deps="tinterlace_filter"
+tinterlace_pad_test_deps="tinterlace_filter"
+tonemap_filter_deps="const_nan"
+tonemap_vaapi_filter_deps="vaapi VAProcFilterParameterBufferHDRToneMapping"
+tonemap_opencl_filter_deps="opencl const_nan"
+transpose_opencl_filter_deps="opencl"
+transpose_vaapi_filter_deps="vaapi VAProcPipelineCaps_rotation_flags"
+unsharp_opencl_filter_deps="opencl"
+uspp_filter_deps="gpl avcodec"
+vaguedenoiser_filter_deps="gpl"
+vidstabdetect_filter_deps="libvidstab"
+vidstabtransform_filter_deps="libvidstab"
+libvmaf_filter_deps="libvmaf pthreads"
+zmq_filter_deps="libzmq"
+zoompan_filter_deps="swscale"
+zscale_filter_deps="libzimg const_nan"
+scale_vaapi_filter_deps="vaapi"
+scale_vulkan_filter_deps="vulkan libglslang"
+vpp_qsv_filter_deps="libmfx"
+vpp_qsv_filter_select="qsvvpp"
+xfade_opencl_filter_deps="opencl"
+yadif_cuda_filter_deps="ffnvcodec"
+yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
+
+# examples
+avio_list_dir_deps="avformat avutil"
+avio_reading_deps="avformat avcodec avutil"
+decode_audio_example_deps="avcodec avutil"
+decode_video_example_deps="avcodec avutil"
+demuxing_decoding_example_deps="avcodec avformat avutil"
+encode_audio_example_deps="avcodec avutil"
+encode_video_example_deps="avcodec avutil"
+extract_mvs_example_deps="avcodec avformat avutil"
+filter_audio_example_deps="avfilter avutil"
+filtering_audio_example_deps="avfilter avcodec avformat avutil"
+filtering_video_example_deps="avfilter avcodec avformat avutil"
+http_multiclient_example_deps="avformat avutil fork"
+hw_decode_example_deps="avcodec avformat avutil"
+metadata_example_deps="avformat avutil"
+muxing_example_deps="avcodec avformat avutil swscale"
+qsvdec_example_deps="avcodec avutil libmfx h264_qsv_decoder"
+remuxing_example_deps="avcodec avformat avutil"
+resampling_audio_example_deps="avutil swresample"
+scaling_video_example_deps="avutil swscale"
+transcode_aac_example_deps="avcodec avformat swresample"
+transcoding_example_deps="avfilter avcodec avformat avutil"
+vaapi_encode_example_deps="avcodec avutil h264_vaapi_encoder"
+vaapi_transcode_example_deps="avcodec avformat avutil h264_vaapi_encoder"
+
+# EXTRALIBS_LIST
+cpu_init_extralibs="pthreads_extralibs"
+cws2fws_extralibs="zlib_extralibs"
+
+# libraries, in any order
+avcodec_deps="avutil"
+avcodec_suggest="libm"
+avcodec_select="null_bsf"
+avdevice_deps="avformat avcodec avutil"
+avdevice_suggest="libm"
+avfilter_deps="avutil"
+avfilter_suggest="libm"
+avformat_deps="avcodec avutil"
+avformat_suggest="libm network zlib"
+avresample_deps="avutil"
+avresample_suggest="libm"
+avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt"
+postproc_deps="avutil gpl"
+postproc_suggest="libm"
+swresample_deps="avutil"
+swresample_suggest="libm libsoxr"
+swscale_deps="avutil"
+swscale_suggest="libm"
+
+avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs"
+avfilter_extralibs="pthreads_extralibs"
+avutil_extralibs="d3d11va_extralibs nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs"
+
+# programs
+ffmpeg_deps="avcodec avfilter avformat"
+ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter
+ hflip_filter null_filter
+ transpose_filter trim_filter vflip_filter"
+ffmpeg_suggest="ole32 psapi shell32"
+ffplay_deps="avcodec avformat swscale swresample sdl2"
+ffplay_select="rdft crop_filter transpose_filter hflip_filter vflip_filter rotate_filter"
+ffplay_suggest="shell32"
+ffprobe_deps="avcodec avformat"
+ffprobe_suggest="shell32"
+
+# documentation
+podpages_deps="perl"
+manpages_deps="perl pod2man"
+htmlpages_deps="perl"
+htmlpages_deps_any="makeinfo_html texi2html"
+txtpages_deps="perl makeinfo"
+doc_deps_any="manpages htmlpages podpages txtpages"
+
+# default parameters
+
+logfile="ffbuild/config.log"
+
+# installation paths
+prefix_default="/usr/local"
+bindir_default='${prefix}/bin'
+datadir_default='${prefix}/share/ffmpeg'
+docdir_default='${prefix}/share/doc/ffmpeg'
+incdir_default='${prefix}/include'
+libdir_default='${prefix}/lib'
+mandir_default='${prefix}/share/man'
+
+# toolchain
+ar_default="llvm-ar"
+cc_default="clang"
+cxx_default="clang++"
+host_cc_default="clang"
+doxygen_default="doxygen"
+install="install"
+ln_s_default="ln -s -f"
+nm_default="llvm-nm -g"
+pkg_config_default=pkg-config
+ranlib_default="llvm-ranlib"
+strip_default="llvm-strip"
+version_script='--version-script'
+objformat="elf32"
+x86asmexe_default="nasm"
+windres_default="windres"
+striptype="direct"
+
+# OS
+target_os_default=$(tolower $(uname -s))
+host_os=$target_os_default
+
+# machine
+if test "$target_os_default" = aix; then
+ arch_default=$(uname -p)
+ strip_default="strip -X32_64"
+ nm_default="nm -g -X32_64"
+else
+ arch_default=$(uname -m)
+fi
+cpu="generic"
+intrinsics="none"
+
+# configurable options
+enable $PROGRAM_LIST
+enable $DOCUMENT_LIST
+enable $EXAMPLE_LIST
+enable $(filter_out avresample $LIBRARY_LIST)
+enable stripping
+
+enable asm
+enable debug
+enable doc
+enable faan faandct faanidct
+enable large_tests
+enable optimizations
+enable runtime_cpudetect
+enable safe_bitstream_reader
+enable static
+enable swscale_alpha
+enable valgrind_backtrace
+
+sws_max_filter_size_default=256
+set_default sws_max_filter_size
+
+# internal components are enabled by default
+enable $EXTRALIBS_LIST
+
+# Avoid external, non-system, libraries getting enabled by dependency resolution
+disable $EXTERNAL_LIBRARY_LIST $HWACCEL_LIBRARY_LIST
+
+# build settings
+SHFLAGS='-shared -Wl,-soname,$$(@F)'
+LIBPREF="lib"
+LIBSUF=".a"
+FULLNAME='$(NAME)$(BUILDSUF)'
+LIBNAME='$(LIBPREF)$(FULLNAME)$(LIBSUF)'
+SLIBPREF="lib"
+SLIBSUF=".so"
+SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
+SLIBNAME_WITH_VERSION='$(SLIBNAME)'
+SLIBNAME_WITH_MAJOR='$(SLIBNAME)'
+LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
+SLIB_INSTALL_NAME='$(SLIBNAME)'
+VERSION_SCRIPT_POSTPROCESS_CMD="cat"
+
+asflags_filter=echo
+cflags_filter=echo
+ldflags_filter=echo
+
+AS_C='-c'
+AS_O='-o $@'
+CC_C='-c'
+CC_E='-E -o $@'
+CC_O='-o $@'
+CXX_C='-c'
+CXX_O='-o $@'
+OBJCC_C='-c'
+OBJCC_E='-E -o $@'
+OBJCC_O='-o $@'
+X86ASM_O='-o $@'
+LD_O='-o $@'
+LD_LIB='-l%'
+LD_PATH='-L'
+HOSTCC_C='-c'
+HOSTCC_E='-E -o $@'
+HOSTCC_O='-o $@'
+HOSTLD_O='-o $@'
+NVCC_C='-c'
+NVCC_O='-o $@'
+
+host_extralibs='-lm'
+host_cflags_filter=echo
+host_ldflags_filter=echo
+
+target_path='$(CURDIR)'
+
+# since the object filename is not given with the -MM flag, the compiler
+# is only able to print the basename, and we must add the path ourselves
+DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>/dev/null | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(@F),$(@D)/$(@F)," > $(@:.o=.d)'
+DEPFLAGS='-MM'
+
+mkdir -p ffbuild
+
+# find source path
+if test -f configure; then
+ source_path=.
+elif test -f src/configure; then
+ source_path=src
+else
+ source_path=$(cd $(dirname "$0"); pwd)
+ case "$source_path" in
+ *[[:blank:]]*) die "Out of tree builds are impossible with whitespace in source path." ;;
+ esac
+ test -e "$source_path/config.h" &&
+ die "Out of tree builds are impossible with config.h in source dir."
+fi
+
+for v in "$@"; do
+ r=${v#*=}
+ l=${v%"$r"}
+ r=$(sh_quote "$r")
+ FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}"
+done
+
+find_things_extern(){
+ thing=$1
+ pattern=$2
+ file=$source_path/$3
+ out=${4:-$thing}
+ sed -n "s/^[^#]*extern.*$pattern *ff_\([^ ]*\)_$thing;/\1_$out/p" "$file"
+}
+
+find_filters_extern(){
+ file=$source_path/$1
+ sed -n 's/^extern AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file
+}
+
+FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c)
+OUTDEV_LIST=$(find_things_extern muxer AVOutputFormat libavdevice/alldevices.c outdev)
+INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c indev)
+MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c)
+DEMUXER_LIST=$(find_things_extern demuxer AVInputFormat libavformat/allformats.c)
+ENCODER_LIST=$(find_things_extern encoder AVCodec libavcodec/allcodecs.c)
+DECODER_LIST=$(find_things_extern decoder AVCodec libavcodec/allcodecs.c)
+CODEC_LIST="
+ $ENCODER_LIST
+ $DECODER_LIST
+"
+PARSER_LIST=$(find_things_extern parser AVCodecParser libavcodec/parsers.c)
+BSF_LIST=$(find_things_extern bsf AVBitStreamFilter libavcodec/bitstream_filters.c)
+HWACCEL_LIST=$(find_things_extern hwaccel AVHWAccel libavcodec/hwaccels.h)
+PROTOCOL_LIST=$(find_things_extern protocol URLProtocol libavformat/protocols.c)
+
+AVCODEC_COMPONENTS_LIST="
+ $BSF_LIST
+ $DECODER_LIST
+ $ENCODER_LIST
+ $HWACCEL_LIST
+ $PARSER_LIST
+"
+
+AVDEVICE_COMPONENTS_LIST="
+ $INDEV_LIST
+ $OUTDEV_LIST
+"
+
+AVFILTER_COMPONENTS_LIST="
+ $FILTER_LIST
+"
+
+AVFORMAT_COMPONENTS_LIST="
+ $DEMUXER_LIST
+ $MUXER_LIST
+ $PROTOCOL_LIST
+"
+
+ALL_COMPONENTS="
+ $AVCODEC_COMPONENTS_LIST
+ $AVDEVICE_COMPONENTS_LIST
+ $AVFILTER_COMPONENTS_LIST
+ $AVFORMAT_COMPONENTS_LIST
+"
+
+for n in $COMPONENT_LIST; do
+ v=$(toupper ${n%s})_LIST
+ eval enable \$$v
+ eval ${n}_if_any="\$$v"
+done
+
+enable $ARCH_EXT_LIST
+
+die_unknown(){
+ echo "Unknown option \"$1\"."
+ echo "See $0 --help for available options."
+ exit 1
+}
+
+print_in_columns() {
+ tr ' ' '\n' | sort | tr '\r\n' ' ' | awk -v col_width=24 -v width="$ncols" '
+ {
+ num_cols = width > col_width ? int(width / col_width) : 1;
+ num_rows = int((NF + num_cols-1) / num_cols);
+ y = x = 1;
+ for (y = 1; y <= num_rows; y++) {
+ i = y;
+ for (x = 1; x <= num_cols; x++) {
+ if (i <= NF) {
+ line = sprintf("%s%-" col_width "s", line, $i);
+ }
+ i = i + num_rows;
+ }
+ print line; line = "";
+ }
+ }' | sed 's/ *$//'
+}
+
+show_list() {
+ suffix=_$1
+ shift
+ echo $* | sed s/$suffix//g | print_in_columns
+ exit 0
+}
+
+rand_list(){
+ IFS=', '
+ set -- $*
+ unset IFS
+ for thing; do
+ comp=${thing%:*}
+ prob=${thing#$comp}
+ prob=${prob#:}
+ is_in ${comp} $COMPONENT_LIST && eval comp=\$$(toupper ${comp%s})_LIST
+ echo "prob ${prob:-0.5}"
+ printf '%s\n' $comp
+ done
+}
+
+do_random(){
+ action=$1
+ shift
+ random_seed=$(awk "BEGIN { srand($random_seed); print srand() }")
+ $action $(rand_list "$@" | awk "BEGIN { srand($random_seed) } \$1 == \"prob\" { prob = \$2; next } rand() < prob { print }")
+}
+
+for opt do
+ optval="${opt#*=}"
+ case "$opt" in
+ --extra-ldflags=*)
+ add_ldflags $optval
+ ;;
+ --extra-ldexeflags=*)
+ add_ldexeflags $optval
+ ;;
+ --extra-ldsoflags=*)
+ add_ldsoflags $optval
+ ;;
+ --extra-ldlibflags=*)
+ warn "The --extra-ldlibflags option is only provided for compatibility and will be\n"\
+ "removed in the future. Use --extra-ldsoflags instead."
+ add_ldsoflags $optval
+ ;;
+ --extra-libs=*)
+ add_extralibs $optval
+ ;;
+ --disable-devices)
+ disable $INDEV_LIST $OUTDEV_LIST
+ ;;
+ --enable-debug=*)
+ debuglevel="$optval"
+ ;;
+ --disable-programs)
+ disable $PROGRAM_LIST
+ ;;
+ --disable-everything)
+ map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
+ ;;
+ --disable-all)
+ map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
+ disable $LIBRARY_LIST $PROGRAM_LIST doc
+ enable avutil
+ ;;
+ --enable-random|--disable-random)
+ action=${opt%%-random}
+ do_random ${action#--} $COMPONENT_LIST
+ ;;
+ --enable-random=*|--disable-random=*)
+ action=${opt%%-random=*}
+ do_random ${action#--} $optval
+ ;;
+ --enable-sdl)
+ enable sdl2
+ ;;
+ --enable-*=*|--disable-*=*)
+ eval $(echo "${opt%%=*}" | sed 's/--/action=/;s/-/ thing=/')
+ is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
+ eval list=\$$(toupper $thing)_LIST
+ name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
+ list=$(filter "$name" $list)
+ [ "$list" = "" ] && warn "Option $opt did not match anything"
+ test $action = enable && warn_if_gets_disabled $list
+ $action $list
+ ;;
+ --enable-yasm|--disable-yasm)
+ warn "The ${opt} option is only provided for compatibility and will be\n"\
+ "removed in the future. Use --enable-x86asm / --disable-x86asm instead."
+ test $opt = --enable-yasm && x86asm=yes || x86asm=no
+ ;;
+ --yasmexe=*)
+ warn "The --yasmexe option is only provided for compatibility and will be\n"\
+ "removed in the future. Use --x86asmexe instead."
+ x86asmexe="$optval"
+ ;;
+ --enable-?*|--disable-?*)
+ eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
+ if is_in $option $COMPONENT_LIST; then
+ test $action = disable && action=unset
+ eval $action \$$(toupper ${option%s})_LIST
+ elif is_in $option $CMDLINE_SELECT; then
+ $action $option
+ else
+ die_unknown $opt
+ fi
+ ;;
+ --list-*)
+ NAME="${opt#--list-}"
+ is_in $NAME $COMPONENT_LIST || die_unknown $opt
+ NAME=${NAME%s}
+ eval show_list $NAME \$$(toupper $NAME)_LIST
+ ;;
+ --help|-h) show_help
+ ;;
+ --quiet|-q) quiet=yes
+ ;;
+ --fatal-warnings) enable fatal_warnings
+ ;;
+ --libfuzzer=*)
+ libfuzzer_path="$optval"
+ ;;
+ *)
+ optname="${opt%%=*}"
+ optname="${optname#--}"
+ optname=$(echo "$optname" | sed 's/-/_/g')
+ if is_in $optname $CMDLINE_SET; then
+ eval $optname='$optval'
+ elif is_in $optname $CMDLINE_APPEND; then
+ append $optname "$optval"
+ else
+ die_unknown $opt
+ fi
+ ;;
+ esac
+done
+
+for e in $env; do
+ eval "export $e"
+done
+
+if disabled autodetect; then
+
+ # Unless iconv is explicitely disabled by the user, we still want to probe
+ # for the iconv from the libc.
+ disabled iconv || enable libc_iconv
+
+ disable_weak $EXTERNAL_AUTODETECT_LIBRARY_LIST
+ disable_weak $HWACCEL_AUTODETECT_LIBRARY_LIST
+fi
+# Mark specifically enabled, but normally autodetected libraries as requested.
+for lib in $AUTODETECT_LIBS; do
+ enabled $lib && request $lib
+done
+#TODO: switch to $AUTODETECT_LIBS when $THREADS_LIST is supported the same way
+enable_weak $EXTERNAL_AUTODETECT_LIBRARY_LIST
+enable_weak $HWACCEL_AUTODETECT_LIBRARY_LIST
+
+disabled logging && logfile=/dev/null
+
+# command line configuration sanity checks
+
+# we need to build at least one lib type
+if ! enabled_any static shared; then
+ cat < $logfile
+set >> $logfile
+
+test -n "$valgrind" && toolchain="valgrind-memcheck"
+
+enabled ossfuzz && ! echo $CFLAGS | grep -q -- "-fsanitize=" && ! echo $CFLAGS | grep -q -- "-fcoverage-mapping" &&{
+ add_cflags -fsanitize=address,undefined -fsanitize-coverage=trace-pc-guard,trace-cmp -fno-omit-frame-pointer
+ add_ldflags -fsanitize=address,undefined -fsanitize-coverage=trace-pc-guard,trace-cmp
+}
+
+case "$toolchain" in
+ *-asan)
+ cc_default="${toolchain%-asan}"
+ add_cflags -fsanitize=address
+ add_ldflags -fsanitize=address
+ ;;
+ *-msan)
+ cc_default="${toolchain%-msan}"
+ add_cflags -fsanitize=memory -fsanitize-memory-track-origins
+ add_ldflags -fsanitize=memory
+ ;;
+ *-tsan)
+ cc_default="${toolchain%-tsan}"
+ add_cflags -fsanitize=thread
+ add_ldflags -fsanitize=thread
+ case "$toolchain" in
+ gcc-tsan)
+ add_cflags -fPIC
+ add_ldflags -fPIC
+ ;;
+ esac
+ ;;
+ *-usan)
+ cc_default="${toolchain%-usan}"
+ add_cflags -fsanitize=undefined
+ add_ldflags -fsanitize=undefined
+ ;;
+ valgrind-*)
+ target_exec_default="valgrind"
+ case "$toolchain" in
+ valgrind-massif)
+ target_exec_args="--tool=massif --alloc-fn=av_malloc --alloc-fn=av_mallocz --alloc-fn=av_calloc --alloc-fn=av_fast_padded_malloc --alloc-fn=av_fast_malloc --alloc-fn=av_realloc_f --alloc-fn=av_fast_realloc --alloc-fn=av_realloc"
+ ;;
+ valgrind-memcheck)
+ target_exec_args="--error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp"
+ ;;
+ esac
+ ;;
+ msvc)
+ # Check whether the current MSVC version needs the C99 converter.
+ # From MSVC 2013 (compiler major version 18) onwards, it does actually
+ # support enough of C99 to build ffmpeg. Default to the new
+ # behaviour if the regexp was unable to match anything, since this
+ # successfully parses the version number of existing supported
+ # versions that require the converter (MSVC 2010 and 2012).
+ cl_major_ver=$(cl.exe 2>&1 | sed -n 's/.*Version \([[:digit:]]\{1,\}\)\..*/\1/p')
+ if [ -z "$cl_major_ver" ] || [ $cl_major_ver -ge 18 ]; then
+ cc_default="cl.exe"
+ cxx_default="cl.exe"
+ else
+ die "Unsupported MSVC version (2013 or newer required)"
+ fi
+ ld_default="$source_path/compat/windows/mslink"
+ nm_default="dumpbin.exe -symbols"
+ ar_default="lib.exe"
+ case "${arch:-$arch_default}" in
+ aarch64|arm64)
+ as_default="armasm64.exe"
+ ;;
+ arm*)
+ as_default="armasm.exe"
+ ;;
+ esac
+ target_os_default="win32"
+ # Use a relative path for TMPDIR. This makes sure all the
+ # ffconf temp files are written with a relative path, avoiding
+ # issues with msys/win32 path conversion for MSVC parameters
+ # such as -Fo or -out:.
+ TMPDIR=.
+ ;;
+ icl)
+ cc_default="icl"
+ ld_default="xilink"
+ nm_default="dumpbin -symbols"
+ ar_default="xilib"
+ target_os_default="win32"
+ TMPDIR=.
+ ;;
+ gcov)
+ add_cflags -fprofile-arcs -ftest-coverage
+ add_ldflags -fprofile-arcs -ftest-coverage
+ ;;
+ llvm-cov)
+ add_cflags -fprofile-arcs -ftest-coverage
+ add_ldflags --coverage
+ ;;
+ hardened)
+ add_cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+ add_cflags -fno-strict-overflow -fstack-protector-all
+ add_ldflags -Wl,-z,relro -Wl,-z,now
+ add_cflags -fPIE
+ add_ldexeflags -fPIE -pie
+ ;;
+ ?*)
+ die "Unknown toolchain $toolchain"
+ ;;
+esac
+
+if test -n "$cross_prefix"; then
+ test -n "$arch" && test -n "$target_os" ||
+ die "Must specify target arch (--arch) and OS (--target-os) when cross-compiling"
+ enable cross_compile
+fi
+
+set_default target_os
+if test "$target_os" = android; then
+ cc_default="clang"
+fi
+
+ar_default="${cross_prefix}${ar_default}"
+cc_default="${cross_prefix}${cc_default}"
+cxx_default="${cross_prefix}${cxx_default}"
+nm_default="${cross_prefix}${nm_default}"
+pkg_config_default="${cross_prefix}${pkg_config_default}"
+if ${cross_prefix}${ranlib_default} 2>&1 | grep -q "\-D "; then
+ ranlib_default="${cross_prefix}${ranlib_default} -D"
+else
+ ranlib_default="${cross_prefix}${ranlib_default}"
+fi
+strip_default="${cross_prefix}${strip_default}"
+windres_default="${cross_prefix}${windres_default}"
+
+sysinclude_default="${sysroot}/usr/include"
+
+if enabled cuda_sdk; then
+ warn "Option --enable-cuda-sdk is deprecated. Use --enable-cuda-nvcc instead."
+ enable cuda_nvcc
+fi
+
+if enabled cuda_nvcc; then
+ nvcc_default="nvcc"
+ nvccflags_default="-gencode arch=compute_30,code=sm_30 -O2"
+else
+ nvcc_default="clang"
+ nvccflags_default="--cuda-gpu-arch=sm_30 -O2"
+ NVCC_C=""
+fi
+
+set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \
+ target_exec x86asmexe nvcc
+enabled cross_compile || host_cc_default=$cc
+set_default host_cc
+
+pkg_config_fail_message=""
+if ! $pkg_config --version >/dev/null 2>&1; then
+ warn "$pkg_config not found, library detection may fail."
+ pkg_config=false
+elif is_in -static $cc $LDFLAGS && ! is_in --static $pkg_config $pkg_config_flags; then
+ pkg_config_fail_message="
+Note: When building a static binary, add --pkg-config-flags=\"--static\"."
+fi
+
+if test $doxygen != $doxygen_default && \
+ ! $doxygen --version >/dev/null 2>&1; then
+ warn "Specified doxygen \"$doxygen\" not found, API documentation will fail to build."
+fi
+
+exesuf() {
+ case $1 in
+ mingw32*|mingw64*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
+ esac
+}
+
+EXESUF=$(exesuf $target_os)
+HOSTEXESUF=$(exesuf $host_os)
+
+# set temporary file name
+: ${TMPDIR:=$TEMPDIR}
+: ${TMPDIR:=$TMP}
+: ${TMPDIR:=/tmp}
+
+if [ -n "$tempprefix" ] ; then
+ mktemp(){
+ tmpname="$tempprefix.${HOSTNAME}.${UID}"
+ echo "$tmpname"
+ mkdir "$tmpname"
+ }
+elif ! test_cmd mktemp -u XXXXXX; then
+ # simple replacement for missing mktemp
+ # NOT SAFE FOR GENERAL USE
+ mktemp(){
+ tmpname="${2%%XXX*}.${HOSTNAME}.${UID}.$$"
+ echo "$tmpname"
+ mkdir "$tmpname"
+ }
+fi
+
+FFTMPDIR=$(mktemp -d "${TMPDIR}/ffconf.XXXXXXXX" 2> /dev/null) ||
+ die "Unable to create temporary directory in $TMPDIR."
+
+tmpfile(){
+ tmp="${FFTMPDIR}/test"$2
+ (set -C; exec > $tmp) 2> /dev/null ||
+ die "Unable to create temporary file in $FFTMPDIR."
+ eval $1=$tmp
+}
+
+trap 'rm -rf -- "$FFTMPDIR"' EXIT
+trap 'exit 2' INT
+
+tmpfile TMPASM .asm
+tmpfile TMPC .c
+tmpfile TMPCPP .cpp
+tmpfile TMPE $EXESUF
+tmpfile TMPH .h
+tmpfile TMPM .m
+tmpfile TMPCU .cu
+tmpfile TMPO .o
+tmpfile TMPS .S
+tmpfile TMPSH .sh
+tmpfile TMPV .ver
+
+unset -f mktemp
+
+chmod +x $TMPE
+
+# make sure we can execute files in $TMPDIR
+cat > $TMPSH 2>> $logfile <> $logfile 2>&1
+if ! $TMPSH >> $logfile 2>&1; then
+ cat <&1 | grep -q '^GNU assembler'; then
+ true # no-op to avoid reading stdin in following checks
+ elif $_cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
+ _type=llvm_gcc
+ gcc_extra_ver=$(expr "$($_cc --version 2>/dev/null | head -n1)" : '.*\((.*)\)')
+ _ident="llvm-gcc $($_cc -dumpversion 2>/dev/null) $gcc_extra_ver"
+ _depflags='-MMD -MF $(@:.o=.d) -MT $@'
+ _cflags_speed='-O3'
+ _cflags_size='-Os'
+ elif $_cc -v 2>&1 | grep -qi ^gcc; then
+ _type=gcc
+ gcc_version=$($_cc --version | head -n1)
+ gcc_basever=$($_cc -dumpversion)
+ gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)')
+ gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)")
+ _ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
+ case $gcc_basever in
+ 2) ;;
+ 2.*) ;;
+ *) _depflags='-MMD -MF $(@:.o=.d) -MT $@' ;;
+ esac
+ if [ "$first" = true ]; then
+ case $gcc_basever in
+ 4.2*)
+ warn "gcc 4.2 is outdated and may miscompile FFmpeg. Please use a newer compiler." ;;
+ esac
+ fi
+ _cflags_speed='-O3'
+ _cflags_size='-Os'
+ elif $_cc --version 2>/dev/null | grep -q ^icc; then
+ _type=icc
+ _ident=$($_cc --version | head -n1)
+ _depflags='-MMD'
+ _cflags_speed='-O3'
+ _cflags_size='-Os'
+ _cflags_noopt='-O1'
+ _flags_filter=icc_flags
+ elif $_cc -v 2>&1 | grep -q xlc; then
+ _type=xlc
+ _ident=$($_cc -qversion 2>/dev/null | head -n1)
+ _cflags_speed='-O5'
+ _cflags_size='-O5 -qcompact'
+ elif $_cc --vsn 2>/dev/null | grep -Eq "ARM (C/C\+\+ )?Compiler"; then
+ test -d "$sysroot" || die "No valid sysroot specified."
+ _type=armcc
+ _ident=$($_cc --vsn | grep -i build | head -n1 | sed 's/.*: //')
+ armcc_conf="$PWD/armcc.conf"
+ $_cc --arm_linux_configure \
+ --arm_linux_config_file="$armcc_conf" \
+ --configure_sysroot="$sysroot" \
+ --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
+ die "Error creating armcc configuration file."
+ $_cc --vsn | grep -q RVCT && armcc_opt=rvct || armcc_opt=armcc
+ _flags="--arm_linux_config_file=$armcc_conf --translate_gcc"
+ as_default="${cross_prefix}gcc"
+ _depflags='-MMD'
+ _cflags_speed='-O3'
+ _cflags_size='-Os'
+ elif $_cc -v 2>&1 | grep -q clang && ! $_cc -? > /dev/null 2>&1; then
+ _type=clang
+ _ident=$($_cc --version 2>/dev/null | head -n1)
+ _depflags='-MMD -MF $(@:.o=.d) -MT $@'
+ _cflags_speed='-O3'
+ _cflags_size='-Oz'
+ elif $_cc -V 2>&1 | grep -q Sun; then
+ _type=suncc
+ _ident=$($_cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
+ _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
+ _DEPFLAGS='-xM1 -xc99'
+ _ldflags='-std=c99'
+ _cflags_speed='-O5'
+ _cflags_size='-O5 -xspace'
+ _flags_filter=suncc_flags
+ elif $_cc -v 2>&1 | grep -q 'PathScale\|Path64'; then
+ _type=pathscale
+ _ident=$($_cc -v 2>&1 | head -n1 | tr -d :)
+ _depflags='-MMD -MF $(@:.o=.d) -MT $@'
+ _cflags_speed='-O2'
+ _cflags_size='-Os'
+ _flags_filter='filter_out -Wdisabled-optimization'
+ elif $_cc -v 2>&1 | grep -q Open64; then
+ _type=open64
+ _ident=$($_cc -v 2>&1 | head -n1 | tr -d :)
+ _depflags='-MMD -MF $(@:.o=.d) -MT $@'
+ _cflags_speed='-O2'
+ _cflags_size='-Os'
+ _flags_filter='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros'
+ elif $_cc 2>&1 | grep -q 'Microsoft.*ARM.*Assembler'; then
+ _type=armasm
+ _ident=$($_cc | head -n1)
+ # 4509: "This form of conditional instruction is deprecated"
+ _flags="-nologo -ignore 4509"
+ _flags_filter=armasm_flags
+ elif $_cc 2>&1 | grep -q Intel; then
+ _type=icl
+ _ident=$($_cc 2>&1 | head -n1)
+ _depflags='-QMMD -QMF$(@:.o=.d) -QMT$@'
+ # Not only is O3 broken on 13.x+ but it is slower on all previous
+ # versions (tested) as well.
+ _cflags_speed="-O2"
+ _cflags_size="-O1 -Oi" # -O1 without -Oi miscompiles stuff
+ if $_cc 2>&1 | grep -q Linker; then
+ _ld_o='-out:$@'
+ else
+ _ld_o='-Fe$@'
+ fi
+ _cc_o='-Fo$@'
+ _cc_e='-P'
+ _flags_filter=icl_flags
+ _ld_lib='lib%.a'
+ _ld_path='-libpath:'
+ # -Qdiag-error to make icl error when seeing certain unknown arguments
+ _flags='-nologo -Qdiag-error:4044,10157'
+ # -Qvec- -Qsimd- to prevent miscompilation, -GS, fp:precise for consistency
+ # with MSVC which enables it by default.
+ _cflags='-Qms0 -Qvec- -Qsimd- -GS -fp:precise'
+ disable stripping
+ elif $_cc -? 2>/dev/null | grep -q 'LLVM.*Linker'; then
+ # lld can emulate multiple different linkers; in ms link.exe mode,
+ # the -? parameter gives the help output which contains an identifyable
+ # string, while it gives an error in other modes.
+ _type=lld-link
+ # The link.exe mode doesn't have a switch for getting the version,
+ # but we can force it back to gnu mode and get the version from there.
+ _ident=$($_cc -flavor gnu --version 2>/dev/null)
+ _ld_o='-out:$@'
+ _flags_filter=msvc_flags
+ _ld_lib='lib%.a'
+ _ld_path='-libpath:'
+ elif $_cc -nologo- 2>&1 | grep -q Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then
+ _type=msvc
+ if $_cc -nologo- 2>&1 | grep -q Microsoft; then
+ _ident=$($_cc 2>&1 | head -n1 | tr -d '\r')
+ else
+ _ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r')
+ fi
+ _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
+ _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
+ _cflags_speed="-O2"
+ _cflags_size="-O1"
+ _cflags_noopt="-O1"
+ if $_cc -nologo- 2>&1 | grep -q Linker; then
+ _ld_o='-out:$@'
+ else
+ _ld_o='-Fe$@'
+ fi
+ _cc_o='-Fo$@'
+ _cc_e='-P -Fi$@'
+ _flags_filter=msvc_flags
+ _ld_lib='lib%.a'
+ _ld_path='-libpath:'
+ _flags='-nologo'
+ disable stripping
+ elif $_cc --version 2>/dev/null | grep -q ^cparser; then
+ _type=cparser
+ _ident=$($_cc --version | head -n1)
+ _depflags='-MMD'
+ _cflags_speed='-O4'
+ _cflags_size='-O2'
+ _flags_filter=cparser_flags
+ fi
+
+ eval ${pfx}_type=\$_type
+ eval ${pfx}_ident=\$_ident
+}
+
+set_ccvars(){
+ eval ${1}_C=\${_cc_c-\${${1}_C}}
+ eval ${1}_E=\${_cc_e-\${${1}_E}}
+ eval ${1}_O=\${_cc_o-\${${1}_O}}
+
+ if [ -n "$_depflags" ]; then
+ eval ${1}_DEPFLAGS=\$_depflags
+ else
+ eval ${1}DEP=\${_DEPCMD:-\$DEPCMD}
+ eval ${1}DEP_FLAGS=\${_DEPFLAGS:-\$DEPFLAGS}
+ eval DEP${1}FLAGS=\$_flags
+ fi
+}
+
+probe_cc cc "$cc" "true"
+cflags_filter=$_flags_filter
+cflags_speed=$_cflags_speed
+cflags_size=$_cflags_size
+cflags_noopt=$_cflags_noopt
+add_cflags $_flags $_cflags
+cc_ldflags=$_ldflags
+set_ccvars CC
+set_ccvars CXX
+
+probe_cc hostcc "$host_cc"
+host_cflags_filter=$_flags_filter
+host_cflags_speed=$_cflags_speed
+add_host_cflags $_flags $_cflags
+set_ccvars HOSTCC
+
+test -n "$cc_type" && enable $cc_type ||
+ warn "Unknown C compiler $cc, unable to select optimal CFLAGS"
+
+: ${as_default:=$cc}
+: ${objcc_default:=$cc}
+: ${dep_cc_default:=$cc}
+: ${ld_default:=$cc}
+: ${host_ld_default:=$host_cc}
+set_default ar as objcc dep_cc ld ln_s host_ld windres
+
+probe_cc as "$as"
+asflags_filter=$_flags_filter
+add_asflags $_flags $_cflags
+set_ccvars AS
+
+probe_cc objcc "$objcc"
+objcflags_filter=$_flags_filter
+add_objcflags $_flags $_cflags
+set_ccvars OBJC
+
+probe_cc ld "$ld"
+ldflags_filter=$_flags_filter
+add_ldflags $_flags $_ldflags
+test "$cc_type" != "$ld_type" && add_ldflags $cc_ldflags
+LD_O=${_ld_o-$LD_O}
+LD_LIB=${_ld_lib-$LD_LIB}
+LD_PATH=${_ld_path-$LD_PATH}
+
+probe_cc hostld "$host_ld"
+host_ldflags_filter=$_flags_filter
+add_host_ldflags $_flags $_ldflags
+HOSTLD_O=${_ld_o-$HOSTLD_O}
+
+if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
+ probe_cc depcc "$dep_cc"
+ CCDEP=${_DEPCMD:-$DEPCMD}
+ CCDEP_FLAGS=${_DEPFLAGS:=$DEPFLAGS}
+ DEPCCFLAGS=$_flags
+fi
+
+if $ar 2>&1 | grep -q Microsoft; then
+ arflags="-nologo"
+ ar_o='-out:$@'
+elif $ar 2>&1 | grep -q "\[D\] "; then
+ arflags="rcD"
+ ar_o='$@'
+else
+ arflags="rc"
+ ar_o='$@'
+fi
+
+add_cflags $extra_cflags
+add_cxxflags $extra_cxxflags
+add_objcflags $extra_objcflags
+add_asflags $extra_cflags
+
+if test -n "$sysroot"; then
+ case "$cc_type" in
+ gcc|llvm_gcc|clang)
+ add_cppflags --sysroot="$sysroot"
+ add_ldflags --sysroot="$sysroot"
+ ;;
+ esac
+fi
+
+if test "$cpu" = host; then
+ enabled cross_compile &&
+ warn "--cpu=host makes no sense when cross-compiling."
+
+ case "$cc_type" in
+ gcc|llvm_gcc)
+ check_native(){
+ $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
+ sed -n "/cc1.*$1=/{
+ s/.*$1=\\([^ ]*\\).*/\\1/
+ p
+ q
+ }" $TMPE
+ }
+ cpu=$(check_native -march || check_native -mcpu)
+ ;;
+ clang)
+ check_native(){
+ $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
+ sed -n "/cc1.*-target-cpu /{
+ s/.*-target-cpu \\([^ ]*\\).*/\\1/
+ p
+ q
+ }" $TMPE
+ }
+ cpu=$(check_native -march)
+ ;;
+ esac
+
+ test "${cpu:-host}" = host &&
+ die "--cpu=host not supported with compiler $cc"
+fi
+
+# Deal with common $arch aliases
+case "$arch" in
+ aarch64|arm64)
+ arch="aarch64"
+ ;;
+ arm*|iPad*|iPhone*)
+ arch="arm"
+ ;;
+ mips*|IP*)
+ case "$arch" in
+ *el)
+ add_cppflags -EL
+ add_ldflags -EL
+ ;;
+ *eb)
+ add_cppflags -EB
+ add_ldflags -EB
+ ;;
+ esac
+ arch="mips"
+ ;;
+ parisc*|hppa*)
+ arch="parisc"
+ ;;
+ "Power Macintosh"|ppc*|powerpc*)
+ arch="ppc"
+ ;;
+ s390|s390x)
+ arch="s390"
+ ;;
+ sh4|sh)
+ arch="sh4"
+ ;;
+ sun4*|sparc*)
+ arch="sparc"
+ ;;
+ tilegx|tile-gx)
+ arch="tilegx"
+ ;;
+ i[3-6]86*|i86pc|BePC|x86pc|x86_64|x86_32|amd64)
+ arch="x86"
+ ;;
+esac
+
+is_in $arch $ARCH_LIST || warn "unknown architecture $arch"
+enable $arch
+
+# Add processor-specific flags
+if enabled aarch64; then
+
+ case $cpu in
+ armv*)
+ cpuflags="-march=$cpu"
+ ;;
+ *)
+ cpuflags="-mcpu=$cpu"
+ ;;
+ esac
+
+elif enabled alpha; then
+
+ cpuflags="-mcpu=$cpu"
+
+elif enabled arm; then
+
+ check_arm_arch() {
+ test_cpp_condition stddef.h \
+ "defined __ARM_ARCH_${1}__ || defined __TARGET_ARCH_${2:-$1}" \
+ $cpuflags
+ }
+
+ probe_arm_arch() {
+ if check_arm_arch 4; then echo armv4
+ elif check_arm_arch 4T; then echo armv4t
+ elif check_arm_arch 5; then echo armv5
+ elif check_arm_arch 5E; then echo armv5e
+ elif check_arm_arch 5T; then echo armv5t
+ elif check_arm_arch 5TE; then echo armv5te
+ elif check_arm_arch 5TEJ; then echo armv5te
+ elif check_arm_arch 6; then echo armv6
+ elif check_arm_arch 6J; then echo armv6j
+ elif check_arm_arch 6K; then echo armv6k
+ elif check_arm_arch 6Z; then echo armv6z
+ elif check_arm_arch 6KZ; then echo armv6zk
+ elif check_arm_arch 6ZK; then echo armv6zk
+ elif check_arm_arch 6T2; then echo armv6t2
+ elif check_arm_arch 7; then echo armv7
+ elif check_arm_arch 7A 7_A; then echo armv7-a
+ elif check_arm_arch 7S; then echo armv7-a
+ elif check_arm_arch 7R 7_R; then echo armv7-r
+ elif check_arm_arch 7M 7_M; then echo armv7-m
+ elif check_arm_arch 7EM 7E_M; then echo armv7-m
+ elif check_arm_arch 8A 8_A; then echo armv8-a
+ fi
+ }
+
+ [ "$cpu" = generic ] && cpu=$(probe_arm_arch)
+
+ case $cpu in
+ armv*)
+ cpuflags="-march=$cpu"
+ subarch=$(echo $cpu | sed 's/[^a-z0-9]//g')
+ ;;
+ *)
+ cpuflags="-mcpu=$cpu"
+ case $cpu in
+ cortex-a*) subarch=armv7a ;;
+ cortex-r*) subarch=armv7r ;;
+ cortex-m*) enable thumb; subarch=armv7m ;;
+ arm11*) subarch=armv6 ;;
+ arm[79]*e*|arm9[24]6*|arm96*|arm102[26]) subarch=armv5te ;;
+ armv4*|arm7*|arm9[24]*) subarch=armv4 ;;
+ *) subarch=$(probe_arm_arch) ;;
+ esac
+ ;;
+ esac
+
+ case "$subarch" in
+ armv5t*) enable fast_clz ;;
+ armv[6-8]*)
+ enable fast_clz
+ disabled fast_unaligned || enable fast_unaligned
+ ;;
+ esac
+
+elif enabled avr32; then
+
+ case $cpu in
+ ap7[02]0[0-2])
+ subarch="avr32_ap"
+ cpuflags="-mpart=$cpu"
+ ;;
+ ap)
+ subarch="avr32_ap"
+ cpuflags="-march=$cpu"
+ ;;
+ uc3[ab]*)
+ subarch="avr32_uc"
+ cpuflags="-mcpu=$cpu"
+ ;;
+ uc)
+ subarch="avr32_uc"
+ cpuflags="-march=$cpu"
+ ;;
+ esac
+
+elif enabled bfin; then
+
+ cpuflags="-mcpu=$cpu"
+
+elif enabled mips; then
+
+ if [ "$cpu" != "generic" ]; then
+ disable mips32r2
+ disable mips32r5
+ disable mips64r2
+ disable mips32r6
+ disable mips64r6
+ disable loongson2
+ disable loongson3
+ disable mipsdsp
+ disable mipsdspr2
+
+ cpuflags="-march=$cpu"
+
+ case $cpu in
+ # General ISA levels
+ mips1|mips3)
+ ;;
+ mips32r2)
+ enable mips32r2
+ ;;
+ mips32r5)
+ enable mips32r2
+ enable mips32r5
+ ;;
+ mips64r2|mips64r5)
+ enable mips64r2
+ enable loongson3
+ ;;
+ # Cores from MIPS(MTI)
+ 24kc)
+ disable mipsfpu
+ enable mips32r2
+ ;;
+ 24kf*|24kec|34kc|74Kc|1004kc)
+ enable mips32r2
+ ;;
+ 24kef*|34kf*|1004kf*)
+ enable mipsdsp
+ enable mips32r2
+ ;;
+ p5600)
+ enable mips32r2
+ enable mips32r5
+ check_cflags "-mtune=p5600" && check_cflags "-msched-weight -mload-store-pairs -funroll-loops"
+ ;;
+ i6400)
+ enable mips64r6
+ check_cflags "-mtune=i6400 -mabi=64" && check_cflags "-msched-weight -mload-store-pairs -funroll-loops" && check_ldflags "-mabi=64"
+ ;;
+ p6600)
+ enable mips64r6
+ check_cflags "-mtune=p6600 -mabi=64" && check_cflags "-msched-weight -mload-store-pairs -funroll-loops" && check_ldflags "-mabi=64"
+ ;;
+ # Cores from Loongson
+ loongson2e|loongson2f|loongson3*)
+ enable local_aligned
+ enable simd_align_16
+ enable fast_64bit
+ enable fast_clz
+ enable fast_cmov
+ enable fast_unaligned
+ disable aligned_stack
+ # When gcc version less than 5.3.0, add -fno-expensive-optimizations flag.
+ if test "$cc_type" = "gcc"; then
+ case $gcc_basever in
+ 2|2.*|3.*|4.*|5.0|5.1|5.2)
+ expensive_optimization_flag="-fno-expensive-optimizations"
+ ;;
+ *)
+ expensive_optimization_flag=""
+ ;;
+ esac
+ fi
+
+ case $cpu in
+ loongson3*)
+ enable loongson3
+ cpuflags="-march=loongson3a -mhard-float $expensive_optimization_flag"
+ ;;
+ loongson2e)
+ enable loongson2
+ cpuflags="-march=loongson2e -mhard-float $expensive_optimization_flag"
+ ;;
+ loongson2f)
+ enable loongson2
+ cpuflags="-march=loongson2f -mhard-float $expensive_optimization_flag"
+ ;;
+ esac
+ ;;
+ *)
+ warn "unknown MIPS CPU"
+ ;;
+ esac
+
+ else
+ disable mipsdsp
+ disable mipsdspr2
+ # Disable DSP stuff for generic CPU, it can't be detected at runtime.
+ warn 'generic cpu selected'
+ fi
+
+elif enabled ppc; then
+
+ disable ldbrx
+
+ case $(tolower $cpu) in
+ 601|ppc601|powerpc601)
+ cpuflags="-mcpu=601"
+ disable altivec
+ ;;
+ 603*|ppc603*|powerpc603*)
+ cpuflags="-mcpu=603"
+ disable altivec
+ ;;
+ 604*|ppc604*|powerpc604*)
+ cpuflags="-mcpu=604"
+ disable altivec
+ ;;
+ g3|75*|ppc75*|powerpc75*)
+ cpuflags="-mcpu=750"
+ disable altivec
+ ;;
+ g4|745*|ppc745*|powerpc745*)
+ cpuflags="-mcpu=7450"
+ disable vsx
+ ;;
+ 74*|ppc74*|powerpc74*)
+ cpuflags="-mcpu=7400"
+ disable vsx
+ ;;
+ g5|970|ppc970|powerpc970)
+ cpuflags="-mcpu=970"
+ disable vsx
+ ;;
+ power[3-6]*)
+ cpuflags="-mcpu=$cpu"
+ disable vsx
+ ;;
+ power[7-8]*)
+ cpuflags="-mcpu=$cpu"
+ ;;
+ cell)
+ cpuflags="-mcpu=cell"
+ enable ldbrx
+ disable vsx
+ ;;
+ e500mc)
+ cpuflags="-mcpu=e500mc"
+ disable altivec
+ ;;
+ e500v2)
+ cpuflags="-mcpu=8548 -mhard-float -mfloat-gprs=double"
+ disable altivec
+ disable dcbzl
+ ;;
+ e500)
+ cpuflags="-mcpu=8540 -mhard-float"
+ disable altivec
+ disable dcbzl
+ ;;
+ esac
+
+elif enabled sparc; then
+
+ case $cpu in
+ cypress|f93[04]|tsc701|sparcl*|supersparc|hypersparc|niagara|v[789])
+ cpuflags="-mcpu=$cpu"
+ ;;
+ ultrasparc*|niagara[234])
+ cpuflags="-mcpu=$cpu"
+ ;;
+ esac
+
+elif enabled x86; then
+
+ case $cpu in
+ i[345]86|pentium)
+ cpuflags="-march=$cpu"
+ disable i686
+ disable mmx
+ ;;
+ # targets that do NOT support nopl and conditional mov (cmov)
+ pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3)
+ cpuflags="-march=$cpu"
+ disable i686
+ ;;
+ # targets that do support nopl and conditional mov (cmov)
+ i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx\
+ |core*|atom|bonnell|nehalem|westmere|silvermont|sandybridge|ivybridge|haswell|broadwell|skylake*|knl\
+ |amdfam10|barcelona|b[dt]ver*|znver*)
+ cpuflags="-march=$cpu"
+ enable i686
+ enable fast_cmov
+ ;;
+ # targets that do support conditional mov but on which it's slow
+ pentium4|pentium4m|prescott|nocona)
+ cpuflags="-march=$cpu"
+ enable i686
+ disable fast_cmov
+ ;;
+ esac
+
+fi
+
+if [ "$cpu" != generic ]; then
+ add_cflags $cpuflags
+ add_asflags $cpuflags
+ test "$cc_type" = "$ld_type" && add_ldflags $cpuflags
+fi
+
+# compiler sanity check
+test_exec <= 201112L" &&
+ add_cflags -std=c11 ||
+ check_cflags -std=c99
+
+check_cppflags -D_FILE_OFFSET_BITS=64
+check_cppflags -D_LARGEFILE_SOURCE
+
+add_host_cppflags -D_ISOC99_SOURCE
+check_host_cflags -std=c99
+check_host_cflags -Wall
+check_host_cflags $host_cflags_speed
+
+check_64bit(){
+ arch32=$1
+ arch64=$2
+ expr=${3:-'sizeof(void *) > 4'}
+ test_code cc "" "int test[2*($expr) - 1]" &&
+ subarch=$arch64 || subarch=$arch32
+ enable $subarch
+}
+
+case "$arch" in
+ aarch64|alpha|ia64)
+ enabled shared && enable_weak pic
+ ;;
+ mips)
+ check_64bit mips mips64 '_MIPS_SIM > 1'
+ enabled shared && enable_weak pic
+ ;;
+ parisc)
+ check_64bit parisc parisc64
+ enabled shared && enable_weak pic
+ ;;
+ ppc)
+ check_64bit ppc ppc64
+ enabled shared && enable_weak pic
+ ;;
+ s390)
+ check_64bit s390 s390x
+ enabled shared && enable_weak pic
+ ;;
+ sparc)
+ check_64bit sparc sparc64
+ enabled shared && enable_weak pic
+ ;;
+ x86)
+ check_64bit x86_32 x86_64
+ # Treat x32 as x64 for now. Note it also needs pic if shared
+ test "$subarch" = "x86_32" && test_cpp_condition stddef.h 'defined(__x86_64__)' &&
+ subarch=x86_64 && enable x86_64 && disable x86_32
+ if enabled x86_64; then
+ enabled shared && enable_weak pic
+ objformat=elf64
+ fi
+ ;;
+esac
+
+# OS specific
+case $target_os in
+ aix)
+ SHFLAGS=-shared
+ add_cppflags '-I\$(SRC_PATH)/compat/aix'
+ enabled shared && add_ldflags -Wl,-brtl
+ arflags='-Xany -r -c'
+ striptype=""
+ ;;
+ android)
+ disable symver
+ enable section_data_rel_ro
+ add_cflags -fPIE
+ add_ldexeflags -fPIE -pie
+ SLIB_INSTALL_NAME='$(SLIBNAME)'
+ SLIB_INSTALL_LINKS=
+ SHFLAGS='-shared -Wl,-soname,$(SLIBNAME)'
+ ;;
+ haiku)
+ prefix_default="/boot/common"
+ network_extralibs="-lnetwork"
+ host_extralibs=
+ ;;
+ sunos)
+ SHFLAGS='-shared -Wl,-h,$$(@F)'
+ enabled x86 && append SHFLAGS -mimpure-text
+ network_extralibs="-lsocket -lnsl"
+ add_cppflags -D__EXTENSIONS__
+ # When using suncc to build, the Solaris linker will mark
+ # an executable with each instruction set encountered by
+ # the Solaris assembler. As our libraries contain their own
+ # guards for processor-specific code, instead suppress
+ # generation of the HWCAPS ELF section on Solaris x86 only.
+ enabled_all suncc x86 &&
+ echo "hwcap_1 = OVERRIDE;" > mapfile &&
+ add_ldflags -Wl,-M,mapfile
+ nm_default='nm -P -g'
+ striptype=""
+ version_script='-M'
+ VERSION_SCRIPT_POSTPROCESS_CMD='perl $(SRC_PATH)/compat/solaris/make_sunver.pl - $(OBJS)'
+ ;;
+ netbsd)
+ disable symver
+ oss_indev_extralibs="-lossaudio"
+ oss_outdev_extralibs="-lossaudio"
+ enabled gcc || check_ldflags -Wl,-zmuldefs
+ ;;
+ openbsd|bitrig)
+ disable symver
+ enable section_data_rel_ro
+ striptype=""
+ SHFLAGS='-shared'
+ SLIB_INSTALL_NAME='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)'
+ SLIB_INSTALL_LINKS=
+ oss_indev_extralibs="-lossaudio"
+ oss_outdev_extralibs="-lossaudio"
+ ;;
+ dragonfly)
+ disable symver
+ ;;
+ freebsd)
+ ;;
+ bsd/os)
+ add_extralibs -lpoll -lgnugetopt
+ strip="strip -d"
+ ;;
+ darwin)
+ enabled ppc && add_asflags -force_cpusubtype_ALL
+ install_name_dir_default='$(SHLIBDIR)'
+ SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(INSTALL_NAME_DIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
+ enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
+ strip="${strip} -x"
+ add_ldflags -Wl,-dynamic,-search_paths_first
+ check_cflags -Werror=partial-availability
+ SLIBSUF=".dylib"
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
+ SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
+ enabled x86_64 && objformat="macho64" || objformat="macho32"
+ enabled_any pic shared x86_64 ||
+ { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
+ check_headers dispatch/dispatch.h &&
+ add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore'
+ if test -n "$sysroot"; then
+ is_in -isysroot $cc $CPPFLAGS $CFLAGS || check_cppflags -isysroot $sysroot
+ is_in -isysroot $ld $LDFLAGS || check_ldflags -isysroot $sysroot
+ fi
+ version_script='-exported_symbols_list'
+ VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n /global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed -E "s/(.+[^*])$$$$/\1*/"'
+ # Workaround for Xcode 11 -fstack-check bug
+ if enabled clang; then
+ clang_version=$($cc -dumpversion)
+ test ${clang_version%%.*} -eq 11 && add_cflags -fno-stack-check
+ fi
+ ;;
+ msys*)
+ die "Native MSYS builds are discouraged, please use the MINGW environment."
+ ;;
+ mingw32*|mingw64*)
+ target_os=mingw32
+ LIBTARGET=i386
+ if enabled x86_64; then
+ LIBTARGET="i386:x86-64"
+ elif enabled arm; then
+ LIBTARGET="arm"
+ elif enabled aarch64; then
+ LIBTARGET="arm64"
+ fi
+ if enabled shared; then
+ # Cannot build both shared and static libs when using dllimport.
+ disable static
+ fi
+ enabled shared && ! enabled small && test_cmd $windres --version && enable gnu_windres
+ enabled x86_32 && check_ldflags -Wl,--large-address-aware
+ shlibdir_default="$bindir_default"
+ SLIBPREF=""
+ SLIBSUF=".dll"
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
+ SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
+ if test_cmd lib.exe -list; then
+ SLIB_EXTRA_CMD=-'lib.exe -nologo -machine:$(LIBTARGET) -def:$$(@:$(SLIBSUF)=.def) -out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
+ if enabled x86_64; then
+ LIBTARGET=x64
+ fi
+ else
+ SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
+ fi
+ SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
+ SLIB_INSTALL_LINKS=
+ SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
+ SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
+ SLIB_CREATE_DEF_CMD='EXTERN_PREFIX="$(EXTERN_PREFIX)" AR="$(AR_CMD)" NM="$(NM_CMD)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)'
+ SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--disable-auto-image-base $$(@:$(SLIBSUF)=.def)'
+ enabled x86_64 && objformat="win64" || objformat="win32"
+ dlltool="${cross_prefix}dlltool"
+ ranlib=:
+ enable dos_paths
+ check_ldflags -Wl,--nxcompat,--dynamicbase
+ # Lets work around some stupidity in binutils.
+ # ld will strip relocations from executables even though we need them
+ # for dynamicbase (ASLR). Using -pie does retain the reloc section
+ # however ld then forgets what the entry point should be (oops) so we
+ # have to manually (re)set it.
+ if enabled x86_32; then
+ disabled debug && add_ldexeflags -Wl,--pic-executable,-e,_mainCRTStartup
+ elif enabled x86_64; then
+ disabled debug && add_ldexeflags -Wl,--pic-executable,-e,mainCRTStartup
+ check_ldflags -Wl,--high-entropy-va # binutils 2.25
+ # Set image base >4GB for extra entropy with HEASLR
+ add_ldexeflags -Wl,--image-base,0x140000000
+ append SHFLAGS -Wl,--image-base,0x180000000
+ fi
+ ;;
+ win32|win64)
+ disable symver
+ if enabled shared; then
+ # Link to the import library instead of the normal static library
+ # for shared libs.
+ LD_LIB='%.lib'
+ # Cannot build both shared and static libs with MSVC or icl.
+ disable static
+ fi
+ enabled x86_32 && check_ldflags -LARGEADDRESSAWARE
+ shlibdir_default="$bindir_default"
+ SLIBPREF=""
+ SLIBSUF=".dll"
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
+ SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
+ SLIB_CREATE_DEF_CMD='EXTERN_PREFIX="$(EXTERN_PREFIX)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)'
+ SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
+ SLIB_INSTALL_LINKS=
+ SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
+ SLIB_INSTALL_EXTRA_LIB='$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
+ SHFLAGS='-dll -def:$$(@:$(SLIBSUF)=.def) -implib:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
+ enabled x86_64 && objformat="win64" || objformat="win32"
+ ranlib=:
+ enable dos_paths
+ ;;
+ cygwin*)
+ target_os=cygwin
+ shlibdir_default="$bindir_default"
+ SLIBPREF="cyg"
+ SLIBSUF=".dll"
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
+ SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
+ SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
+ SLIB_INSTALL_LINKS=
+ SLIB_INSTALL_EXTRA_LIB='lib$(FULLNAME).dll.a'
+ SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a'
+ enabled x86_64 && objformat="win64" || objformat="win32"
+ enable dos_paths
+ enabled shared && ! enabled small && test_cmd $windres --version && enable gnu_windres
+ add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
+ ;;
+ *-dos|freedos|opendos)
+ network_extralibs="-lsocket"
+ objformat="coff"
+ enable dos_paths
+ ;;
+ linux)
+ enable section_data_rel_ro
+ enabled_any arm aarch64 && enable_weak linux_perf
+ ;;
+ irix*)
+ target_os=irix
+ ranlib="echo ignoring ranlib"
+ ;;
+ os/2*)
+ strip="lxlite -CS"
+ striptype=""
+ objformat="aout"
+ add_cppflags -D_GNU_SOURCE
+ add_ldflags -Zomf -Zbin-files -Zargs-wild -Zhigh-mem -Zmap
+ SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
+ LIBSUF="_s.a"
+ SLIBPREF=""
+ SLIBSUF=".dll"
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
+ SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(shell echo $(FULLNAME) | cut -c1-6)$(LIBMAJOR)$(SLIBSUF)'
+ SLIB_CREATE_DEF_CMD='echo LIBRARY $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=) INITINSTANCE TERMINSTANCE > $(SUBDIR)$(FULLNAME).def; \
+ echo CODE PRELOAD MOVEABLE DISCARDABLE >> $(SUBDIR)$(FULLNAME).def; \
+ echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $(SUBDIR)$(FULLNAME).def; \
+ echo EXPORTS >> $(SUBDIR)$(FULLNAME).def; \
+ emxexp $(OBJS) >> $(SUBDIR)$(FULLNAME).def'
+ SLIB_EXTRA_CMD='emximp -o $(SUBDIR)$(LIBPREF)$(FULLNAME)_dll.a $(SUBDIR)$(FULLNAME).def; \
+ emximp -o $(SUBDIR)$(LIBPREF)$(FULLNAME)_dll.lib $(SUBDIR)$(FULLNAME).def;'
+ SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
+ SLIB_INSTALL_LINKS=
+ SLIB_INSTALL_EXTRA_LIB='$(LIBPREF)$(FULLNAME)_dll.a $(LIBPREF)$(FULLNAME)_dll.lib'
+ enable dos_paths
+ enable_weak os2threads
+ ;;
+ gnu/kfreebsd)
+ add_cppflags -D_BSD_SOURCE
+ ;;
+ gnu)
+ ;;
+ qnx)
+ add_cppflags -D_QNX_SOURCE
+ network_extralibs="-lsocket"
+ ;;
+ symbian)
+ SLIBSUF=".dll"
+ enable dos_paths
+ add_cflags --include=$sysinclude/gcce/gcce.h -fvisibility=default
+ add_cppflags -D__GCCE__ -D__SYMBIAN32__ -DSYMBIAN_OE_POSIX_SIGNALS
+ add_ldflags -Wl,--target1-abs,--no-undefined \
+ -Wl,-Ttext,0x80000,-Tdata,0x1000000 -shared \
+ -Wl,--entry=_E32Startup -Wl,-u,_E32Startup
+ add_extralibs -l:eexe.lib -l:usrt2_2.lib -l:dfpaeabi.dso \
+ -l:drtaeabi.dso -l:scppnwdl.dso -lsupc++ -lgcc \
+ -l:libc.dso -l:libm.dso -l:euser.dso -l:libcrt0.lib
+ ;;
+ minix)
+ ;;
+ none)
+ ;;
+ *)
+ die "Unknown OS '$target_os'."
+ ;;
+esac
+
+# test if creating links works
+link_dest=$(mktemp -u $TMPDIR/dest_XXXXXXXX)
+link_name=$(mktemp -u $TMPDIR/name_XXXXXXXX)
+mkdir "$link_dest"
+$ln_s "$link_dest" "$link_name"
+touch "$link_dest/test_file"
+if [ "$source_path" != "." ] && [ "$source_path" != "src" ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then
+ # create link to source path
+ [ -e src ] && rm src
+ $ln_s "$source_path" src
+ source_link=src
+else
+ # creating directory links doesn't work
+ # fall back to using the full source path
+ source_link="$source_path"
+fi
+# cleanup
+rm -r "$link_dest"
+rm -r "$link_name"
+
+# determine libc flavour
+
+probe_libc(){
+ pfx=$1
+ pfx_no_=${pfx%_}
+ # uclibc defines __GLIBC__, so it needs to be checked before glibc.
+ if test_${pfx}cpp_condition features.h "defined __UCLIBC__"; then
+ eval ${pfx}libc_type=uclibc
+ add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
+ elif test_${pfx}cpp_condition features.h "defined __GLIBC__"; then
+ eval ${pfx}libc_type=glibc
+ add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
+ # MinGW headers can be installed on Cygwin, so check for newlib first.
+ elif test_${pfx}cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
+ eval ${pfx}libc_type=newlib
+ add_${pfx}cppflags -U__STRICT_ANSI__ -D_XOPEN_SOURCE=600
+ # MinGW64 is backwards compatible with MinGW32, so check for it first.
+ elif test_${pfx}cpp_condition _mingw.h "defined __MINGW64_VERSION_MAJOR"; then
+ eval ${pfx}libc_type=mingw64
+ if test_${pfx}cpp_condition _mingw.h "__MINGW64_VERSION_MAJOR < 3"; then
+ add_compat msvcrt/snprintf.o
+ add_cflags "-include $source_path/compat/msvcrt/snprintf.h"
+ fi
+ add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
+ eval test \$${pfx_no_}cc_type = "gcc" &&
+ add_${pfx}cppflags -D__printf__=__gnu_printf__
+ test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
+ add_${pfx}cppflags -D_WIN32_WINNT=0x0600
+ add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
+ elif test_${pfx}cpp_condition _mingw.h "defined __MINGW_VERSION" ||
+ test_${pfx}cpp_condition _mingw.h "defined __MINGW32_VERSION"; then
+ eval ${pfx}libc_type=mingw32
+ test_${pfx}cpp_condition _mingw.h "__MINGW32_MAJOR_VERSION > 3 || \
+ (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
+ die "ERROR: MinGW32 runtime version must be >= 3.15."
+ add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
+ test_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700" &&
+ add_${pfx}cppflags -D__MSVCRT_VERSION__=0x0700
+ test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
+ add_${pfx}cppflags -D_WIN32_WINNT=0x0600
+ eval test \$${pfx_no_}cc_type = "gcc" &&
+ add_${pfx}cppflags -D__printf__=__gnu_printf__
+ add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
+ elif test_${pfx}cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then
+ eval ${pfx}libc_type=msvcrt
+ if test_${pfx}cpp_condition crtversion.h "_VC_CRT_MAJOR_VERSION < 14"; then
+ if [ "$pfx" = host_ ]; then
+ add_host_cppflags -Dsnprintf=_snprintf
+ else
+ add_compat strtod.o strtod=avpriv_strtod
+ add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf \
+ _snprintf=avpriv_snprintf \
+ vsnprintf=avpriv_vsnprintf
+ fi
+ fi
+ add_${pfx}cppflags -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS
+ # The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to
+ # 0x601 by default unless something else is set by the user.
+ # This can easily lead to us detecting functions only present
+ # in such new versions and producing binaries requiring windows 7.0.
+ # Therefore explicitly set the default to Vista unless the user has
+ # set something else on the command line.
+ # Don't do this if WINAPI_FAMILY is set and is set to a non-desktop
+ # family. For these cases, configure is free to use any functions
+ # found in the SDK headers by default. (Alternatively, we could force
+ # _WIN32_WINNT to 0x0602 in that case.)
+ test_${pfx}cpp_condition stdlib.h "defined(_WIN32_WINNT)" ||
+ { test_${pfx}cpp <
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+#error not desktop
+#endif
+#endif
+EOF
+ if [ "$pfx" = "" ]; then
+ check_func strtoll || add_cflags -Dstrtoll=_strtoi64
+ check_func strtoull || add_cflags -Dstrtoull=_strtoui64
+ fi
+ elif test_${pfx}cpp_condition stddef.h "defined __KLIBC__"; then
+ eval ${pfx}libc_type=klibc
+ elif test_${pfx}cpp_condition sys/cdefs.h "defined __BIONIC__"; then
+ eval ${pfx}libc_type=bionic
+ elif test_${pfx}cpp_condition sys/brand.h "defined LABELED_BRAND_NAME"; then
+ eval ${pfx}libc_type=solaris
+ add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
+ elif test_${pfx}cpp_condition sys/version.h "defined __DJGPP__"; then
+ eval ${pfx}libc_type=djgpp
+ add_cppflags -U__STRICT_ANSI__
+ add_cflags "-include $source_path/compat/djgpp/math.h"
+ add_compat djgpp/math.o
+ fi
+ test_${pfx}cc <
+void *v = localtime_r;
+EOF
+test "$?" != 0 && test_${pfx}cc -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 <
+void *v = localtime_r;
+EOF
+
+ eval test -n "\${${pfx}libc_type}" && enable ${pfx}libc_${libc_type}
+}
+
+probe_libc
+probe_libc host_
+
+# hacks for compiler/libc/os combinations
+
+case $libc_type in
+ bionic)
+ add_compat strtod.o strtod=avpriv_strtod
+ ;;
+esac
+
+check_compile_assert flt_lim "float.h limits.h" "DBL_MAX == (double)DBL_MAX" ||
+ add_cppflags '-I\$(SRC_PATH)/compat/float'
+
+test_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable_weak pic
+
+set_default libdir
+: ${shlibdir_default:="$libdir"}
+: ${pkgconfigdir_default:="$libdir/pkgconfig"}
+
+set_default $PATHS_LIST
+set_default nm
+
+disabled optimizations || enabled ossfuzz || check_cflags -fomit-frame-pointer
+
+enable_weak_pic() {
+ disabled pic && return
+ enable pic
+ add_cppflags -DPIC
+ case "$target_os" in
+ mingw*|cygwin*|win*)
+ ;;
+ *)
+ add_cflags -fPIC
+ add_asflags -fPIC
+ ;;
+ esac
+}
+
+enabled pic && enable_weak_pic
+
+test_cc <= 30"; then
+ :
+ elif ! test_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__" && [ $target_os != darwin ]; then
+ case "${cross_prefix:-$cc}" in
+ *hardfloat*) enable vfp_args; fpabi=vfp ;;
+ *) check_ld "cc" vfp_args <= 9.1.23.1" "$ffnv_hdr_list" "" || \
+ check_pkg_config ffnvcodec "ffnvcodec >= 9.0.18.3 ffnvcodec < 9.1" "$ffnv_hdr_list" "" || \
+ check_pkg_config ffnvcodec "ffnvcodec >= 8.2.15.10 ffnvcodec < 8.3" "$ffnv_hdr_list" "" || \
+ check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.11 ffnvcodec < 8.2" "$ffnv_hdr_list" ""
+fi
+
+check_cpp_condition winrt windows.h "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)"
+
+if ! disabled w32threads && ! enabled pthreads; then
+ check_func_headers "windows.h process.h" _beginthreadex &&
+ check_type "windows.h" CONDITION_VARIABLE &&
+ check_type "windows.h" INIT_ONCE &&
+ enable w32threads || disable w32threads
+ if ! enabled w32threads && enabled winrt; then
+ check_func_headers "windows.h" CreateThread &&
+ enable w32threads || disable w32threads
+ fi
+fi
+
+# check for some common methods of building with pthread support
+# do this before the optional library checks as some of them require pthreads
+if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
+ if check_lib pthreads pthread.h pthread_join -pthread &&
+ check_lib pthreads pthread.h pthread_create -pthread; then
+ add_cflags -pthread
+ elif check_lib pthreads pthread.h pthread_join -pthreads &&
+ check_lib pthreads pthread.h pthread_create -pthreads; then
+ add_cflags -pthreads
+ elif check_lib pthreads pthread.h pthread_join -ldl -pthread &&
+ check_lib pthreads pthread.h pthread_create -ldl -pthread; then
+ add_cflags -ldl -pthread
+ elif check_lib pthreads pthread.h pthread_join -lpthreadGC2 &&
+ check_lib pthreads pthread.h pthread_create -lpthreadGC2; then
+ :
+ elif check_lib pthreads pthread.h pthread_join -lpthread &&
+ check_lib pthreads pthread.h pthread_create -lpthread; then
+ :
+ elif check_func pthread_join && check_func pthread_create; then
+ enable pthreads
+ fi
+ check_cc pthreads "pthread.h" "static pthread_mutex_t atomic_lock = PTHREAD_MUTEX_INITIALIZER"
+
+ if enabled pthreads; then
+ check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwait(s,0); sem_destroy(s)" $pthreads_extralibs
+ check_func pthread_cancel $pthreads_extralibs
+ fi
+fi
+
+enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion ||
+ check_lib zlib zlib.h zlibVersion -lz; }
+enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2
+enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma
+
+# On some systems dynamic loading requires no extra linker flags
+check_lib libdl dlfcn.h "dlopen dlsym" || check_lib libdl dlfcn.h "dlopen dlsym" -ldl
+
+check_lib libm math.h sin -lm
+
+atan2f_args=2
+copysign_args=2
+hypot_args=2
+ldexpf_args=2
+powf_args=2
+
+for func in $MATH_FUNCS; do
+ eval check_mathfunc $func \${${func}_args:-1} $libm_extralibs
+done
+
+for func in $COMPLEX_FUNCS; do
+ eval check_complexfunc $func \${${func}_args:-1}
+done
+
+# these are off by default, so fail if requested and not available
+enabled avisynth && require_headers "avisynth/avisynth_c.h"
+enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; }
+enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint
+enabled decklink && { require_headers DeckLinkAPI.h &&
+ { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0a0000" || die "ERROR: Decklink API version must be >= 10.10"; } }
+enabled frei0r && require_headers "frei0r.h dlfcn.h"
+enabled gmp && require gmp gmp.h mpz_export -lgmp
+enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init
+enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
+enabled ladspa && require_headers "ladspa.h dlfcn.h"
+enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version
+enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new ||
+ { enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } ||
+ die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; }
+enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" lilv_world_new
+enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
+enabled libass && require_pkg_config libass libass ass/ass.h ass_library_init
+enabled libbluray && require_pkg_config libbluray libbluray libbluray/bluray.h bd_open
+enabled libbs2b && require_pkg_config libbs2b libbs2b bs2b.h bs2b_open
+enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
+ { check_lib libcelt celt/celt.h celt_decoder_create_custom -lcelt0 ||
+ die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
+enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas
+enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2
+enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.5.0" "dav1d/dav1d.h" dav1d_version
+enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open
+enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
+enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
+enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
+ { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
+ warn "using libfdk without pkg-config"; } }
+flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
+enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
+enabled fontconfig && enable libfontconfig
+enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit
+enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
+enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info
+enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++
+enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu ||
+ require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
+enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
+ check_lib libgsm "${gsm_hdr}" gsm_create -lgsm && break;
+ done || die "ERROR: libgsm not found"; }
+enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc $pthreads_extralibs
+enabled libklvanc && require libklvanc libklvanc/vanc.h klvanc_context_create -lklvanc
+enabled libkvazaar && require_pkg_config libkvazaar "kvazaar >= 0.8.1" kvazaar.h kvz_api_get
+enabled liblensfun && require_pkg_config liblensfun lensfun lensfun.h lf_db_new
+# While it may appear that require is being used as a pkg-config
+# fallback for libmfx, it is actually being used to detect a different
+# installation route altogether. If libmfx is installed via the Intel
+# Media SDK or Intel Media Server Studio, these don't come with
+# pkg-config support. Instead, users should make sure that the build
+# can find the libraries and headers through other means.
+enabled libmfx && { check_pkg_config libmfx libmfx "mfx/mfxvideo.h" MFXInit ||
+ { require libmfx "mfx/mfxvideo.h" MFXInit "-llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } }
+if enabled libmfx; then
+ check_cc MFX_CODEC_VP9 "mfx/mfxvp9.h mfx/mfxstructures.h" "MFX_CODEC_VP9"
+fi
+
+enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
+enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs
+enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine ||
+ require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; }
+enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei ||
+ check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppc -lnppidei ||
+ die "ERROR: libnpp not found"; }
+enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
+enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
+enabled libopencv && { check_headers opencv2/core/core_c.h &&
+ { check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader ||
+ require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
+ require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
+enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
+enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
+ { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
+enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
+enabled libopenvino && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
+enabled libopus && {
+ enabled libopus_decoder && {
+ require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
+ }
+ enabled libopus_encoder && {
+ require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
+ }
+}
+enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
+enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection
+enabled librav1e && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new
+enabled librist && require_pkg_config librist "librist >= 0.2" librist/librist.h rist_receiver_create
+enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo
+enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket
+enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++"
+enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
+enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
+ require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
+enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
+enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
+enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
+enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
+enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
+enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc >= 0.8.4" EbSvtAv1Enc.h svt_av1_enc_init_handle
+enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
+enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
+enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
+enabled libtls && require_pkg_config libtls libtls tls.h tls_configure
+enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame &&
+ { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||
+ die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; }
+enabled libuavs3d && require_pkg_config libuavs3d "uavs3d >= 1.1.41" uavs3d.h uavs3d_decode
+enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl
+enabled libvidstab && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
+enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 1.5.2" libvmaf.h compute_vmaf
+enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
+enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
+ require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
+
+enabled libvpx && {
+ enabled libvpx_vp8_decoder && {
+ check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx ||
+ check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
+ }
+ enabled libvpx_vp8_encoder && {
+ check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx ||
+ check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
+ }
+ enabled libvpx_vp9_decoder && {
+ check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx ||
+ check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
+ }
+ enabled libvpx_vp9_encoder && {
+ check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx ||
+ check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
+ }
+ if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
+ die "libvpx enabled but no supported decoders found"
+ fi
+}
+
+enabled libwebp && {
+ enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
+ enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
+enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode ||
+ { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" &&
+ warn "using libx264 without pkg-config"; } } &&
+ require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
+ check_cpp_condition libx262 x264.h "X264_MPEG2"
+enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
+ require_cpp_condition libx265 x265.h "X265_BUILD >= 70"
+enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
+enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get
+enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
+enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version
+enabled libzmq && require_pkg_config libzmq "libzmq >= 4.2.1" zmq.h zmq_ctx_new
+enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
+ { test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" ||
+ enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; }
+enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion
+enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init ||
+ check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init ||
+ check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||
+ die "ERROR: mbedTLS not found"; }
+enabled mediacodec && { enabled jni || die "ERROR: mediacodec requires --enable-jni"; }
+enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
+ { ! enabled cross_compile &&
+ add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&
+ add_ldflags -L/opt/vc/lib/ &&
+ check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
+ die "ERROR: mmal not found" &&
+ check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
+enabled openal && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
+ check_lib openal 'AL/al.h' alGetError "${al_extralibs}" && break; done } ||
+ die "ERROR: openal not found"; } &&
+ { test_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" ||
+ die "ERROR: openal must be installed and version must be 1.1 or compatible"; }
+enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel ||
+ check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
+ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
+ die "ERROR: opencl not found"; } &&
+ { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
+ test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
+ die "ERROR: opencl must be installed and version must be 1.2 or compatible"; }
+enabled opengl && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL" ||
+ check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
+ check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
+ check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
+ die "ERROR: opengl not found."
+ }
+enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame ||
+ { ! enabled cross_compile &&
+ add_cflags -isystem/opt/vc/include/IL &&
+ test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame; } ||
+ die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } &&
+ enable omx
+enabled omx && require_headers OMX_Core.h
+enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
+ check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
+ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
+ check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
+ check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
+ check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
+ die "ERROR: openssl not found"; }
+enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
+enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
+ require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.7" rockchip/rk_mpi.h mpp_create &&
+ { enabled libdrm ||
+ die "ERROR: rkmpp requires --enable-libdrm"; }
+ }
+enabled vapoursynth && require_pkg_config vapoursynth "vapoursynth-script >= 42" VSScript.h vsscript_init
+
+
+if enabled gcrypt; then
+ GCRYPT_CONFIG="${cross_prefix}libgcrypt-config"
+ if "${GCRYPT_CONFIG}" --version > /dev/null 2>&1; then
+ gcrypt_cflags=$("${GCRYPT_CONFIG}" --cflags)
+ gcrypt_extralibs=$("${GCRYPT_CONFIG}" --libs)
+ check_func_headers gcrypt.h gcry_mpi_new $gcrypt_cflags $gcrypt_extralibs ||
+ die "ERROR: gcrypt not found"
+ add_cflags $gcrypt_cflags
+ else
+ require gcrypt gcrypt.h gcry_mpi_new -lgcrypt
+ fi
+fi
+
+if enabled sdl2; then
+ SDL2_CONFIG="${cross_prefix}sdl2-config"
+ test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h SDL_PollEvent
+ if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
+ sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
+ sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
+ test_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
+ test_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags &&
+ check_func_headers SDL_events.h SDL_PollEvent $sdl2_extralibs $sdl2_cflags &&
+ enable sdl2
+ fi
+ if test $target_os = "mingw32"; then
+ sdl2_extralibs=$(filter_out '-mwindows' $sdl2_extralibs)
+ fi
+fi
+
+if enabled decklink; then
+ case $target_os in
+ mingw32*|mingw64*|win32|win64)
+ decklink_outdev_extralibs="$decklink_outdev_extralibs -lole32 -loleaut32"
+ decklink_indev_extralibs="$decklink_indev_extralibs -lole32 -loleaut32"
+ ;;
+ esac
+fi
+
+enabled securetransport &&
+ check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
+ check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" ||
+ disable securetransport
+
+enabled securetransport &&
+ check_func SecItemImport "-Wl,-framework,CoreFoundation -Wl,-framework,Security"
+
+enabled schannel &&
+ check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 &&
+ test_cpp_condition winerror.h "defined(SEC_I_CONTEXT_EXPIRED)" &&
+ schannel_extralibs="-lsecur32" ||
+ disable schannel
+
+makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
+enabled makeinfo \
+ && [ 0$(makeinfo --version | grep "texinfo" | sed 's/.*texinfo[^0-9]*\([0-9]*\)\..*/\1/') -ge 5 ] \
+ && enable makeinfo_html || disable makeinfo_html
+disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
+perl -v > /dev/null 2>&1 && enable perl || disable perl
+pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
+rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
+
+# check V4L2 codecs available in the API
+if enabled v4l2_m2m; then
+ check_headers linux/fb.h
+ check_headers linux/videodev2.h
+ test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
+ check_cc v4l2_m2m linux/videodev2.h "int i = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M | V4L2_BUF_FLAG_LAST;"
+ check_cc vc1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VC1_ANNEX_G;"
+ check_cc mpeg1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG1;"
+ check_cc mpeg2_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG2;"
+ check_cc mpeg4_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG4;"
+ check_cc hevc_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_HEVC;"
+ check_cc h263_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_H263;"
+ check_cc h264_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_H264;"
+ check_cc vp8_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VP8;"
+ check_cc vp9_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VP9;"
+fi
+
+check_headers sys/videoio.h
+test_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
+
+check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
+check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
+# check that WM_CAP_DRIVER_CONNECT is defined to the proper value
+# w32api 3.12 had it defined wrong
+check_cpp_condition vfwcap_defines vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER"
+
+check_type "dshow.h" IBaseFilter
+
+# check for ioctl_meteor.h, ioctl_bt848.h and alternatives
+check_headers "dev/bktr/ioctl_meteor.h dev/bktr/ioctl_bt848.h" ||
+ check_headers "machine/ioctl_meteor.h machine/ioctl_bt848.h" ||
+ check_headers "dev/video/meteor/ioctl_meteor.h dev/video/bktr/ioctl_bt848.h" ||
+ check_headers "dev/ic/bt8xx.h"
+
+if check_struct sys/soundcard.h audio_buf_info bytes; then
+ enable_sanitized sys/soundcard.h
+else
+ test_cc -D__BSD_VISIBLE -D__XSI_VISIBLE <
+ audio_buf_info abc;
+EOF
+fi
+
+enabled alsa && { check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimestamp ||
+ check_lib alsa alsa/asoundlib.h snd_pcm_htimestamp -lasound; }
+
+enabled libjack &&
+ require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range
+
+enabled sndio && check_lib sndio sndio.h sio_open -lsndio
+
+if enabled libcdio; then
+ check_pkg_config libcdio libcdio_paranoia "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open ||
+ check_pkg_config libcdio libcdio_paranoia "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open ||
+ check_lib libcdio "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
+ check_lib libcdio "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
+ die "ERROR: No usable libcdio/cdparanoia found"
+fi
+
+enabled libxcb && check_pkg_config libxcb "xcb >= 1.4" xcb/xcb.h xcb_connect ||
+ disable libxcb_shm libxcb_shape libxcb_xfixes
+
+if enabled libxcb; then
+ enabled libxcb_shm && check_pkg_config libxcb_shm xcb-shm xcb/shm.h xcb_shm_attach
+ enabled libxcb_shape && check_pkg_config libxcb_shape xcb-shape xcb/shape.h xcb_shape_get_rectangles
+ enabled libxcb_xfixes && check_pkg_config libxcb_xfixes xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image
+fi
+
+check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs"
+
+# d3d11va requires linking directly to dxgi and d3d11 if not building for
+# the desktop api partition
+test_cpp <
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+#error desktop, not uwp
+#else
+// WINAPI_FAMILY_APP, WINAPI_FAMILY_PHONE_APP => UWP
+#endif
+#else
+#error no family set
+#endif
+EOF
+
+enabled libdrm &&
+ check_pkg_config libdrm_getfb2 libdrm "xf86drmMode.h" drmModeGetFB2
+
+enabled vaapi &&
+ check_pkg_config vaapi "libva >= 0.35.0" "va/va.h" vaInitialize
+
+if enabled vaapi; then
+ check_pkg_config vaapi_drm "libva-drm" "va/va_drm.h" vaGetDisplayDRM
+
+ if enabled xlib; then
+ check_pkg_config vaapi_x11 "libva-x11" "va/va_x11.h" vaGetDisplay
+ fi
+
+ check_cpp_condition vaapi_1 "va/va.h" "VA_CHECK_VERSION(1, 0, 0)"
+
+ check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC"
+ check_struct "va/va.h" "VADecPictureParameterBufferVP9" bit_depth
+ check_struct "va/va.h" "VADecPictureParameterBufferAV1" bit_depth_idx
+ check_type "va/va.h va/va_vpp.h" "VAProcFilterParameterBufferHDRToneMapping"
+ check_struct "va/va.h va/va_vpp.h" "VAProcPipelineCaps" rotation_flags
+ check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC"
+ check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG"
+ check_type "va/va.h va/va_enc_vp8.h" "VAEncPictureParameterBufferVP8"
+ check_type "va/va.h va/va_enc_vp9.h" "VAEncPictureParameterBufferVP9"
+fi
+
+if enabled_all opencl libdrm ; then
+ check_type "CL/cl_intel.h" "clCreateImageFromFdINTEL_fn" &&
+ enable opencl_drm_beignet
+ check_func_headers "CL/cl_ext.h" clImportMemoryARM &&
+ enable opencl_drm_arm
+fi
+
+if enabled_all opencl vaapi ; then
+ if enabled opencl_drm_beignet ; then
+ enable opencl_vaapi_beignet
+ else
+ check_type "CL/cl.h CL/cl_va_api_media_sharing_intel.h" "clCreateFromVA_APIMediaSurfaceINTEL_fn" &&
+ enable opencl_vaapi_intel_media
+ fi
+fi
+
+if enabled_all opencl dxva2 ; then
+ check_type "CL/cl_dx9_media_sharing.h" cl_dx9_surface_info_khr &&
+ enable opencl_dxva2
+fi
+
+if enabled_all opencl d3d11va ; then
+ check_type "CL/cl_d3d11.h" clGetDeviceIDsFromD3D11KHR_fn &&
+ enable opencl_d3d11
+fi
+
+enabled vdpau &&
+ check_cpp_condition vdpau vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP"
+
+enabled vdpau &&
+ check_lib vdpau_x11 "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau -lX11
+
+enabled crystalhd && check_lib crystalhd "stdint.h libcrystalhd/libcrystalhd_if.h" DtsCrystalHDVersion -lcrystalhd
+
+enabled vulkan &&
+ require_pkg_config vulkan "vulkan >= 1.1.97" "vulkan/vulkan.h" vkCreateInstance
+
+if enabled x86; then
+ case $target_os in
+ mingw32*|mingw64*|win32|win64|linux|cygwin*)
+ ;;
+ *)
+ disable ffnvcodec cuvid nvdec nvenc
+ ;;
+ esac
+elif enabled_any aarch64 ppc64 && ! enabled bigendian; then
+ case $target_os in
+ linux)
+ ;;
+ *)
+ disable ffnvcodec cuvid nvdec nvenc
+ ;;
+ esac
+else
+ disable ffnvcodec cuvid nvdec nvenc
+fi
+
+enabled ffnvcodec && enable cuda
+
+enabled nvenc &&
+ test_cc -I$source_path <
+NV_ENCODE_API_FUNCTION_LIST flist;
+void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_PRESET_HQ_GUID } }; }
+int main(void) { return 0; }
+EOF
+
+if enabled_any nvdec cuvid; then
+ check_type "ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h" "CUVIDAV1PICPARAMS"
+fi
+
+enabled amf &&
+ check_cpp_condition amf "AMF/core/Version.h" \
+ "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400090000"
+
+# Funny iconv installations are not unusual, so check it after all flags have been set
+if enabled libc_iconv; then
+ check_func_headers iconv.h iconv
+elif enabled iconv; then
+ check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv
+fi
+
+enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
+
+# add some useful compiler flags if supported
+check_cflags -Wdeclaration-after-statement
+check_cflags -Wall
+check_cflags -Wdisabled-optimization
+check_cflags -Wpointer-arith
+check_cflags -Wredundant-decls
+check_cflags -Wwrite-strings
+check_cflags -Wtype-limits
+check_cflags -Wundef
+check_cflags -Wmissing-prototypes
+check_cflags -Wno-pointer-to-int-cast
+check_cflags -Wstrict-prototypes
+check_cflags -Wempty-body
+
+if enabled extra_warnings; then
+ check_cflags -Wcast-qual
+ check_cflags -Wextra
+ check_cflags -Wpedantic
+fi
+
+check_disable_warning(){
+ warning_flag=-W${1#-Wno-}
+ test_cflags $unknown_warning_flags $warning_flag && add_cflags $1
+}
+
+test_cflags -Werror=unused-command-line-argument &&
+ append unknown_warning_flags "-Werror=unused-command-line-argument"
+test_cflags -Werror=unknown-warning-option &&
+ append unknown_warning_flags "-Werror=unknown-warning-option"
+
+check_disable_warning -Wno-parentheses
+check_disable_warning -Wno-switch
+check_disable_warning -Wno-format-zero-length
+check_disable_warning -Wno-pointer-sign
+check_disable_warning -Wno-unused-const-variable
+check_disable_warning -Wno-bool-operation
+check_disable_warning -Wno-char-subscripts
+
+check_disable_warning_headers(){
+ warning_flag=-W${1#-Wno-}
+ test_cflags $warning_flag && add_cflags_headers $1
+}
+
+check_disable_warning_headers -Wno-deprecated-declarations
+check_disable_warning_headers -Wno-unused-variable
+
+test_cc < $TMPV
+ if test_ldflags -Wl,${version_script},$TMPV; then
+ append SHFLAGS '-Wl,${version_script},\$(SUBDIR)lib\$(NAME).ver'
+ quotes='""'
+ test_cc <= 1400" &&
+ add_cflags -Qansi-alias
+ # Some inline asm is not compilable in debug
+ if enabled debug; then
+ disable ebp_available
+ disable ebx_available
+ fi
+ fi
+ # msvcrt10 x64 incorrectly enables log2, only msvcrt12 (MSVC 2013) onwards actually has log2.
+ check_cpp_condition log2 crtversion.h "_VC_CRT_MAJOR_VERSION >= 12"
+ # The CRT headers contain __declspec(restrict) in a few places, but if redefining
+ # restrict, this might break. MSVC 2010 and 2012 fail with __declspec(__restrict)
+ # (as it ends up if the restrict redefine is done before including stdlib.h), while
+ # MSVC 2013 and newer can handle it fine.
+ # If this declspec fails, force including stdlib.h before the restrict redefinition
+ # happens in config.h.
+ if [ $restrict_keyword != restrict ]; then
+ test_cc <= 190024218" ||
+ check_cflags -d2SSAOptimizer-
+ # enable utf-8 source processing on VS2015 U2 and newer
+ test_cpp_condition windows.h "_MSC_FULL_VER >= 190023918" &&
+ add_cflags -utf-8
+fi
+
+for pfx in "" host_; do
+ varname=${pfx%_}cc_type
+ eval "type=\$$varname"
+ if [ "$type" = "msvc" ]; then
+ test_${pfx}cc < Makefile
+
+esc(){
+ echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
+}
+
+echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" > ffbuild/config.fate
+
+enabled stripping || strip="echo skipping strip"
+enabled stripping || striptype=""
+
+config_files="$TMPH ffbuild/config.mak doc/config.texi"
+
+cat > ffbuild/config.mak <> ffbuild/config.mak' $LIBRARY_LIST
+
+for entry in $LIBRARY_LIST $PROGRAM_LIST $EXTRALIBS_LIST; do
+ eval echo "EXTRALIBS-${entry}=\$${entry}_extralibs" >> ffbuild/config.mak
+done
+
+cat > $TMPH <>$TMPH
+
+test -n "$malloc_prefix" &&
+ echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH
+
+if enabled x86asm; then
+ append config_files $TMPASM
+ cat > $TMPASM <> $TMPH
+
+
+mkdir -p doc
+mkdir -p tests
+mkdir -p tests/api
+echo "@c auto-generated by configure - do not modify! " > doc/config.texi
+
+print_config ARCH_ "$config_files" $ARCH_LIST
+print_config HAVE_ "$config_files" $HAVE_LIST
+print_config CONFIG_ "$config_files" $CONFIG_LIST \
+ $CONFIG_EXTRA \
+ $ALL_COMPONENTS \
+
+echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
+echo "endif # FFMPEG_CONFIG_MAK" >> ffbuild/config.mak
+
+# Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
+cp_if_changed $TMPH config.h
+touch ffbuild/.config
+
+enabled x86asm && cp_if_changed $TMPASM config.asm
+
+cat > $TMPH <> $TMPH
+
+cp_if_changed $TMPH libavutil/avconfig.h
+
+# full_filter_name_foo=vf_foo
+# full_filter_name_bar=asrc_bar
+# ...
+eval "$(sed -n "s/^extern AVFilter ff_\([avfsinkrc]\{2,5\}\)_\(.*\);/full_filter_name_\2=\1_\2/p" $source_path/libavfilter/allfilters.c)"
+
+# generate the lists of enabled components
+print_enabled_components(){
+ file=$1
+ struct_name=$2
+ name=$3
+ shift 3
+ echo "static const $struct_name * const $name[] = {" > $TMPH
+ for c in $*; do
+ if enabled $c; then
+ case $name in
+ filter_list)
+ eval c=\$full_filter_name_${c%_filter}
+ ;;
+ indev_list)
+ c=${c%_indev}_demuxer
+ ;;
+ outdev_list)
+ c=${c%_outdev}_muxer
+ ;;
+ esac
+ printf " &ff_%s,\n" $c >> $TMPH
+ fi
+ done
+ if [ "$name" = "filter_list" ]; then
+ for c in asrc_abuffer vsrc_buffer asink_abuffer vsink_buffer; do
+ printf " &ff_%s,\n" $c >> $TMPH
+ done
+ fi
+ echo " NULL };" >> $TMPH
+ cp_if_changed $TMPH $file
+}
+
+print_enabled_components libavfilter/filter_list.c AVFilter filter_list $FILTER_LIST
+print_enabled_components libavcodec/codec_list.c AVCodec codec_list $CODEC_LIST
+print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list $PARSER_LIST
+print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST
+print_enabled_components libavformat/demuxer_list.c AVInputFormat demuxer_list $DEMUXER_LIST
+print_enabled_components libavformat/muxer_list.c AVOutputFormat muxer_list $MUXER_LIST
+print_enabled_components libavdevice/indev_list.c AVInputFormat indev_list $INDEV_LIST
+print_enabled_components libavdevice/outdev_list.c AVOutputFormat outdev_list $OUTDEV_LIST
+print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $PROTOCOL_LIST
+
+# Settings for pkg-config files
+
+cat > $TMPH <> $TMPH
+done
+
+cp_if_changed $TMPH ffbuild/config.sh
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/disable_decoder_config.sh b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/disable_decoder_config.sh
new file mode 100755
index 0000000000000000000000000000000000000000..4a79ad1342983705670622fba008e2c285b7b2cd
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/disable_decoder_config.sh
@@ -0,0 +1,88 @@
+# Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2022. All rights reserved.
+
+echo `pwd`
+CUR_DIR=$(pwd)
+CC_PATH=$1
+
+echo "CC_PATH=${CC_PATH}"
+CFG_SDK_TOOLCHAIN=$CC_PATH/
+
+configure_attr=" --prefix=./install \
+ --disable-autodetect \
+ --enable-cross-compile \
+ --disable-doc \
+ --disable-htmlpages \
+ --disable-manpages \
+ --disable-podpages \
+ --disable-txtpages \
+ --target-os=linux \
+ --enable-shared \
+ --disable-static \
+ --disable-swscale-alpha \
+ --disable-debug \
+ --disable-iconv \
+ --enable-small \
+ --disable-network \
+ --disable-filters \
+ --disable-devices \
+ --disable-programs \
+ --disable-ffplay \
+ --enable-swresample \
+ --disable-swscale \
+ --disable-avdevice \
+ --disable-postproc \
+ --disable-avfilter \
+ --disable-protocols \
+ --disable-pthreads \
+ --disable-runtime-cpudetect \
+ --disable-faan
+ --disable-everything \
+ --enable-pic \
+ --enable-protocol=file \
+ --disable-muxers \
+ --enable-demuxer=mov\
+ --enable-demuxer=mpegts\
+ --enable-demuxer=mp3 \
+ --enable-demuxer=aac \
+ --enable-parser=hevc \
+ --enable-parser=h264 \
+ --enable-decoder=mp2 \
+ --enable-decoder=mp3 \
+ --enable-decoder=aac \
+ --disable-neon \
+ --disable-inline-asm \
+ --disable-asm \
+ --disable-armv6 \
+ --disable-armv6t2 \
+ --disable-armv5te \
+ --disable-vfp \
+ --disable-hardcoded-tables \
+ --disable-mediacodec \
+ --disable-mediafoundation \
+ --enable-bsf=h264_mp4toannexb \
+ --enable-bsf=hevc_mp4toannexb \
+ --disable-pixelutils \
+ --enable-demuxer=wav \
+ --disable-gpl \
+ --disable-zlib \
+ --disable-w32threads --disable-os2threads --disable-alsa --disable-appkit --disable-avfoundation \
+ --disable-bzlib --disable-coreimage --disable-iconv --disable-libxcb --disable-libxcb-shm \
+ --disable-libxcb-xfixes --disable-libxcb-shape --disable-lzma --disable-sndio --disable-schannel \
+ --disable-sdl2 --disable-securetransport --disable-xlib --disable-amf --disable-audiotoolbox \
+ --disable-cuda-llvm --disable-cuvid --disable-nvdec --disable-nvenc --disable-vaapi --disable-vdpau \
+ --disable-videotoolbox --disable-ossfuzz --disable-swscale-alpha \
+ --disable-valgrind-backtrace \
+ --disable-linux-perf \
+ --disable-large-tests \
+ --cpu=cortex-a55 --arch=armv7-a --cross-prefix=${CFG_SDK_TOOLCHAIN} "
+
+echo ${configure_attr}
+echo ${CFG_SDK_TOOLCHAIN}
+
+export http_proxy=""
+export https_proxy=""
+export no_proxy=""
+
+sed -i "/^LD=/cLD=$CC_PATH/clang" configure_temp
+
+${CFG_CONFIGURE:=./configure_temp} ${configure_attr} --extra-cflags="-mfloat-abi=softfp -mfpu=neon-vfpv4 -fPIC -fstack-protector-all -s -ftrapv" --extra-ldflags="-Wl,-z,relro,-z,now -fPIC"
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/library.mak b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/library.mak
new file mode 100755
index 0000000000000000000000000000000000000000..6c15f6c78c9c49a92e3cbe0d54b90cc5bf7adf96
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/ffmpeg_adapt/library.mak
@@ -0,0 +1,106 @@
+include $(SRC_PATH)/ffbuild/common.mak
+
+ifeq (,$(filter %clean config,$(MAKECMDGOALS)))
+-include $(SUBDIR)lib$(NAME).version
+endif
+
+LIBVERSION := $(lib$(NAME)_VERSION)
+LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR)
+LIBMINOR := $(lib$(NAME)_VERSION_MINOR)
+INCINSTDIR := $(INCDIR)/lib$(NAME)
+
+INSTHEADERS := $(INSTHEADERS) $(HEADERS:%=$(SUBDIR)%)
+
+all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME) $(SUBDIR)lib$(FULLNAME).pc
+all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME) $(SUBDIR)lib$(FULLNAME).pc
+
+LIBOBJS := $(OBJS) $(SUBDIR)%.h.o $(TESTOBJS)
+$(LIBOBJS) $(LIBOBJS:.o=.s) $(LIBOBJS:.o=.i): CPPFLAGS += -DHAVE_AV_CONFIG_H
+
+$(SUBDIR)$(LIBNAME): $(OBJS)
+ $(RM) $@
+ $(AR) $(ARFLAGS) $(AR_O) $^
+ $(RANLIB) $@
+
+install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig
+
+install-libs-$(CONFIG_STATIC): install-lib$(NAME)-static
+install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared
+
+define RULES
+$(TOOLS): THISLIB = $(FULLNAME:%=$(LD_LIB))
+$(TESTPROGS): THISLIB = $(SUBDIR)$(LIBNAME)
+
+$(LIBOBJS): CPPFLAGS += -DBUILDING_$(NAME)
+
+$(TESTPROGS) $(TOOLS): %$(EXESUF): %.o
+ $$(LD) $(LDFLAGS) $(LDEXEFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) $(FFEXTRALIBS) $$(EXTRALIBS-$$(*F)) $$(ELIBS)
+
+$(SUBDIR)lib$(NAME).version: $(SUBDIR)version.h | $(SUBDIR)
+ $$(M) $$(SRC_PATH)/ffbuild/libversion.sh $(NAME) $$< > $$@
+
+$(SUBDIR)lib$(FULLNAME).pc: $(SUBDIR)version.h ffbuild/config.sh | $(SUBDIR)
+ $$(M) $$(SRC_PATH)/ffbuild/pkgconfig_generate.sh $(NAME) "$(DESC)"
+
+$(SUBDIR)lib$(NAME).ver: $(SUBDIR)lib$(NAME).v $(OBJS)
+ $$(M)sed 's/MAJOR/$(lib$(NAME)_VERSION_MAJOR)/' $$< | $(VERSION_SCRIPT_POSTPROCESS_CMD) > $$@
+
+$(SUBDIR)$(SLIBNAME):
+
+$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SLIBOBJS) $(SUBDIR)lib$(NAME).ver
+ $(SLIB_CREATE_DEF_CMD)
+ $$(LD) $(SHFLAGS) $(LDFLAGS) $(LDSOFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
+ $(SLIB_EXTRA_CMD)
+
+ifdef SUBDIR
+$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)
+endif
+
+clean::
+ $(RM) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
+ $(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) $(CLEANSUFFIXES:%=$(SUBDIR)tests/%)
+
+install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
+ $(Q)mkdir -p "$(SHLIBDIR)"
+ $$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)"
+ $$(STRIP) "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)"
+ $(Q)$(foreach F,$(SLIB_INSTALL_LINKS),(cd "$(SHLIBDIR)" && $(LN_S) $(SLIB_INSTALL_NAME) $(F));)
+ $(if $(SLIB_INSTALL_EXTRA_SHLIB),$$(INSTALL) -m 644 $(SLIB_INSTALL_EXTRA_SHLIB:%=$(SUBDIR)%) "$(SHLIBDIR)")
+ $(if $(SLIB_INSTALL_EXTRA_LIB),$(Q)mkdir -p "$(LIBDIR)")
+ $(if $(SLIB_INSTALL_EXTRA_LIB),$$(INSTALL) -m 644 $(SLIB_INSTALL_EXTRA_LIB:%=$(SUBDIR)%) "$(LIBDIR)")
+
+install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME)
+ $(Q)mkdir -p "$(LIBDIR)"
+ $$(INSTALL) -m 644 $$< "$(LIBDIR)"
+ $(LIB_INSTALL_EXTRA_CMD)
+
+install-lib$(NAME)-headers: $(addprefix $(SUBDIR),$(HEADERS) $(BUILT_HEADERS))
+ $(Q)mkdir -p "$(INCINSTDIR)"
+ $$(INSTALL) -m 644 $$^ "$(INCINSTDIR)"
+
+install-lib$(NAME)-pkgconfig: $(SUBDIR)lib$(FULLNAME).pc
+ $(Q)mkdir -p "$(PKGCONFIGDIR)"
+ $$(INSTALL) -m 644 $$^ "$(PKGCONFIGDIR)"
+
+uninstall-libs::
+ -$(RM) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
+ "$(SHLIBDIR)/$(SLIBNAME)" \
+ "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
+ -$(RM) $(SLIB_INSTALL_EXTRA_SHLIB:%="$(SHLIBDIR)/%")
+ -$(RM) $(SLIB_INSTALL_EXTRA_LIB:%="$(LIBDIR)/%")
+ -$(RM) "$(LIBDIR)/$(LIBNAME)"
+
+uninstall-headers::
+ $(RM) $(addprefix "$(INCINSTDIR)/",$(HEADERS) $(BUILT_HEADERS))
+ -rmdir "$(INCINSTDIR)"
+
+uninstall-pkgconfig::
+ $(RM) "$(PKGCONFIGDIR)/lib$(FULLNAME).pc"
+endef
+
+$(eval $(RULES))
+
+$(TOOLS): $(DEP_LIBS) $(SUBDIR)$($(CONFIG_SHARED:yes=S)LIBNAME)
+$(TESTPROGS): $(DEP_LIBS) $(SUBDIR)$(LIBNAME)
+
+testprogs: $(TESTPROGS)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/LICENSE b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/LICENSE
new file mode 100755
index 0000000000000000000000000000000000000000..25c587c550d71308153acc0e30b53ef46cd690cd
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/LICENSE
@@ -0,0 +1,59 @@
+End User License Agreement
+
+THIS END USER LICENSE AGREEMENT (“AGREEMENT”) IS A LEGAL AGREEMENT BETWEEN YOU (EITHER A SINGLE INDIVIDUAL, OR SINGLE LEGAL ENTITY) AND HISILICON (SHANGHAI) TECHNOLOGIES CO., LTD. ("HISILICON") FOR THE USE OF THE SOFTWARE ACCOMPANYING THIS AGREEMENT. HISILICON IS ONLY WILLING TO LICENSE THE SOFTWARE TO YOU ON CONDITION THAT YOU ACCEPT ALL OF THE TERMS IN THIS AGREEMENT. BY CLICKING “I AGREE” OR BY INSTALLING OR OTHERWISE USING OR COPYING THE SOFTWARE YOU INDICATE THAT YOU AGREE TO BE BOUND BY ALL OF THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, HISILICON IS UNWILLING TO LICENSE THE SOFTWARE TO YOU AND YOU MAY NOT INSTALL, USE OR COPY THE SOFTWARE, AND YOU SHALL PROMPTLY DESTROY, DELETE, OR RETURN THE SOFTWARE TO YOUR SUPPLIER.
+
+“SOFTWARE” means the software in object code provided under the terms of this Agreement.
+
+Shenzhen Longgang District is the signing place of this Agreement.
+
+1. GRANT OF LICENSE
+In consideration of your agreement to abide by the following terms, and subject to the terms and conditions of this Agreement, HISILICON hereby grants YOU, a non-transferable, non-exclusive, royalty-free, revocable, worldwide copyright license (without the right to sublicense) to use and copy the SOFTWARE solely for the purpose of designing or developing applications for use in conjunction with Hisilicon chip.
+.
+
+All rights to the SOFTWARE and all intellectual property rights contained therein shall remain the sole and exclusive property of HISILICON. The SOFTWARE is licensed not sold. Except as expressly licensed in Clause 1, in no event shall the license granted in this Clause 1 be construed as granting YOU expressly or by implication, estoppels or otherwise, licenses to any intellectual property rights, including but not limited to patent rights, copyrights, trademark or trade secret in the SOFTWARE.
+
+No right is granted to YOU under this Agreement to manufacture, have manufactured, or sell, supply or distribute any products which have taken into use or which embody any of the SOFTWARE or any of the intellectual property rights embodied therein.
+
+2. RESTRICTIONS
+This Agreement does not prevent YOU from using the SOFTWARE for internal benchmarking purposes.
+
+However, YOU shall treat any and all benchmarking data relating to the SOFTWARE, and any other results of your use or testing of the SOFTWARE which are indicative of its performance, efficacy, reliability or quality, as confidential information and YOU shall not disclose such information to any third party without the express written permission of HISILICON.
+
+YOU shall reproduce and not remove or obscure any notice incorporated by HISILICON in the SOFTWARE to protect HISILICON’s intellectual property rights embodied therein.
+
+YOU shall not decompile, disassemble, or reverse engineer the SOFTWARE.
+
+YOU shall not distribute the SOFTWARE under an open source license as listed by the Open Source Initiative (a non-profit corporation whose website is www.opensource.org), or other license which requires the source code or object code of the SOFTWARE to be licensed or otherwise shared with any third party.
+
+3. FEEDBACK
+YOU may choose to provide suggestions, comments, feedback, ideas, modifications or know-how (whether in oral or written form) relating to the use of the SOFTWARE ("Feedback") to HISILICON under the terms of this Agreement. YOU hereby grants to HISILICON and its affiliates, under all of you and your affiliates’ (as applicable) intellectual property rights, a perpetual, irrevocable, royalty free, non-exclusive, worldwide license to (i) use, copy and modify the Feedback; (ii) sell, supply, or otherwise distribute the Feedback; (iii) design, have designed, manufacture, have manufactured, use, import, sell, and otherwise distribute and dispose of products that incorporate the Feedback; and (iv) sublicense (together with the rights to further sublicense) the rights granted in this paragraph to any third party.
+
+4. NO WARRANTY
+YOU AGREE THAT THE SOFTWARE IS PROVIDED BY HISILICON ON AN "AS IS" BASIS. HISILICON MAKES NO WARRANTY, EXPRESSED OR IMPLIED OR STATUTORY, WITH RESPECT TO ANY OF THE SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.
+
+YOU EXPRESSLY ASSUME ALL LIABILITIES AND RISKS, FOR USE OR OPERATION OF THE SOFTWARE, INCLUDING WITHOUT LIMITATION, SOFTWARE APPLICATIONS DESIGNED OR INTENDED FOR MISSION CRITICAL APPLICATIONS, SUCH AS PACEMAKERS, WEAPONRY, AIRCRAFT NAVIGATION, FACTORY CONTROL SYSTEMS, ETC. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+5. NO LIABILITY
+PLEASE READ THE INSTRUCTIONS COMPLETELY, AND PLEASE NOTE THAT YOU SHOULD USE THE SOFTWARE AT YOUR OWN RISK.
+
+IN NO EVENT SHALL HISILICON BE LIABLE FOR ANY DIRECT OR INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHER LEGAL THEORY, EVEN IF HISILICON HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF THE SOFTWARE HAS ANY MATERIAL, VERIFIABLE, AND REPRODUCIBLE PROGRAM ERRORS, HISILICON SHALL HAVE NO LIABILITY TO MODIFY SUCH ERRORS.
+
+NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED IN THIS AGREEMENT, THE MAXIMUM LIABILITY OF HISILICON TO YOU IN AGGREGATE FOR ALL CLAIMS MADE AGAINST HISILICON IN CONTRACT TORT OR OTHERWISE UNDER OR IN CONNECTION WITH THE SUBJECT MATTER OF THIS AGREEMENT SHALL NOT EXCEED THE TOTAL OF SUMS RECEIVED BY HISILICON FROM YOU FOR THIS AGREEMENT. THE EXISTENCE OF MORE THAN ONE CLAIM WILL NOT ENLARGE OR EXTEND THE LIMIT.
+
+6. CONFIDENTIALITY
+YOU acknowledge and agree that the SOFTWARE and any benchmarking data and related information provided under this Agreement contain trade secrets and confidential material of HISILICON and YOU agree to maintain all such information in confidence and apply security measures no less stringent than the measures which YOU apply to protect your own like information, but not less than a reasonable degree of care, to prevent their unauthorized disclosure and use. The period of confidentiality shall be indefinite. YOU agree not to use any such information other than in normal use of the SOFTWARE under the license granted in this Agreement.
+
+7. TERM AND TERMINATION
+This Agreement shall remain in force until terminated. HISILICON may terminate this Agreement at any time with or without any cause. Upon termination of this Agreement, YOU shall immediately stop using the SOFTWARE and confidential information and destroy all copies of the SOFTWARE and confidential information in your possession, together with all documentation and related materials. The provisions of clauses 3, 4, 5, 6, 7 and 8 shall survive termination of this Agreement.
+
+8. GENERAL
+Any provision of this Agreement which is prohibited or unenforceable in any jurisdiction shall be ineffective to the extent of such prohibition or unenforceability without affecting, impairing or invalidating the remaining provisions hereof.
+
+The failure by HISILICON to enforce any of the provisions of this Agreement, unless waived in writing, shall not constitute a waiver of HISILICON's rights to enforce such provision or any other provision of this Agreement in the future.
+At HISILICON’s request, YOU agree to check your computers for installations of the SOFTWARE and any other information requested by HISILICON relating to SOFTWARE installation and to provide this information to HISILICON. YOU agree that employees or auditors nominated by HISILICON may also perform such checking and reporting on behalf of HISILICON by prior appointment during your normal business hours on seven (7) days’ notice. HISILICON shall bear the auditors’ costs for that audit unless it reveals unlicensed usage in which case YOU shall promptly reimburse HISILICON for all reasonable costs and expenses, including professional fees, relating to such audit.
+
+The SOFTWARE provided under this Agreement is subject to U.S. export control laws, including the U.S. Export Administration Act and its associated regulations, and may be subject to export or import regulations in other countries. YOU agree to comply fully with all laws and regulations of the United States and other countries ("Export Laws") to assure that the SOFTWARE, is not (1) exported, directly or indirectly, in violation of Export Laws, either to any countries that are subject to U.S.A. export restrictions or to any end user who has been prohibited from participating in the U.S.A. export transactions by any federal agency of the U.S.A. government; or (2) intended to be used for any purpose prohibited by Export Laws, including, without limitation, nuclear, chemical, or biological weapons proliferation.
+
+This Agreement shall be governed by and construed in accordance with the laws of People’s Republic of China, without reference to the principles of conflicts of laws. Any dispute arising out of or relating to this Agreement shall be submitted to Shenzhen Longgang District People’s court and the parties waive all objections to that jurisdiction and venue.
+
+Some open-source software components may be used in the Software. If the applicable licenses of these open-source software components conflict with the content in this Agreement, the licenses of the open-source software components will prevail.
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/linux_cbb_list.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/linux_cbb_list.h
new file mode 100755
index 0000000000000000000000000000000000000000..fe01e7c8644aee7721654ed619b34c7e581f82aa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/linux_cbb_list.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_condition.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_condition.h
new file mode 100755
index 0000000000000000000000000000000000000000..d8c1de10e402a41f60960a6df6484d3237257103
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_condition.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_defs.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_defs.h
new file mode 100755
index 0000000000000000000000000000000000000000..6949464fdc053dbed067fa621d4b5135a9ad621a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_defs.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_error_def.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_error_def.h
new file mode 100755
index 0000000000000000000000000000000000000000..ca769450fc1126a2a1b7ecb2aebbe1d44356fc5a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_error_def.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_list.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_list.h
new file mode 100755
index 0000000000000000000000000000000000000000..19e4e432152b42404743a5293f88dd6f48eb59f0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_list.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_mutex.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_mutex.h
new file mode 100755
index 0000000000000000000000000000000000000000..9cb752ad4b65756329e3fbb95c5e91e1de8080b2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_mutex.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_mw_type.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_mw_type.h
new file mode 100755
index 0000000000000000000000000000000000000000..7c0596aa241110a569bfbfe44c7c0ff175deb19a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_mw_type.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_track_source.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_track_source.h
new file mode 100755
index 0000000000000000000000000000000000000000..ee55b84b7420bdd7240a5c33b516dc27ae7ea5c2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/include/ot_track_source.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/log/include/ss_log.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/log/include/ss_log.h
new file mode 100755
index 0000000000000000000000000000000000000000..77d09f6f4040f1fcc1cc04d67e32171be286e7d6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/log/include/ss_log.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/log/lib/ss928v100/clang_musl/libmwlog.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/log/lib/ss928v100/clang_musl/libmwlog.so
new file mode 100755
index 0000000000000000000000000000000000000000..60c1a91bdd221c731caff1a56cc9fe2d371ba7f9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/log/lib/ss928v100/clang_musl/libmwlog.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/ottimer/include/ot_timer_err.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/ottimer/include/ot_timer_err.h
new file mode 100755
index 0000000000000000000000000000000000000000..20d266efb9cf6611130cdeb4f8032b5251ffa7bd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/ottimer/include/ot_timer_err.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/ottimer/include/ss_timer_ext.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/ottimer/include/ss_timer_ext.h
new file mode 100755
index 0000000000000000000000000000000000000000..2d78c035a740dd603c075ab67ff8bc73f656e74b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/ottimer/include/ss_timer_ext.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/ottimer/lib/ss928v100/clang_musl/libottimer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/ottimer/lib/ss928v100/clang_musl/libottimer.so
new file mode 100755
index 0000000000000000000000000000000000000000..f7c0e7edd1ececf719b2e73d0af8e02022f49ca9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/ottimer/lib/ss928v100/clang_musl/libottimer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/uproc/include/ss_userproc.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/uproc/include/ss_userproc.h
new file mode 100755
index 0000000000000000000000000000000000000000..1488f47ddea595476a7aed5a94ad0a1534ae3d41
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/uproc/include/ss_userproc.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/uproc/lib/ss928v100/clang_musl/libuproc.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/uproc/lib/ss928v100/clang_musl/libuproc.so
new file mode 100755
index 0000000000000000000000000000000000000000..13243c3df64a645411995279354d6bf73a2c4967
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/common/uproc/lib/ss928v100/clang_musl/libuproc.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/Makefile.rel b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/Makefile.rel
new file mode 100755
index 0000000000000000000000000000000000000000..93ad231a8dc9d3451c1a0c4ae42f479be5d8c9bf
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/Makefile.rel
@@ -0,0 +1,24 @@
+MIDDLEWARE_DIR := $(shell pwd)/../..
+include $(MIDDLEWARE_DIR)/base.mak
+
+.PHONY: all clean install
+
+LIB_PATH = $(shell pwd)/lib/$(CFG_CHIP_TYPE)/$(COMPILE_TYPE)
+HEADER_PATH = $(shell pwd)/include
+LIB_FILE=$(LIB_PATH)/*.a
+DLL_FILE=$(LIB_PATH)/*.so
+HEADER_FILE=$(HEADER_PATH)/*.h
+
+ifeq ($(CFG_CHIP_TYPE_SS928V100)$(CFG_CHIP_TYPE_HI3516DV500), y)
+all: $(LIB_FILE) $(DLL_FILE) $(HEADER_FILE)
+install: all
+ cp -rf $(LIB_FILE) $(OUT_LIB_DIR)/
+ cp -rf $(DLL_FILE) $(OUT_LIB_DIR)/
+ cp -rf $(HEADER_FILE) $(OUT_HEADER_DIR)/
+# Clean this project
+clean:
+else
+all:
+install:
+clean:
+endif
\ No newline at end of file
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ot_af_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ot_af_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..09989f1ed946fa99276344f25e4ff02511e1a6a5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ot_af_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ot_af_tuning_info.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ot_af_tuning_info.h
new file mode 100755
index 0000000000000000000000000000000000000000..c29df34fae32738618b770dded9b64b1ed3ecb5a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ot_af_tuning_info.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ot_motor.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ot_motor.h
new file mode 100755
index 0000000000000000000000000000000000000000..3a41bf520065dbbdec4c9324a1398911d989b0ec
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ot_motor.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_af_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_af_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..117ee34454e25891c85048566bfd0e577b48a4ea
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_af_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_calibration.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_calibration.h
new file mode 100755
index 0000000000000000000000000000000000000000..c3f412eea389430f42a043ce66cee805810395c8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_calibration.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_calibration_data.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_calibration_data.h
new file mode 100755
index 0000000000000000000000000000000000000000..8c16e8881c6e28ce55e866bc278006d2ad5f5648
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_calibration_data.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_cdaf.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_cdaf.h
new file mode 100755
index 0000000000000000000000000000000000000000..a1b43152f75d7f50ced19e3260494180384cfa18
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_cdaf.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_daaf.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_daaf.h
new file mode 100755
index 0000000000000000000000000000000000000000..6cc110e9f266037c427e58dbd4c4abed5f8d2062
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_daaf.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_pdaf.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_pdaf.h
new file mode 100755
index 0000000000000000000000000000000000000000..9b313c2aef57e63296eb4b8d70ff3981ebee4156
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_pdaf.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_scene_detection.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_scene_detection.h
new file mode 100755
index 0000000000000000000000000000000000000000..628f978a6d5064e49bb0d18c965b18c63fe66ca0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/include/ss_scene_detection.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/include/af_actuator.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/include/af_actuator.h
new file mode 100755
index 0000000000000000000000000000000000000000..1b642ffe357f97f83ed9a8bbc9e9cbb8881f8961
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/include/af_actuator.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/cdaf_ctrl/cdaf_ctrl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/cdaf_ctrl/cdaf_ctrl.h
new file mode 100755
index 0000000000000000000000000000000000000000..5ef642d2f6d9c48cf00e529a7ecc19b9649221c0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/cdaf_ctrl/cdaf_ctrl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/daaf_ctrl/daaf_ctrl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/daaf_ctrl/daaf_ctrl.h
new file mode 100755
index 0000000000000000000000000000000000000000..0715266669e266633ae0b7abef2e6789c86241fe
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/daaf_ctrl/daaf_ctrl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/defocus_to_code/defocus_to_code.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/defocus_to_code/defocus_to_code.h
new file mode 100755
index 0000000000000000000000000000000000000000..a6dfbc126aa71b7e4fb3bc2c29229cc57731ee99
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/defocus_to_code/defocus_to_code.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/pdaf_ctrl/pdaf_ctrl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/pdaf_ctrl/pdaf_ctrl.h
new file mode 100755
index 0000000000000000000000000000000000000000..a658e951157de6dd6b3b5dfdd3d7c4679f22bbc1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/pdaf_ctrl/pdaf_ctrl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/zoom_track/zoom_track.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/zoom_track/zoom_track.h
new file mode 100755
index 0000000000000000000000000000000000000000..fe6f6c1edd45a8fe4aee9dfdbbe8f8fd527b439a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_actuator/src/zoom_track/zoom_track.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_capability_manager/include/af_capability_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_capability_manager/include/af_capability_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..a0dd3822ceb075e0caceebdc7c3978bab96be7a3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_capability_manager/include/af_capability_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_common/af_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_common/af_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..a03cf4b138714c38d81891e76c5a848cd800ead6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_common/af_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_common/common_queue.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_common/common_queue.h
new file mode 100755
index 0000000000000000000000000000000000000000..a072d44cddb0703cd89cf1437d3fa917626aaa02
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_common/common_queue.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/include/af_monitor.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/include/af_monitor.h
new file mode 100755
index 0000000000000000000000000000000000000000..95f1dbeb02c541ad6106d99f586f1cbbbc19691c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/include/af_monitor.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/focus_evaluation/focus_evaluation.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/focus_evaluation/focus_evaluation.h
new file mode 100755
index 0000000000000000000000000000000000000000..4e702e309fa7a738d45a744d81ff74720ef8483d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/focus_evaluation/focus_evaluation.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/focus_window_manager/focus_window_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/focus_window_manager/focus_window_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..e3c9fd17e76288f9a95337d0bc816a9ebb5090a2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/focus_window_manager/focus_window_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/policy_manager/policy_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/policy_manager/policy_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..b7618e0d17c662c1c180079219cd7bec98ada498
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/policy_manager/policy_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/scene_detection/scene_detection.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/scene_detection/scene_detection.h
new file mode 100755
index 0000000000000000000000000000000000000000..b1d3d1b3e30a18468dbbef64a92f74224b8a5a79
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/scene_detection/scene_detection.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/state_manager/state_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/state_manager/state_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..34f0b8872c9479c487dfe5c7e675d1d2dc4713b6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/state_manager/state_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/trigger/trigger.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/trigger/trigger.h
new file mode 100755
index 0000000000000000000000000000000000000000..cb222db9ab8b462229c205b789038a5db8db196a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_monitor/src/trigger/trigger.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_proc/af_proc.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_proc/af_proc.h
new file mode 100755
index 0000000000000000000000000000000000000000..4d6f54da24dd971a09cba2587e93e5e053e074a5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/af_proc/af_proc.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/focus_motor_manager/include/focus_motor_manager.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/focus_motor_manager/include/focus_motor_manager.h
new file mode 100755
index 0000000000000000000000000000000000000000..a98a954a27074bb7f3791cc47ab66dfa6c3d1348
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/auto_focus/src/af_manager/src/focus_motor_manager/include/focus_motor_manager.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/dtcf/include/ss_dtcf.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/dtcf/include/ss_dtcf.h
new file mode 100755
index 0000000000000000000000000000000000000000..3a037bdacd23dc67c61d9024efaa8f7d7a2d4406
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/dtcf/include/ss_dtcf.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/dtcf/lib/ss928v100/clang_musl/libdtcf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/dtcf/lib/ss928v100/clang_musl/libdtcf.so
new file mode 100755
index 0000000000000000000000000000000000000000..701524c980bb8d6d347ae3eed9afabf9c8c681a2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/dtcf/lib/ss928v100/clang_musl/libdtcf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/dtcf/src/ss_dtcf_qsort.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/dtcf/src/ss_dtcf_qsort.h
new file mode 100755
index 0000000000000000000000000000000000000000..29fc25d7b3ec217368645990c75df5ab7a38c88c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/dtcf/src/ss_dtcf_qsort.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/common/lib/ss928v100/clang_musl/libfileformat.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/common/lib/ss928v100/clang_musl/libfileformat.so
new file mode 100755
index 0000000000000000000000000000000000000000..13403d0d3c2a7f96eafbcb6d863f4e3ddabd0e92
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/common/lib/ss928v100/clang_musl/libfileformat.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/exif/include/ss_exif.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/exif/include/ss_exif.h
new file mode 100755
index 0000000000000000000000000000000000000000..e479096b159331e98459a70aa5fad61703df751b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/exif/include/ss_exif.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/exif/lib/ss928v100/clang_musl/libexif.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/exif/lib/ss928v100/clang_musl/libexif.so
new file mode 100755
index 0000000000000000000000000000000000000000..3f86019d4f50e0fdd5ac4457340bba4e9c530c3e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/exif/lib/ss928v100/clang_musl/libexif.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/heif/include/heif_format.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/heif/include/heif_format.h
new file mode 100755
index 0000000000000000000000000000000000000000..e3db63414509c6f34ebed380e0a0837c0ef88369
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/heif/include/heif_format.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/heif/lib/ss928v100/clang_musl/libheif.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/heif/lib/ss928v100/clang_musl/libheif.so
new file mode 100755
index 0000000000000000000000000000000000000000..3b665b3cf6bb26b440eb97f43d3720be5fb10327
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/heif/lib/ss928v100/clang_musl/libheif.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/hmf_demuxer/lib/libhmf_demuxer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/hmf_demuxer/lib/libhmf_demuxer.so
new file mode 100755
index 0000000000000000000000000000000000000000..de018e0c1713198c61d614beee8aa3a6bcb37726
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/hmf_demuxer/lib/libhmf_demuxer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/mp4/include/ss_mp4_format.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/mp4/include/ss_mp4_format.h
new file mode 100755
index 0000000000000000000000000000000000000000..c23a30d492b556e06063e258b6ce5c4ecc5a9706
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/mp4/include/ss_mp4_format.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/mp4/lib/ss928v100/clang_musl/libmp4.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/mp4/lib/ss928v100/clang_musl/libmp4.so
new file mode 100755
index 0000000000000000000000000000000000000000..7efdd937a13039e4c401c40e0577b0dc67ad059c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/mp4/lib/ss928v100/clang_musl/libmp4.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/ts/include/ss_ts_format.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/ts/include/ss_ts_format.h
new file mode 100755
index 0000000000000000000000000000000000000000..af1362bba57247c8baf2e2ba5362e45b9d1c5165
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/ts/include/ss_ts_format.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/ts/lib/ss928v100/clang_musl/libts.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/ts/lib/ss928v100/clang_musl/libts.so
new file mode 100755
index 0000000000000000000000000000000000000000..ee15f14388d9f769291cb7c182bbef9e36b4f2cd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/fileformat/ts/lib/ss928v100/clang_musl/libts.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ot_demuxer_err.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ot_demuxer_err.h
new file mode 100755
index 0000000000000000000000000000000000000000..9326d9bd3d23533984059f7d7ca14091ea42cd81
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ot_demuxer_err.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ot_liteplayer_err.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ot_liteplayer_err.h
new file mode 100755
index 0000000000000000000000000000000000000000..b78bc6964c93bb34471049924ab481dea53e1223
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ot_liteplayer_err.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ss_demuxer.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ss_demuxer.h
new file mode 100755
index 0000000000000000000000000000000000000000..73561a4ecf7b6f16535c81020729136c021d634f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ss_demuxer.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ss_liteplayer.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ss_liteplayer.h
new file mode 100755
index 0000000000000000000000000000000000000000..6903b537dad348105dc6a541651f1834fc2a9efc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/include/ss_liteplayer.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libavplay_common.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libavplay_common.so
new file mode 100755
index 0000000000000000000000000000000000000000..60304856419689842ea788e97669daa644805e18
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libavplay_common.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libliteplayer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libliteplayer.so
new file mode 100755
index 0000000000000000000000000000000000000000..d77ed8bc4750c0b274185eb6e8c79f72cd57d7c7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libliteplayer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libmpf_demuxer.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libmpf_demuxer.so
new file mode 100755
index 0000000000000000000000000000000000000000..cfacec3d03eafcc0f125e976678948426cd303b6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libmpf_demuxer.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libplugin_adec_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libplugin_adec_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..a7cb16b41e95e26e60baa9ad12ff193a3a768220
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libplugin_adec_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libplugin_demuxer_hmf.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libplugin_demuxer_hmf.so
new file mode 100755
index 0000000000000000000000000000000000000000..0a56567165e31df89236ac8f8139537a607bdf87
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libplugin_demuxer_hmf.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libplugin_vdec_35xx.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libplugin_vdec_35xx.so
new file mode 100755
index 0000000000000000000000000000000000000000..d5fedc8607a7dbf46339722c0909a94c19049516
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/lib/ss928v100/clang_musl/libplugin_vdec_35xx.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/DemuxList.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/DemuxList.h
new file mode 100755
index 0000000000000000000000000000000000000000..3fd186d689e9e415c7c8963d4719adfdb9608df8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/DemuxList.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ff_demux_log.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ff_demux_log.h
new file mode 100755
index 0000000000000000000000000000000000000000..20036a41403f64ab508ed7f2927853ed473fe6e8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ff_demux_log.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ff_wrapper.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ff_wrapper.h
new file mode 100755
index 0000000000000000000000000000000000000000..9ebb81106cbdbebd65e0f921d7c0c4e4b17d9566
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ff_wrapper.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/mp4_format.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/mp4_format.h
new file mode 100755
index 0000000000000000000000000000000000000000..993c8ee656c34f0421a880f4fec6fbcee359ae8b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/mp4_format.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffaacparser.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffaacparser.h
new file mode 100755
index 0000000000000000000000000000000000000000..4876a280cea1a3775c39f8b598838676b855ebd0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffaacparser.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffavcparser.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffavcparser.h
new file mode 100755
index 0000000000000000000000000000000000000000..703bc3b488a3de1df7be445b809198a3b23d17e5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffavcparser.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffbitsreader.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffbitsreader.h
new file mode 100755
index 0000000000000000000000000000000000000000..1ee7fae347fcf827c35ffc7225f399d087ef7572
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffbitsreader.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffh26xparser.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffh26xparser.h
new file mode 100755
index 0000000000000000000000000000000000000000..5c2818a65a5880c24faf640066de8ea01e6e069a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffh26xparser.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffhevcparser.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffhevcparser.h
new file mode 100755
index 0000000000000000000000000000000000000000..e4323353a8ac2f945c69e7e352a8aa98c1b8ffaa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffhevcparser.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffmp3parser.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffmp3parser.h
new file mode 100755
index 0000000000000000000000000000000000000000..8c0639a512da69cd21e78bacde1d3712df091eae
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffmp3parser.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffrbspparser.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffrbspparser.h
new file mode 100755
index 0000000000000000000000000000000000000000..b9ee89fe57842d2f38bc2d94f22d6e3c2f6d72a4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/parser/ffrbspparser.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ss_ff_demux.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ss_ff_demux.h
new file mode 100755
index 0000000000000000000000000000000000000000..ea19736b14a567b4e652bcac9925501a6375f7e9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ss_ff_demux.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ts_format.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ts_format.h
new file mode 100755
index 0000000000000000000000000000000000000000..1b5bd6b736ac8ef9a39f7f4c36645a8e07cb503a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/ts_format.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/wav_format.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/wav_format.h
new file mode 100755
index 0000000000000000000000000000000000000000..34a6756f55aea13e5883a89d8e34cabcc8a25033
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/liteplayer/src/demux/ffmpeg_demux/wav_format.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/include/ss_confaccess.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/include/ss_confaccess.h
new file mode 100755
index 0000000000000000000000000000000000000000..a17a66391830822bac4d3d64355669feaac691e3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/include/ss_confaccess.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libotconfaccess.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libotconfaccess.so
new file mode 100755
index 0000000000000000000000000000000000000000..ef8c4305dbd2d295c9dc24482ff3f2d031da74ae
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libotconfaccess.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libotconfaccess_pc.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libotconfaccess_pc.so
new file mode 100755
index 0000000000000000000000000000000000000000..ad6d5520ac7c6d572d9c74cbb0ee0b3c5565e540
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libotconfaccess_pc.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libprotobuf-c.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libprotobuf-c.so
new file mode 100755
index 0000000000000000000000000000000000000000..ed0bc4ca2837cd9f17c6aa5f80d7ea8700d9a196
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libprotobuf-c.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libprotobuf-c.so.1 b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libprotobuf-c.so.1
new file mode 100755
index 0000000000000000000000000000000000000000..ed0bc4ca2837cd9f17c6aa5f80d7ea8700d9a196
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libprotobuf-c.so.1 differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libsvp_acl.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libsvp_acl.so
new file mode 100755
index 0000000000000000000000000000000000000000..1ab5a09f8c985684a8324a5af55f4ab7761e5710
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libsvp_acl.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libsvp_aicpu.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libsvp_aicpu.so
new file mode 100755
index 0000000000000000000000000000000000000000..b9a0574b8b57c8f6c6e27ef51b2d6661646c6c7d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/otconfaccess/lib/ss928v100/clang_musl/libsvp_aicpu.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/recorder_pro/include/ss_recorder_pro.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/recorder_pro/include/ss_recorder_pro.h
new file mode 100755
index 0000000000000000000000000000000000000000..b40e13e05bd0bbeb372c9eff9fbac15485cfb2fc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/recorder_pro/include/ss_recorder_pro.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/recorder_pro/lib/ss928v100/clang_musl/librecorder_pro.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/recorder_pro/lib/ss928v100/clang_musl/librecorder_pro.so
new file mode 100755
index 0000000000000000000000000000000000000000..fc6531793596d16b7d4f164f9efcd77f234b1210
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/middleware/source/component/recorder_pro/lib/ss928v100/clang_musl/librecorder_pro.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..ef007291b354fd9f322902ccb1d8347fdee22903
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/BUILD.gn
@@ -0,0 +1,39 @@
+# Copyright (c) 2020 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.
+
+import("//build/lite/config/component/lite_component.gni")
+import("//build/lite/config/subsystem/aafwk/path.gni")
+import("//build/lite/ndk/ndk.gni")
+
+board = board_name
+if (board_name == "hispark_taurus" || board_name == "aegis_hi3516dv300") {
+ board = "hi3516dv300"
+} else if (board_name == "hispark_aries") {
+ board = "hi3518ev300"
+}
+
+if (ohos_build_compiler == "clang" && ohos_kernel_type == "liteos_a") {
+ copy("hdi_media") {
+ sources = [ "${board}/liteos_a/libs/libhdi_media.so" ]
+ outputs = [ "$root_out_dir/libhdi_media.so" ]
+ }
+} else if (ohos_build_compiler == "clang" && ohos_kernel_type == "linux") {
+ copy("hdi_media") {
+ sources = [ "${board}/linux_small/libs/libhdi_media.so" ]
+ outputs = [ "$root_out_dir/libhdi_media.so" ]
+ }
+}
+
+group("libhdi_media") {
+ deps = [ ":hdi_media" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/hi3516dv300/linux_small/libs/libhdi_media.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/hi3516dv300/linux_small/libs/libhdi_media.so
new file mode 100755
index 0000000000000000000000000000000000000000..0fedfd7ef46caaef538c19a637664d8bd49decf0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/hi3516dv300/linux_small/libs/libhdi_media.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/hi3516dv300/liteos_a/libs/libhdi_media.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/hi3516dv300/liteos_a/libs/libhdi_media.so
new file mode 100755
index 0000000000000000000000000000000000000000..205f166a739be700b6207e1b53f5839d0dcbde90
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/hi3516dv300/liteos_a/libs/libhdi_media.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/hi3518ev300/liteos_a/libs/libhdi_media.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/hi3518ev300/liteos_a/libs/libhdi_media.so
new file mode 100755
index 0000000000000000000000000000000000000000..18809d15251e9558059ff515c3caa27bc0029756
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/multimedia/hi3518ev300/liteos_a/libs/libhdi_media.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/update/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/update/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..395b8bd349b8d33ec19dbb96f84e7e9107ca1f4d
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/update/BUILD.gn
@@ -0,0 +1,28 @@
+# Copyright (c) 2020 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.
+
+import("//build/lite/config/component/lite_component.gni")
+
+if (ohos_build_compiler == "clang") {
+ board = board_name
+ if (board_name == "hispark_taurus" || board_name == "aegis_hi3516dv300") {
+ board = "hi3516dv300"
+ } else if (board_name == "hispark_aries") {
+ board = "hi3518ev300"
+ }
+
+ copy("hal_update") {
+ sources = [ "./${board}/liteos_a/libs/libhal_update.so" ]
+ outputs = [ "$root_out_dir/libhal_update.so" ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/update/hi3516dv300/liteos_a/libs/libhal_update.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/update/hi3516dv300/liteos_a/libs/libhal_update.so
new file mode 100755
index 0000000000000000000000000000000000000000..e1247b92d5c0db05319f78b8ac407eb9cd86fe15
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/update/hi3516dv300/liteos_a/libs/libhal_update.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/update/hi3518ev300/liteos_a/libs/libhal_update.so b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/update/hi3518ev300/liteos_a/libs/libhal_update.so
new file mode 100755
index 0000000000000000000000000000000000000000..e1247b92d5c0db05319f78b8ac407eb9cd86fe15
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/update/hi3518ev300/liteos_a/libs/libhal_update.so differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/usb/hi3516dv300/include/default_config.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/usb/hi3516dv300/include/default_config.h
new file mode 100755
index 0000000000000000000000000000000000000000..9a82fe1cb3a1d4bd4b46902526f9c9cd9b4c2abb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/usb/hi3516dv300/include/default_config.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/usb/hi3751v350/include/default_config.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/usb/hi3751v350/include/default_config.h
new file mode 100755
index 0000000000000000000000000000000000000000..ac603a979105638d1d2ba99698f153761d379ccd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/hal/usb/hi3751v350/include/default_config.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..a344eec3829c23237cfb0486a9d6ae36aa556f45
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/BUILD.gn
@@ -0,0 +1,85 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+group("drivers") {
+ deps = [
+ "adc",
+ "dmac",
+ "gpio",
+ "hieth-sf",
+ "hisi_sdk",
+ "i2c",
+ "i2s",
+ "mipi_csi",
+ "mipi_dsi",
+ "mmc",
+ "mtd",
+ "pin",
+ "pwm",
+ "rtc",
+ "spi",
+ "timer",
+ "uart",
+ "watchdog",
+ "wifi/hi3881v100/firmware:wifi_firmware",
+ ]
+}
+
+config("public") {
+ include_dirs = []
+ if (defined(LOSCFG_COMPILER_CLANG_LLVM)) {
+ cur_compiler = "llvm"
+ } else {
+ cur_compiler = "gcc"
+ }
+ lib_dirs = [ "libs/ohos/$cur_compiler/$LOSCFG_PLATFORM" ]
+ ldflags = [ "-Wl,--push-state,--whole-archive" ]
+ if (defined(LOSCFG_DRIVERS_HIEDMAC)) {
+ ldflags += [ "-lhiedmac" ]
+ }
+
+ if (!defined(LOSCFG_DRIVERS_HDF_STORAGE_MTD)) {
+ if (defined(LOSCFG_DRIVERS_MTD)) {
+ include_dirs += [ "include/mtd/common/include" ]
+ ldflags += [ "-lmtd_common" ]
+ }
+ if (defined(LOSCFG_DRIVERS_MTD_SPI_NOR)) {
+ if (!defined(LOSCFG_SHELL)) {
+ ldflags += [ "-lspinor_flash_noshell" ]
+ } else {
+ ldflags += [ "-lspinor_flash" ]
+ }
+ }
+ if (defined(LOSCFG_DRIVERS_MTD_NAND)) {
+ ldflags += [ "-lnand_flash" ]
+ }
+ }
+
+ if (defined(LOSCFG_DRIVERS_MMC)) {
+ ldflags += [ "-lmmc" ]
+ }
+ if (defined(LOSCFG_DRIVERS_HDF_WIFI)) {
+ ldflags += [ "-lhdf_vendor_wifi" ]
+ }
+ if (defined(LOSCFG_DRIVERS_HDF_WIFI) && defined(LOSCFG_DRIVERS_HI3881)) {
+ ldflags += [ "-lhi3881" ]
+ }
+ ldflags += [ "-Wl,--pop-state" ]
+ if (defined(LOSCFG_DRIVERS_HDF_USB)) {
+ if (LOSCFG_PLATFORM == "hi3516dv300") {
+ ldflags += [ "-lusb_dwc3" ]
+ }
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/Kconfig b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/Kconfig
new file mode 100755
index 0000000000000000000000000000000000000000..bfba5d5ae2f9c29c57c5292ac110ee2ca4cc87d8
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/Kconfig
@@ -0,0 +1,180 @@
+# none hdf driver configs
+choice
+ prompt "Enable Uart"
+ default DRIVERS_HDF_PLATFORM_UART
+ help
+ Enable simple uart (without vfs) only for litekernel.
+ Enable general uart (with vfs) for full code.
+
+config DRIVERS_HDF_PLATFORM_UART
+ bool "Enable HDF platform uart driver"
+ depends on DRIVERS_HDF_PLATFORM
+ help
+ Answer Y to enable HDF platform uart driver.
+
+config PLATFORM_UART_WITHOUT_VFS
+ bool "Simple Uart"
+config PLATFORM_NO_UART
+ bool "NO Uart"
+endchoice
+
+config DRIVERS_HIEDMAC
+ bool "Enable HIEDMAC"
+ default n
+ depends on DRIVERS && PLATFORM_HI3559AV100
+ help
+ Answer Y to enable LiteOS support hiedmac.
+
+config DRIVERS_NETDEV
+ bool "Enable Net Device"
+ default y
+ depends on DRIVERS && NET_LWIP_SACK
+ help
+ Answer Y to enable LiteOS support net device.
+
+choice
+ depends on DRIVERS_NETDEV
+ prompt "MAC"
+ default DRIVERS_HIETH_SF
+ help
+ Enable higmac for hi3516a hi3519 hi3559a_cortex-a53_aarch64.
+ Enable hieth-sf for hi3516cv300 hi3516ev200 and hi3518ev200.
+
+config DRIVERS_HIETH_SF
+ bool "Enable hieth-sf"
+ depends on DRIVERS_NETDEV && (PLATFORM_HI3518EV200 || PLATFORM_HI3731 || PLATFORM_HI3516CV300 || PLATFORM_HI3516CV500 || PLATFORM_HI3516DV300 || PLATFORM_HI3516EV200 || PLATFORM_HI3516EV300 || PLATFORM_HI3559V200 || PLATFORM_HI3516DV300 || PLATFORM_HI3518EV300)
+endchoice
+
+# mmc config start
+config DRIVERS_MMC
+ depends on DRIVERS
+ bool "Enable MMC"
+ default y
+ depends on DRIVERS && FS_VFS
+ help
+ Answer Y to enable LiteOS support MMC driver.
+
+config DRIVERS_SD_DETECT_BY_SW
+ depends on DRIVERS_MMC && (PLATFORM_HI3516EV200 || PLATFORM_HI3518EV300)
+ bool "Use software detection instead of hardware interrupt"
+ default n
+ help
+ Answer Y to enable software detection for the MMC/SD card.
+ if you choose Y, host driver will disable the insert/remove interrupt and use the sd protocol to detect the card.
+
+config DRIVERS_SD
+ depends on DRIVERS_MMC && (PLATFORM_HI3518EV200 || PLATFORM_HI3516EV200 || PLATFORM_HI3516EV300 || PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300)
+ bool "Enable MMC0 support SD card type"
+
+config DRIVERS_EMMC
+ depends on DRIVERS_MMC && (PLATFORM_HI3518EV200 || PLATFORM_HI3516EV200 || PLATFORM_HI3516EV300 || PLATFORM_HI3518EV300 || PLATFORM_HI3516DV300 || PLATFORM_HI3556V200)
+ bool "Enable MMC0 support eMMC type"
+
+choice
+ depends on DRIVERS_EMMC && DRIVERS_MMC && FS_VFS
+ prompt "EMMC chip mode"
+ default DRIVERS_EMMC_HS200
+ help
+ select EMMC chip mode hs200.
+ select EMMC chip mode hs400.
+
+config DRIVERS_EMMC_HS200
+ depends on DRIVERS_EMMC
+ bool "Enable EMMC HS200 support"
+ help
+ If you connect the SDIO0 to EMMC chip, figure out which mode of chip and select the mode HS200
+
+config DRIVERS_EMMC_HS400
+ depends on DRIVERS_EMMC && (PLATFORM_HI3518EV200 || PLATFORM_HI3516EV300)
+ bool "Enable EMMC HS400 support"
+ help
+ If you connect the SDIO0 to EMMC chip figure out which mode of chip and select the mode HS400
+
+endchoice
+
+config DRIVERS_MMC_SPEEDUP
+ depends on DRIVERS_MMC && (PLATFORM_HI3519 || PLATFORM_HI3519V101 || PLATFORM_HI3559)
+ bool "Enable MMC support speedup"
+ default n
+ help
+ Answer Y to enable LiteOS support speedup.
+# mmc config end
+
+# mtd configs tart
+config DRIVERS_MTD
+ bool "Enable MTD"
+ default y
+ depends on DRIVERS && FS_VFS
+ help
+ Answer Y to enable LiteOS support jffs2 multipartion.
+
+# spi nor
+config DRIVERS_MTD_SPI_NOR
+ bool "Enable MTD spi_nor flash"
+ default y
+ depends on DRIVERS_MTD
+ help
+ Answer Y to support spi_nor flash.
+choice
+ depends on DRIVERS_MTD_SPI_NOR
+ prompt "SpiNorFlash Chips"
+ default DRIVERS_MTD_SPI_NOR_HISFC350
+
+config DRIVERS_MTD_SPI_NOR_HISFC350
+ depends on PLATFORM_HI3516A || PLATFORM_HI3731
+ bool "Enable hisfc350"
+ help
+ Answer Y to support hisfc350.
+
+config DRIVERS_MTD_SPI_NOR_HIFMC100
+ depends on PLATFORM_HI3518EV200 || PLATFORM_HI3519 || PLATFORM_HI3519V101 || PLATFORM_HI3559 || PLATFORM_HI3516CV300 || PLATFORM_HI3559AV100ES || PLATFORM_HI3559AV100 || PLATFORM_HI3516CV500 || PLATFORM_HI3516DV300 || PLATFORM_HI3516EV200 || PLATFORM_HI3516EV300 || PLATFORM_HI3518EV300 || PLATFORM_HI3556V200 || PLATFORM_HI3559V200
+ bool "Enable hifmc100"
+ help
+ Answer Y to support hifmc100.
+endchoice
+
+#spi nand
+config DRIVERS_MTD_NAND
+ bool "Enable MTD nandflash"
+ default n
+ depends on DRIVERS_MTD
+ help
+ Answer Y to support nandflash.
+
+choice
+ depends on DRIVERS_MTD_NAND
+ prompt "NandFlash Chips"
+ default DRIVERS_MTD_NAND_HINFC620
+
+config DRIVERS_MTD_NAND_HINFC620
+ depends on PLATFORM_HI3516A
+ bool "Enable hinfc620 for parallel nand"
+ help
+ Answer Y to support hinfc620.
+
+config DRIVERS_MTD_NAND_HISNFC100
+ depends on PLATFORM_HI3516A
+ bool "Enable hisnfc100 for spi nand"
+ help
+ Answer Y to support hisnfc100.
+
+config DRIVERS_MTD_NAND_HIFMC100
+ depends on PLATFORM_HI3518EV200 || PLATFORM_HI3519 || PLATFORM_HI3519V101 || PLATFORM_HI3559 || PLATFORM_HI3516CV300 || PLATFORM_HI3559AV100ES || PLATFORM_HI3516EV200 || PLATFORM_HI3516EV300 || PLATFORM_HI3518EV300 || PLATFORM_HI3559V200 || PLATFORM_HI3556V200 || PLATFORM_HI3516DV300 || PLATFORM_HI3516CV500
+ bool "Enable hifmc100 for spi nand"
+ help
+ Answer Y to support hifmc100.
+
+config DRIVERS_MTD_NAND_HIFMC100_PARALLEL
+ depends on PLATFORM_HI3519 || PLATFORM_HI3519V101 || PLATFORM_HI3559 || PLATFORM_HI3559AV100ES
+ bool "Enable hifmc100 for parallel nand"
+ help
+ Answer Y to support hifmc100.
+endchoice
+# mtd configs end
+
+config DRIVERS_HI3881
+ bool "Enable Hi3881 Host driver"
+ default n
+ depends on DRIVERS_HDF_WIFI
+ help
+ Answer Y to enable Hi3881 Host driver.
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/LICENSE b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/LICENSE
new file mode 100755
index 0000000000000000000000000000000000000000..8fe636e2eb26e19a252922a5a46b101f152bdb9e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/LICENSE
@@ -0,0 +1,586 @@
+The firmware and libs subdirectories are licensed under End User License Agreement.
+The wifi subdirectory is licensed under GPL V2 license.
+Other subdirectories are licensed under Apache License, Version 2.0.
+
+a) The GPL V2 license, (https://opensource.org/licenses/GPL-2.0)
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
+
+b) The Apache License, Version 2.0, (https://www.apache.org/licenses/LICENSE-2.0)
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+c) End User License Agreement
+
+THIS END USER LICENSE AGREEMENT (“AGREEMENT”) IS A LEGAL AGREEMENT BETWEEN YOU (EITHER A SINGLE INDIVIDUAL, OR SINGLE LEGAL ENTITY) AND HISILICON (SHANGHAI) TECHNOLOGIES CO., LTD. ("HISILICON") FOR THE USE OF THE SOFTWARE ACCOMPANYING THIS AGREEMENT. HISILICON IS ONLY WILLING TO LICENSE THE SOFTWARE TO YOU ON CONDITION THAT YOU ACCEPT ALL OF THE TERMS IN THIS AGREEMENT. BY CLICKING “I AGREE” OR BY INSTALLING OR OTHERWISE USING OR COPYING THE SOFTWARE YOU INDICATE THAT YOU AGREE TO BE BOUND BY ALL OF THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, HISILICON IS UNWILLING TO LICENSE THE SOFTWARE TO YOU AND YOU MAY NOT INSTALL, USE OR COPY THE SOFTWARE, AND YOU SHALL PROMPTLY DESTROY, DELETE, OR RETURN THE SOFTWARE TO YOUR SUPPLIER.
+
+“SOFTWARE” means the software in object code provided under the terms of this Agreement.
+
+Shenzhen Longgang District is the signing place of this Agreement.
+
+1. GRANT OF LICENSE
+In consideration of your agreement to abide by the following terms, and subject to the terms and conditions of this Agreement, HISILICON hereby grants YOU, a non-transferable, non-exclusive, royalty-free, revocable, worldwide copyright license (without the right to sublicense) to use and copy the SOFTWARE solely for the purpose of designing or developing applications for use in conjunction with Hisilicon chip.
+.
+
+All rights to the SOFTWARE and all intellectual property rights contained therein shall remain the sole and exclusive property of HISILICON. The SOFTWARE is licensed not sold. Except as expressly licensed in Clause 1, in no event shall the license granted in this Clause 1 be construed as granting YOU expressly or by implication, estoppels or otherwise, licenses to any intellectual property rights, including but not limited to patent rights, copyrights, trademark or trade secret in the SOFTWARE.
+
+No right is granted to YOU under this Agreement to manufacture, have manufactured, or sell, supply or distribute any products which have taken into use or which embody any of the SOFTWARE or any of the intellectual property rights embodied therein.
+
+2. RESTRICTIONS
+This Agreement does not prevent YOU from using the SOFTWARE for internal benchmarking purposes.
+
+However, YOU shall treat any and all benchmarking data relating to the SOFTWARE, and any other results of your use or testing of the SOFTWARE which are indicative of its performance, efficacy, reliability or quality, as confidential information and YOU shall not disclose such information to any third party without the express written permission of HISILICON.
+
+YOU shall reproduce and not remove or obscure any notice incorporated by HISILICON in the SOFTWARE to protect HISILICON’s intellectual property rights embodied therein.
+
+YOU shall not decompile, disassemble, or reverse engineer the SOFTWARE.
+
+YOU shall not distribute the SOFTWARE under an open source license as listed by the Open Source Initiative (a non-profit corporation whose website is www.opensource.org), or other license which requires the source code or object code of the SOFTWARE to be licensed or otherwise shared with any third party.
+
+3. FEEDBACK
+YOU may choose to provide suggestions, comments, feedback, ideas, modifications or know-how (whether in oral or written form) relating to the use of the SOFTWARE ("Feedback") to HISILICON under the terms of this Agreement. YOU hereby grants to HISILICON and its affiliates, under all of you and your affiliates’ (as applicable) intellectual property rights, a perpetual, irrevocable, royalty free, non-exclusive, worldwide license to (i) use, copy and modify the Feedback; (ii) sell, supply, or otherwise distribute the Feedback; (iii) design, have designed, manufacture, have manufactured, use, import, sell, and otherwise distribute and dispose of products that incorporate the Feedback; and (iv) sublicense (together with the rights to further sublicense) the rights granted in this paragraph to any third party.
+
+4. NO WARRANTY
+YOU AGREE THAT THE SOFTWARE IS PROVIDED BY HISILICON ON AN "AS IS" BASIS. HISILICON MAKES NO WARRANTY, EXPRESSED OR IMPLIED OR STATUTORY, WITH RESPECT TO ANY OF THE SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.
+
+YOU EXPRESSLY ASSUME ALL LIABILITIES AND RISKS, FOR USE OR OPERATION OF THE SOFTWARE, INCLUDING WITHOUT LIMITATION, SOFTWARE APPLICATIONS DESIGNED OR INTENDED FOR MISSION CRITICAL APPLICATIONS, SUCH AS PACEMAKERS, WEAPONRY, AIRCRAFT NAVIGATION, FACTORY CONTROL SYSTEMS, ETC. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+5. NO LIABILITY
+PLEASE READ THE INSTRUCTIONS COMPLETELY, AND PLEASE NOTE THAT YOU SHOULD USE THE SOFTWARE AT YOUR OWN RISK.
+
+IN NO EVENT SHALL HISILICON BE LIABLE FOR ANY DIRECT OR INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHER LEGAL THEORY, EVEN IF HISILICON HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF THE SOFTWARE HAS ANY MATERIAL, VERIFIABLE, AND REPRODUCIBLE PROGRAM ERRORS, HISILICON SHALL HAVE NO LIABILITY TO MODIFY SUCH ERRORS.
+
+NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED IN THIS AGREEMENT, THE MAXIMUM LIABILITY OF HISILICON TO YOU IN AGGREGATE FOR ALL CLAIMS MADE AGAINST HISILICON IN CONTRACT TORT OR OTHERWISE UNDER OR IN CONNECTION WITH THE SUBJECT MATTER OF THIS AGREEMENT SHALL NOT EXCEED THE TOTAL OF SUMS RECEIVED BY HISILICON FROM YOU FOR THIS AGREEMENT. THE EXISTENCE OF MORE THAN ONE CLAIM WILL NOT ENLARGE OR EXTEND THE LIMIT.
+
+6. CONFIDENTIALITY
+YOU acknowledge and agree that the SOFTWARE and any benchmarking data and related information provided under this Agreement contain trade secrets and confidential material of HISILICON and YOU agree to maintain all such information in confidence and apply security measures no less stringent than the measures which YOU apply to protect your own like information, but not less than a reasonable degree of care, to prevent their unauthorized disclosure and use. The period of confidentiality shall be indefinite. YOU agree not to use any such information other than in normal use of the SOFTWARE under the license granted in this Agreement.
+
+7. TERM AND TERMINATION
+This Agreement shall remain in force until terminated. HISILICON may terminate this Agreement at any time with or without any cause. Upon termination of this Agreement, YOU shall immediately stop using the SOFTWARE and confidential information and destroy all copies of the SOFTWARE and confidential information in your possession, together with all documentation and related materials. The provisions of clauses 3, 4, 5, 6, 7 and 8 shall survive termination of this Agreement.
+
+8. GENERAL
+Any provision of this Agreement which is prohibited or unenforceable in any jurisdiction shall be ineffective to the extent of such prohibition or unenforceability without affecting, impairing or invalidating the remaining provisions hereof.
+
+The failure by HISILICON to enforce any of the provisions of this Agreement, unless waived in writing, shall not constitute a waiver of HISILICON's rights to enforce such provision or any other provision of this Agreement in the future.
+At HISILICON’s request, YOU agree to check your computers for installations of the SOFTWARE and any other information requested by HISILICON relating to SOFTWARE installation and to provide this information to HISILICON. YOU agree that employees or auditors nominated by HISILICON may also perform such checking and reporting on behalf of HISILICON by prior appointment during your normal business hours on seven (7) days’ notice. HISILICON shall bear the auditors’ costs for that audit unless it reveals unlicensed usage in which case YOU shall promptly reimburse HISILICON for all reasonable costs and expenses, including professional fees, relating to such audit.
+
+The SOFTWARE provided under this Agreement is subject to U.S. export control laws, including the U.S. Export Administration Act and its associated regulations, and may be subject to export or import regulations in other countries. YOU agree to comply fully with all laws and regulations of the United States and other countries ("Export Laws") to assure that the SOFTWARE, is not (1) exported, directly or indirectly, in violation of Export Laws, either to any countries that are subject to U.S.A. export restrictions or to any end user who has been prohibited from participating in the U.S.A. export transactions by any federal agency of the U.S.A. government; or (2) intended to be used for any purpose prohibited by Export Laws, including, without limitation, nuclear, chemical, or biological weapons proliferation.
+
+This Agreement shall be governed by and construed in accordance with the laws of People’s Republic of China, without reference to the principles of conflicts of laws. Any dispute arising out of or relating to this Agreement shall be submitted to Shenzhen Longgang District People’s court and the parties waive all objections to that jurisdiction and venue.
+
+Some open-source software components may be used in the Software. If the applicable licenses of these open-source software components conflict with the content in this Agreement, the licenses of the open-source software components will prevail.
+
+---------------------------------------------------------------------
+Copyright (C) 2020 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved.
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/README.md b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/README.md
new file mode 100755
index 0000000000000000000000000000000000000000..bdb5a8890791884b118918d76511b01046890741
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/README.md
@@ -0,0 +1,34 @@
+# hisilicon drivers
+
+- [Introduction](#section469617221261)
+- [Constraints](#section12212842173518)
+- [Repositories Involved](#section641143415335)
+
+## Introduction
+
+This repository stores drivers for adapting to different systems on a chip \(SoCs\).
+
+## Constraints
+
+Currently, HiSpark\_taurus \(Hi3516D V300\) and HiSpark\_aries \(Hi3518E V300\) are supported.
+
+## Repositories Involved
+
+device/hisilicon/build
+
+**device/hisilicon/drivers**
+
+device/hisilicon/hardware
+
+device/hisilicon/hispark\_aries
+
+device/hisilicon/hispark\_taurus
+
+device/hisilicon/modules
+
+device/hisilicon/third\_party/ffmpeg
+
+device/hisilicon/third\_party/uboot
+
+vendor/hisilicon
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/README_zh.md b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/README_zh.md
new file mode 100755
index 0000000000000000000000000000000000000000..7444b0481bb7f36be99ebda1ae4e86d7e650572b
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/README_zh.md
@@ -0,0 +1,34 @@
+# hisilicon drivers组件
+
+- [简介](#section469617221261)
+- [约束](#section12212842173518)
+- [对应仓库](#section641143415335)
+
+## 简介
+
+HiSpark\_taurus(Hi3516DV300) 、HiSpark\_aries(Hi3518EV300)平台驱动。
+
+## 约束
+
+支持HiSpark\_taurus(Hi3516DV300) 、HiSpark\_aries(Hi3518EV300)。
+
+## 对应仓库
+
+device/hisilicon/build
+
+**device/hisilicon/drivers**
+
+device/hisilicon/hardware
+
+device/hisilicon/hispark\_aries
+
+device/hisilicon/hispark\_taurus
+
+device/hisilicon/modules
+
+device/hisilicon/third\_party/ffmpeg
+
+device/hisilicon/third\_party/uboot
+
+vendor/hisilicon
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..b185e6905ad88681772ddc080dda083a9c966322
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_ADC)
+module_name = "hdf_adc"
+hdf_driver(module_name) {
+ sources = [ "adc_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..90301947631bfd52b6c88258b372c4c2d85bbf9e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_adc
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += adc_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/adc_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/adc_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..b79d724fe40184cdb3637b5c55d7e50b9b3276ee
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/adc_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/adc_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/adc_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..9a3fe1bb5e2d6ee8fbcea414e46cf5015410f502
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/adc/adc_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..7526125ef6cef782501906c8cfbd71f0ef2ff170
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_DMAC)
+module_name = "hdf_dmac"
+hdf_driver(module_name) {
+ sources = [ "dmac_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..c0bc33ed1e08756940ce94e33551a11e4bddd6f7
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/Makefile
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_dmac
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += dmac_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/dmac_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/dmac_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..357bde74d0b16f857c492cc2d1dd6ae9a93220bb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/dmac_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/dmac_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/dmac_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..55076a4ac30d0c1e18377539a371c74e764e4741
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/dmac/dmac_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/gpio/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/gpio/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..38a4f3345380540481570c647b6116985c6e7085
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/gpio/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO)
+module_name = "hdf_gpio"
+hdf_driver(module_name) {
+ sources = [ "gpio_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/gpio/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/gpio/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..81435540273be9e917b8988e0ace27bc7e9bbbd5
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/gpio/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_gpio
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += gpio_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/gpio/gpio_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/gpio/gpio_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..8cbca953582ba002ff319323f97ffa4d0c98d674
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/gpio/gpio_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..1b477c4873cc7cf41ee96cc02870462e29630b0a
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/BUILD.gn
@@ -0,0 +1,37 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HIETH_SF)
+module_name = "hieth-sf"
+hdf_driver(module_name) {
+ sources = [
+ "adapter/hdf_driver_register.c",
+ "adapter/hieth_mac.c",
+ "adapter/hieth_phy.c",
+ "adapter/net_adapter.c",
+ "src/ctrl.c",
+ "src/eth_mac.c",
+ "src/eth_phy.c",
+ "src/interface.c",
+ "src/mdio.c",
+ ]
+ include_dirs = [
+ "include",
+ "include/internal",
+ "adapter",
+ "//drivers/hdf_core/framework/model/network/ethernet/include",
+ "//drivers/hdf_core/framework/include/ethernet",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/Kconfig b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/Kconfig
new file mode 100755
index 0000000000000000000000000000000000000000..4380812ed74a2b9a60dfabdc61616ff2eabf3c7e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/Kconfig
@@ -0,0 +1,3 @@
+config DRIVERS_HIETH_SF
+ bool "Enable hieth-sf"
+ depends on DRIVERS_NETDEV && (PLATFORM_HI3518EV200 || PLATFORM_HI3731 || PLATFORM_HI3516CV300 || PLATFORM_HI3516CV500 || PLATFORM_HI3516DV300 || PLATFORM_HI3516EV200 || PLATFORM_HI3516EV300 || PLATFORM_HI3559V200 || PLATFORM_HI3516DV300 || PLATFORM_HI3518EV300)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..c56024fbc8cc75ac94e56a6e8c7ff4512573a8c5
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/Makefile
@@ -0,0 +1,28 @@
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := $(notdir $(shell pwd))
+
+LOCAL_SRCS := $(wildcard src/*.c)
+LOCAL_SRCS += $(wildcard adapter/*.c)
+
+LOCAL_FLAGS := -I include/internal
+LOCAL_FLAGS += -I $(LITEOSTOPDIR)/../../drivers/hdf_core/framework/model/network/ethernet/include
+LOCAL_FLAGS += -I $(LITEOSTOPDIR)/../../drivers/hdf_core/framework/include/ethernet
+LOCAL_FLAGS += -I $(LITEOSTOPDIR)/../../device/soc/hisilicon/common/platform/hieth-sf/adapter
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hdf_driver_register.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hdf_driver_register.c
new file mode 100755
index 0000000000000000000000000000000000000000..ce6ea12dc4c18b48c9ef1568f33756a97f1416dc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hdf_driver_register.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_mac.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_mac.c
new file mode 100755
index 0000000000000000000000000000000000000000..71d66b6ba3d8fbe1cf5bfbdaf43343980b521970
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_mac.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_mac.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_mac.h
new file mode 100755
index 0000000000000000000000000000000000000000..65d01d1e0668416278efe319c52be2ce749fd683
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_mac.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_phy.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_phy.c
new file mode 100755
index 0000000000000000000000000000000000000000..2af8717da606624b4cded9b2c4715a8132390d15
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_phy.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_phy.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_phy.h
new file mode 100755
index 0000000000000000000000000000000000000000..f09806e695b499fe4fd371462f658fa0379af90c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/hieth_phy.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/net_adapter.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/net_adapter.c
new file mode 100755
index 0000000000000000000000000000000000000000..a63a83bf0f791130f1ab3d0ee20221f3339dc637
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/net_adapter.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/net_adapter.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/net_adapter.h
new file mode 100755
index 0000000000000000000000000000000000000000..9c386b55c673bc17015b07a5be137365756b90a3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/adapter/net_adapter.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/hieth.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/hieth.h
new file mode 100755
index 0000000000000000000000000000000000000000..46c52bdc28b1f182df1533a1e1d93cd7398c503f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/hieth.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/ctrl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/ctrl.h
new file mode 100755
index 0000000000000000000000000000000000000000..a37e8eccc1ddfd368fa21564b10eb72be546e58b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/ctrl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/eth_drv.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/eth_drv.h
new file mode 100755
index 0000000000000000000000000000000000000000..1a018eeb215f87d43a776f50ea03b9c0f0dbcdd0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/eth_drv.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/eth_mac.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/eth_mac.h
new file mode 100755
index 0000000000000000000000000000000000000000..1386fbf1f999662369116323e609f625f439075e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/eth_mac.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/eth_phy.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/eth_phy.h
new file mode 100755
index 0000000000000000000000000000000000000000..79c2df0f7569ec6085582cd6bf8e77a00bd2ee4e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/eth_phy.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/hieth_pri.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/hieth_pri.h
new file mode 100755
index 0000000000000000000000000000000000000000..36a46a91935db21e935e459f6ce307180c5fa2eb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/hieth_pri.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/mdio.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/mdio.h
new file mode 100755
index 0000000000000000000000000000000000000000..daa2b1adc14beb18f7801c877cbde13460f71f1a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/include/internal/mdio.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/ctrl.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/ctrl.c
new file mode 100755
index 0000000000000000000000000000000000000000..ea2b52b3a41e68ec51a8a9db5a684a3e4094f9d2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/ctrl.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/eth_mac.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/eth_mac.c
new file mode 100755
index 0000000000000000000000000000000000000000..e632b2cb1a251210fb641a1253341ee099d634f3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/eth_mac.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/eth_phy.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/eth_phy.c
new file mode 100755
index 0000000000000000000000000000000000000000..7412ee409aef6b1370baab4c36b81c85baa87491
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/eth_phy.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/interface.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/interface.c
new file mode 100755
index 0000000000000000000000000000000000000000..5b0c0a3bab5c9425798bd846783790a86008d474
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/interface.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/mdio.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/mdio.c
new file mode 100755
index 0000000000000000000000000000000000000000..e15fb5c5e5643c5f26d69a61ab4aaeb601fa3a14
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hieth-sf/src/mdio.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hisi_sdk/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hisi_sdk/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..249cff4230f8efc87c9c1bc8d83c4be6de9c6753
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hisi_sdk/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_HISI_SDK)
+module_name = "hdf_hisi_sdk"
+hdf_driver(module_name) {
+ sources = [ "hisi_sdk.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hisi_sdk/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hisi_sdk/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..c6f2fea94eaa6be9cacc50823443025ca74c7134
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hisi_sdk/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_hisi_sdk
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += hisi_sdk.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hisi_sdk/hisi_sdk.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hisi_sdk/hisi_sdk.c
new file mode 100755
index 0000000000000000000000000000000000000000..01b484cb6de74af034c39e6ec45a36c9eb678e09
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/hisi_sdk/hisi_sdk.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..bda4fa283dc11ad432b8a72b32859cff9f5be192
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_I2C)
+module_name = "hdf_i2c"
+hdf_driver(module_name) {
+ sources = [ "i2c_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..d2d33ca79429df170d92a322f882cd5e495416ed
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_i2c
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += i2c_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/i2c_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/i2c_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..59ee603b948e8aaf1bf05d77ba1d81181ccb7020
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/i2c_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/i2c_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/i2c_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..4c719f6e3dee5c45a2b9884b5f293a5a510bd231
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2c/i2c_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..18e7ba0f74f5b72234eeca8db8341017735c6203
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/BUILD.gn
@@ -0,0 +1,24 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_I2S)
+module_name = "hdf_i2s"
+hdf_driver(module_name) {
+ sources = [
+ "i2s_aiao_hi35xx.c",
+ "i2s_codec_hi35xx.c",
+ "i2s_hi35xx.c",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..e3febf25eeaf70433d484ba849bbf3b8cc0b546d
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/Makefile
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_i2s
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += i2s_hi35xx.c \
+ i2s_aiao_hi35xx.c \
+ i2s_codec_hi35xx.c \
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+LOCAL_CFLAGS += -Wno-unused-but-set-variable
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_aiao_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_aiao_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..d5779571ef0d3bd08583fc3649917207787441d5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_aiao_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_aiao_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_aiao_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..fe9d508ede4697cd0135aa1fe9a5e63130cfe9c2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_aiao_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_codec_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_codec_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..7ead236379d6e829ab14a35c000c26d90019fb6b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_codec_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_codec_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_codec_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..58e1696e75145097cf081de7cccd0652965c5ac4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_codec_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..d7d80a6594bed4db30face93898c804bf78af57d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..96b4eefc737ea8448f25f5b4b73122767065119c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/i2s/i2s_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/include/mtd/common/include/mtd_common.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/include/mtd/common/include/mtd_common.h
new file mode 100755
index 0000000000000000000000000000000000000000..9590ef66a0293527b6bf4eeff4a8a74b1ca9b3f4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/include/mtd/common/include/mtd_common.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libhdf_vendor_wifi.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libhdf_vendor_wifi.a
new file mode 100755
index 0000000000000000000000000000000000000000..66ea94eb3cd63b5c65e7fa2516bd7572b585145d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libhdf_vendor_wifi.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libhi3881.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libhi3881.a
new file mode 100755
index 0000000000000000000000000000000000000000..fe8d26d1123d07155d7c4c4e902b2cf0ca94683d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libhi3881.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libmmc.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libmmc.a
new file mode 100755
index 0000000000000000000000000000000000000000..d90afc642774c1997a6d239841be430336fd4ecd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libmmc.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libmtd_common.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libmtd_common.a
new file mode 100755
index 0000000000000000000000000000000000000000..788a172375a9354853f3101f8ec64bad38efc8fe
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libmtd_common.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libspinor_flash.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libspinor_flash.a
new file mode 100755
index 0000000000000000000000000000000000000000..3da1cd7608ad016fa5eff7e28d0a7d0da4a30f60
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libspinor_flash.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libspinor_flash_noshell.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libspinor_flash_noshell.a
new file mode 100755
index 0000000000000000000000000000000000000000..b351104c5bffcfa417a6d663f5317a806161ed4b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libspinor_flash_noshell.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libusb_dwc3.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libusb_dwc3.a
new file mode 100755
index 0000000000000000000000000000000000000000..67a6abca8948268b586d5ea5d21a5302a86129c6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3516dv300/libusb_dwc3.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libhdf_vendor_wifi.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libhdf_vendor_wifi.a
new file mode 100755
index 0000000000000000000000000000000000000000..6e02c621940b01f69de1dd02797b97f4e542685b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libhdf_vendor_wifi.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libhi3881.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libhi3881.a
new file mode 100755
index 0000000000000000000000000000000000000000..053da5083afe716ac3c031e24a9c76583c72802c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libhi3881.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libmmc.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libmmc.a
new file mode 100755
index 0000000000000000000000000000000000000000..9009d7f36e9aaced9e17745531492c73bba06a32
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libmmc.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libmtd_common.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libmtd_common.a
new file mode 100755
index 0000000000000000000000000000000000000000..369a98f936c924dc9f4880b08ad403ec7c7e8901
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libmtd_common.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libspinor_flash.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libspinor_flash.a
new file mode 100755
index 0000000000000000000000000000000000000000..081e34b15698fb9af8749652d33e8250dab57c7d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libspinor_flash.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libspinor_flash_noshell.a b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libspinor_flash_noshell.a
new file mode 100755
index 0000000000000000000000000000000000000000..aa7afea09d10ffb01522da410fad5c4d9548176e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/libs/ohos/llvm/hi3518ev300/libspinor_flash_noshell.a differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/lite.mk b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/lite.mk
new file mode 100755
index 0000000000000000000000000000000000000000..de2e17dbae19d60739569560ea9bfffdf77e6745
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/lite.mk
@@ -0,0 +1,195 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+SOC_COMPANY := $(subst $\",,$(LOSCFG_DEVICE_COMPANY))
+SOC_PLATFORM := $(subst $\",,$(LOSCFG_PLATFORM))
+SOC_BOARD := $(subst $\",,$(LOSCFG_PRODUCT_NAME))
+CUR_COMPILER := $(if $(LOSCFG_COMPILER_CLANG_LLVM),llvm,gcc)
+CUR_OS := ohos
+
+
+ifeq ($(SOC_BOARD), ipcamera_hi3516dv300_liteos)
+ SOC_BOARD := hi3516dv300
+endif
+ifeq ($(SOC_BOARD), ipcamera_hi3518ev300_liteos)
+ SOC_BOARD := hi3518ev300
+endif
+
+HISILICON_DRIVERS_ROOT := $(LITEOSTOPDIR)/../../device/soc/$(SOC_COMPANY)/common/platform/
+HISILICON_DRIVERS_SOURCE_ROOT := $(LITEOSTOPDIR)/../../device/soc/$(SOC_COMPANY)/common/platform/source/
+
+BUILD_FROM_SOURCE := $(shell if [ -d $(HISILICON_DRIVERS_SOURCE_ROOT) ]; then echo y; else echo n; fi)
+
+HDF_INCLUDE += -I $(LITEOSTOPDIR)/../../device/board/$(SOC_COMPANY)/$(SOC_BOARD)/liteos_a/board/include/
+HDF_INCLUDE += -I $(LITEOSTOPDIR)/../../device/board/$(SOC_COMPANY)/$(SOC_BOARD)/liteos_a/board/include/hisoc
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_I2C), y)
+ LITEOS_BASELIB += -lhdf_i2c
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/i2c
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_ADC), y)
+ LITEOS_BASELIB += -lhdf_adc
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/adc
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_SPI), y)
+ LITEOS_BASELIB += -lhdf_spi
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/spi
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO), y)
+ LITEOS_BASELIB += -lhdf_gpio
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/gpio
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_PIN), y)
+ LITEOS_BASELIB += -lhdf_pin
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/pin
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_WATCHDOG), y)
+ LITEOS_BASELIB += -lhdf_watchdog
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/watchdog
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_MMC), y)
+ LITEOS_BASELIB += -lhdf_mmc
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/mmc
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_STORAGE_MTD), y)
+ LITEOS_BASELIB += -lhdf_mtd_hisilicon
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/mtd
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_RTC), y)
+ LITEOS_BASELIB += -lhdf_rtc
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/rtc
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_UART), y)
+ LITEOS_BASELIB += -lhdf_uart
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/uart
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_I2S), y)
+ LITEOS_BASELIB += -lhdf_i2s
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/i2s
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_PWM), y)
+ LITEOS_BASELIB += -lhdf_pwm
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/pwm
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_HISI_SDK), y)
+ LITEOS_BASELIB += -lhdf_hisi_sdk
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/hisi_sdk
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_MIPI_DSI), y)
+ LITEOS_BASELIB += -lhdf_mipi_dsi
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/mipi_dsi
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_MIPI_CSI), y)
+ LITEOS_BASELIB += -lhdf_mipi_csi
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/mipi_csi
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_DMAC), y)
+ LITEOS_BASELIB += -lhdf_dmac
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/dmac
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_TIMER), y)
+ LITEOS_BASELIB += -lhdf_timer
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/timer
+endif
+
+ifeq ($(BUILD_FROM_SOURCE), y)
+ifeq ($(LOSCFG_DRIVERS_HIEDMAC), y)
+ LITEOS_BASELIB += -lhiedmac
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_SOURCE_ROOT)/hiedmac
+ LITEOS_HIDMAC_INCLUDE += -I $(HISILICON_DRIVERS_SOURCE_ROOT)/hiedmac/include
+endif
+endif
+
+ifeq ($(LOSCFG_DRIVERS_HIETH_SF), y)
+ LITEOS_BASELIB += -lhieth-sf
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_ROOT)/hieth-sf
+ LITEOS_HIETH_SF_INCLUDE += -I $(HISILICON_DRIVERS_ROOT)/hieth-sf/include
+endif
+
+# mmc dirvers
+ifeq ($(LOSCFG_DRIVERS_MMC), y)
+ LITEOS_BASELIB += -lmmc
+endif
+
+# mtd drivers
+ifneq ($(LOSCFG_DRIVERS_HDF_STORAGE_MTD), y)
+ifeq ($(LOSCFG_DRIVERS_MTD), y)
+ifeq ($(BUILD_FROM_SOURCE), y)
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_SOURCE_ROOT)/mtd/common
+ LITEOS_MTD_SPI_NOR_INCLUDE += -I $(HISILICON_DRIVERS_SOURCE_ROOT)/mtd/common/include
+else
+ LITEOS_MTD_SPI_NOR_INCLUDE += -I $(HISILICON_DRIVERS_ROOT)/include/mtd/common/include
+endif
+
+ LITEOS_BASELIB += -lmtd_common
+
+ ifeq ($(LOSCFG_DRIVERS_MTD_SPI_NOR), y)
+ ifeq ($(LOSCFG_DRIVERS_MTD_SPI_NOR_HISFC350), y)
+ NOR_DRIVER_DIR := hisfc350
+ else ifeq ($(LOSCFG_DRIVERS_MTD_SPI_NOR_HIFMC100), y)
+ NOR_DRIVER_DIR := hifmc100
+ endif
+
+ ifeq ($(BUILD_FROM_SOURCE), y)
+ LITEOS_BASELIB += -lspinor_flash
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_SOURCE_ROOT)/mtd/spi_nor
+ LITEOS_MTD_SPI_NOR_INCLUDE += -I $(HISILICON_DRIVERS_SOURCE_ROOT)/mtd/spi_nor/include
+ else
+ ifeq ($(LOSCFG_SHELL), y)
+ LITEOS_BASELIB += -lspinor_flash
+ else
+ LITEOS_BASELIB += -lspinor_flash_noshell
+ endif
+ LITEOS_MTD_SPI_NOR_INCLUDE += -I $(HISILICON_DRIVERS_ROOT)/include/mtd/spi_nor/include
+ endif
+
+ endif
+
+ ifeq ($(LOSCFG_DRIVERS_MTD_NAND), y)
+ NAND_DRIVER_DIR := hifmc100
+
+ LITEOS_BASELIB += -lnand_flash
+ LIB_SUBDIRS += $(HISILICON_DRIVERS_SOURCE_ROOT)/mtd/nand
+ LITEOS_MTD_NAND_INCLUDE += -I $(HISILICON_DRIVERS_ROOT)/mtd/nand/include
+ endif
+endif
+endif
+
+# wifi dirvers
+ifeq ($(LOSCFG_DRIVERS_HDF_WIFI), y)
+ LITEOS_BASELIB += -lhdf_vendor_wifi
+
+ifeq ($(LOSCFG_DRIVERS_HI3881), y)
+ LITEOS_BASELIB += -lhi3881
+endif
+endif
+
+ifeq ($(BUILD_FROM_SOURCE), n)
+LITEOS_LD_PATH += -L$(HISILICON_DRIVERS_ROOT)/libs/$(CUR_OS)/$(CUR_COMPILER)/$(SOC_PLATFORM)
+endif
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..c2964fd2e8b076a776d3fd71bb1b8edd9d71dcf9
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/BUILD.gn
@@ -0,0 +1,23 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_MIPI_CSI)
+module_name = "hdf_mipi_csi"
+hdf_driver(module_name) {
+ sources = [
+ "mipi_csi_hi35xx.c",
+ "mipi_rx_hi2121.c",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..f2e6cb38a36abcdba9125240e6b47a6fb16e5b13
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/Makefile
@@ -0,0 +1,29 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_mipi_csi
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += mipi_rx_hi2121.c \
+ mipi_csi_hi35xx.c \
+
+LOCAL_CFLAGS += -fstack-protector-strong
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_csi_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_csi_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..e18a8b2423f8ae4f0bccd256a57d92919d315386
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_csi_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_csi_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_csi_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..539fd71104c9ea0eb1a67dd03ff292e734bab58d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_csi_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_rx_hi2121.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_rx_hi2121.c
new file mode 100755
index 0000000000000000000000000000000000000000..c41a5b78a664b0877f1c766da9a5b2609bc62a07
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_rx_hi2121.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_rx_hi2121.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_rx_hi2121.h
new file mode 100755
index 0000000000000000000000000000000000000000..c9704db31bcb3ecd8ce9cbd1056623ffa0bccb34
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_rx_hi2121.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_rx_reg.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_rx_reg.h
new file mode 100755
index 0000000000000000000000000000000000000000..aa3fd6d12e101ce28bab12678c6c6deb4a064654
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_csi/mipi_rx_reg.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..21ffe60ebc1556b4482b8e6091b75b719b03ff3a
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_MIPI_DSI)
+module_name = "hdf_mipi_dsi"
+hdf_driver(module_name) {
+ sources = [ "mipi_tx_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..3194003dd879018ea91f52f22d806161d2ca60bb
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_mipi_dsi
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += mipi_tx_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_dsi_define.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_dsi_define.h
new file mode 100755
index 0000000000000000000000000000000000000000..6af968d250df4f1ac43b6f3626fe26953c50984c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_dsi_define.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_tx_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_tx_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..0f9547d6394438d667f67382ee02fb70cf94bbf1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_tx_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_tx_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_tx_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..69638dd21cc5e60c473a7748f5f749440ab1e11e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_tx_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_tx_reg.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_tx_reg.h
new file mode 100755
index 0000000000000000000000000000000000000000..67d6b59b85098c5049c7bccf4a6ad6a40e66e2ad
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mipi_dsi/mipi_tx_reg.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..afd9a2c1ef6239cb833d1bd50d5985ff85710eec
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/BUILD.gn
@@ -0,0 +1,32 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_MMC)
+module_name = "hdf_mmc"
+hdf_driver(module_name) {
+ if (defined(LOSCFG_PLATFORM_HI3516DV300)) {
+ sources = [
+ "himci_v200/himci.c",
+ "himci_v200/proc/himci_proc.c",
+ ]
+ include_dirs = [ "himci_v200/proc" ]
+ } else if (defined(LOSCFG_PLATFORM_HI3518EV300)) {
+ sources = [
+ "sdhci/proc/sdhci_proc.c",
+ "sdhci/sdhci.c",
+ ]
+ include_dirs = [ "sdhci/proc" ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..7fbac109ed3b46b9026407d44d898848c9bad23e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/Makefile
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_mmc
+HDF_MMC_INC = $(LITEOSTOPDIR)/../../device/soc/hisilicon/common/platform/mmc
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+ifeq ($(LOSCFG_PLATFORM_HI3516DV300), y)
+ LOCAL_INCLUDE = $(HDF_MMC_INC)/himci_v200/proc
+ LOCAL_SRCS += himci_v200/himci.c
+ LOCAL_SRCS += himci_v200/proc/himci_proc.c
+endif
+
+ifeq ($(LOSCFG_PLATFORM_HI3518EV300), y)
+ LOCAL_INCLUDE = $(HDF_MMC_INC)/sdhci/proc
+ LOCAL_SRCS += sdhci/sdhci.c
+ LOCAL_SRCS += sdhci/proc/sdhci_proc.c
+endif
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/himci.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/himci.c
new file mode 100755
index 0000000000000000000000000000000000000000..2e3d1142f6ede961175009be02ea8e93c93a5314
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/himci.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/himci.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/himci.h
new file mode 100755
index 0000000000000000000000000000000000000000..dc27420ad791d9c2380825773d62f6bd23cf743d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/himci.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/proc/himci_proc.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/proc/himci_proc.c
new file mode 100755
index 0000000000000000000000000000000000000000..79755c12961c35424264dd0dccade32d23e6a273
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/proc/himci_proc.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/proc/himci_proc.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/proc/himci_proc.h
new file mode 100755
index 0000000000000000000000000000000000000000..b518c6d9e8dd6a77cacaecbb287c30aa38e76f57
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/himci_v200/proc/himci_proc.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/proc/sdhci_proc.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/proc/sdhci_proc.c
new file mode 100755
index 0000000000000000000000000000000000000000..e9969e5908bf8f04175b261bee3875e583b18087
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/proc/sdhci_proc.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/proc/sdhci_proc.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/proc/sdhci_proc.h
new file mode 100755
index 0000000000000000000000000000000000000000..bf251f88e5bf47a399ff1a95b23fd31592d4718d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/proc/sdhci_proc.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/sdhci.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/sdhci.c
new file mode 100755
index 0000000000000000000000000000000000000000..b0f1d9f0a33e8fb45358aa8cc7c52594d0b05eb5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/sdhci.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/sdhci.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/sdhci.h
new file mode 100755
index 0000000000000000000000000000000000000000..db05fd4dba80b6472a9fadb724726163907dad7a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mmc/sdhci/sdhci.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..5dc0fc7341b844eb8fca5db43f2399540479ade8
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/BUILD.gn
@@ -0,0 +1,36 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_STORAGE_MTD)
+module_name = "hdf_mtd_hisilicon"
+hdf_driver(module_name) {
+ if (defined(LOSCFG_PLATFORM_HI3516DV300) ||
+ defined(LOSCFG_PLATFORM_HI3518EV300)) {
+ include_dirs = [
+ "hifmc100/common",
+ "hifmc100/spi_nor",
+ "hifmc100/spi_nand",
+ ]
+ sources = [
+ "hifmc100/common/hifmc100.c",
+ "hifmc100/spi_nand/hifmc100_spi_nand.c",
+ "hifmc100/spi_nand/hifmc100_spi_nand_ids.c",
+ "hifmc100/spi_nor/hifmc100_spi_nor.c",
+ "hifmc100/spi_nor/hifmc100_spi_nor_ids.c",
+ "hifmc100/spi_nor/mx25l.c",
+ "hifmc100/spi_nor/w25qh.c",
+ ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..ade42a4d23b8f0eb90be7b7b4146e8446c8b8bc0
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/Makefile
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_mtd_hisilicon
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+ifneq ($(LOSCFG_PLATFORM_HI3516DV300)$(LOSCFG_PLATFORM_HI3518EV300),)
+ LOCAL_INCLUDE += hifmc100/common
+ LOCAL_INCLUDE += hifmc100/spi_nor
+ LOCAL_INCLUDE += hifmc100/spi_nand
+ LOCAL_SRCS += hifmc100/common/hifmc100.c
+ LOCAL_SRCS += hifmc100/spi_nor/hifmc100_spi_nor.c
+ LOCAL_SRCS += hifmc100/spi_nor/mx25l.c
+ LOCAL_SRCS += hifmc100/spi_nor/w25qh.c
+ LOCAL_SRCS += hifmc100/spi_nor/hifmc100_spi_nor_ids.c
+ LOCAL_SRCS += hifmc100/spi_nand/hifmc100_spi_nand.c
+ LOCAL_SRCS += hifmc100/spi_nand/hifmc100_spi_nand_ids.c
+endif
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/common/hifmc100.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/common/hifmc100.c
new file mode 100755
index 0000000000000000000000000000000000000000..d70c71951413277502fd5bde9aa56c9386b896e0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/common/hifmc100.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/common/hifmc100.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/common/hifmc100.h
new file mode 100755
index 0000000000000000000000000000000000000000..e087434163d88e23d48093f60cc1a74daa5f779d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/common/hifmc100.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nand/hifmc100_spi_nand.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nand/hifmc100_spi_nand.c
new file mode 100755
index 0000000000000000000000000000000000000000..08f59a2b03950f91923473fa8eaaa7fa37866fb1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nand/hifmc100_spi_nand.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nand/hifmc100_spi_nand.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nand/hifmc100_spi_nand.h
new file mode 100755
index 0000000000000000000000000000000000000000..6d663923b3892fa06931b2ac49a72fc581101fb2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nand/hifmc100_spi_nand.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nand/hifmc100_spi_nand_ids.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nand/hifmc100_spi_nand_ids.c
new file mode 100755
index 0000000000000000000000000000000000000000..4252cdf79eb0e26528d11db4e0b787e8772fbfbd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nand/hifmc100_spi_nand_ids.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/hifmc100_spi_nor.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/hifmc100_spi_nor.c
new file mode 100755
index 0000000000000000000000000000000000000000..b73b39219ceb3bab6c026d24370e04051e53c8f6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/hifmc100_spi_nor.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/hifmc100_spi_nor.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/hifmc100_spi_nor.h
new file mode 100755
index 0000000000000000000000000000000000000000..688c0381d7c8644dcee6ee6c10e36758f19e6c43
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/hifmc100_spi_nor.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/hifmc100_spi_nor_ids.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/hifmc100_spi_nor_ids.c
new file mode 100755
index 0000000000000000000000000000000000000000..c5f93dec737d6dc792568c07ad2f52ac00ab05ac
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/hifmc100_spi_nor_ids.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/mx25l.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/mx25l.c
new file mode 100755
index 0000000000000000000000000000000000000000..1138dd1161c88b775bff5e31b9852dffa5828b6b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/mx25l.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/w25qh.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/w25qh.c
new file mode 100755
index 0000000000000000000000000000000000000000..a35da66ff0f768b4bd04c30d65123071cff1c549
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/mtd/hifmc100/spi_nor/w25qh.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..d17ad276601a53441f4b4cf5a576c6fff1cd857e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_PIN)
+module_name = "hdf_pin"
+hdf_driver(module_name) {
+ sources = [ "pin_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..f56711b947160e98c713a5467115c424f89272b3
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_pin
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += pin_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/pin_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/pin_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..5480836b1926e6c3d994705ca95f0a423ac8225e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/pin_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/pin_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/pin_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..c95b222ca436645f878721db18a2e5b4305c0c6b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pin/pin_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..4cecd9cd4a62415ba4af31c12d5b5bcc7a516d82
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_PWM)
+module_name = "hdf_pwm"
+hdf_driver(module_name) {
+ sources = [ "pwm_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..b55d4090c1386f9d731558d69bde37cd9c825a38
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_pwm
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += pwm_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/pwm_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/pwm_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..30e8c3cff8e4d69355ca4ffab356669bdd01d018
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/pwm_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/pwm_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/pwm_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..b111b48a7c1e6d56be5a1b9f8e9e55db77bf2484
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/pwm/pwm_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..050bdcdb6672b2174660eafe3ea081e59ae1a560
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_RTC)
+module_name = "hdf_rtc"
+hdf_driver(module_name) {
+ sources = [ "rtc_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..ea03ebf0e86dfee1cab54659209c7ac27779d304
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_rtc
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += rtc_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/rtc_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/rtc_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..a0aa5ae5d1aecaef45938bee32f586f937eec84b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/rtc_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/rtc_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/rtc_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..e490c51ea17992e6e3f24a98c9a845b853f28536
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/rtc/rtc_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..8dfadaa24e2075bd5828188c8aa1270ed02f33dd
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_SPI)
+module_name = "hdf_spi"
+hdf_driver(module_name) {
+ sources = [ "spi_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..6e64e0997d0de94c2169f18759de83e32b73bd1e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_spi
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += spi_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/spi_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/spi_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..6522a26933f6a37cbf661735b24382f152d56bab
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/spi_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/spi_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/spi_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..2d601cf97838f6df7d6254f654930d824dc08ba9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/spi/spi_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..e420124ba40bd37fef1f88f108ad76702f07b194
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_TIMER)
+module_name = "hdf_timer"
+hdf_driver(module_name) {
+ sources = [ "timer_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..b6b5bdf9a9a180a4c602d609ae47b86c7407828b
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_timer
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += timer_hi35xx.c \
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/timer_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/timer_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..8be5aaee116b64dea2e209551d49eb3e99a75a08
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/timer_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/timer_hi35xx.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/timer_hi35xx.h
new file mode 100755
index 0000000000000000000000000000000000000000..e93020817720f068c1958cbc66068907203249ee
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/timer/timer_hi35xx.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..7142f4d04578bb9cb22d69050e60af41bbdc179b
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/BUILD.gn
@@ -0,0 +1,23 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_UART)
+module_name = "hdf_uart"
+hdf_driver(module_name) {
+ sources = [
+ "uart_hi35xx.c",
+ "uart_pl011.c",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..6e9b8bdbe299b2c8954551ecc47dfedd52096fbf
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/Makefile
@@ -0,0 +1,29 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_uart
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += uart_hi35xx.c \
+ uart_pl011.c \
+
+LOCAL_CFLAGS += -fstack-protector-strong
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/uart_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/uart_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..6d85b68819869dd28f004eaa338c0c2e922a9c26
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/uart_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/uart_pl011.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/uart_pl011.c
new file mode 100755
index 0000000000000000000000000000000000000000..3736181cbdd25ebcdc9f20e4b7cc3b63769980f3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/uart_pl011.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/uart_pl011.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/uart_pl011.h
new file mode 100755
index 0000000000000000000000000000000000000000..403491d3616e8e594d5fcb4b8af53804fd5be2fe
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/uart/uart_pl011.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/watchdog/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/watchdog/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..10081c0cb8b39e74d707640d9585b101f5bce0c9
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/watchdog/BUILD.gn
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_WATCHDOG)
+module_name = "hdf_watchdog"
+hdf_driver(module_name) {
+ sources = [ "watchdog_hi35xx.c" ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/watchdog/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/watchdog/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..5fe30ee17106344f550872e075633d2a992d73c8
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/watchdog/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
+# 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.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_watchdog
+
+LOCAL_CFLAGS += $(HDF_INCLUDE)
+
+LOCAL_SRCS += watchdog_hi35xx.c
+
+LOCAL_CFLAGS += -fstack-protector-strong -Wextra -Wall -Werror -fsigned-char -fno-strict-aliasing -fno-common
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/watchdog/watchdog_hi35xx.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/watchdog/watchdog_hi35xx.c
new file mode 100755
index 0000000000000000000000000000000000000000..0bfebbe939851ce7b8cb2908d5610c239c490ecb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/watchdog/watchdog_hi35xx.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..44ab7b800d322d3c3c53a03dc70a1b5bf30d02ac
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/BUILD.gn
@@ -0,0 +1,33 @@
+# Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch = defined(LOSCFG_DRIVERS_HDF_WIFI)
+module_name = "hdf_vendor_wifi"
+
+HDM_WIFI_ROOT = "//drivers/hdf_core/framework/model/network/wifi"
+
+hdf_driver(module_name) {
+ sources = [ "adapter/hdf_wlan_sdio_adapt.c" ]
+ include_dirs = [
+ "$HDM_WIFI_ROOT/include",
+ "$HDM_WIFI_ROOT/platform/include",
+ "$HDM_WIFI_ROOT/core",
+ "//drivers/peripheral/wlan/client/include",
+ "driver/linuxkpi/include",
+ ]
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/Kconfig b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/Kconfig
new file mode 100755
index 0000000000000000000000000000000000000000..582e31157e78e5ae595b2a7965e8db3ff483de8a
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/Kconfig
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+config DRIVERS_HDF_WIFI
+ bool "Enable HDF WiFi Host driver"
+ default n
+ depends on DRIVERS_HDF
+ help
+ Answer Y to enable HDF WiFi Host driver.
+
+config DRIVERS_HI3881
+ bool "Enable Hi3881 Host driver"
+ default n
+ depends on DRIVERS_HDF_WIFI
+ help
+ Answer Y to enable Hi3881 Host driver.
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..a30c6666fbfbbf1c1b4835fc705481f40911b7de
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/Makefile
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2021-2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+MODULE_NAME := hdf_vendor_wifi
+VENDOR_WIFI_ROOT = .
+HDM_WIFI_ROOT = $(LITEOSTOPDIR)/../../drivers/hdf_core/framework/model/network/wifi
+
+LOCAL_INCLUDE = $(HDM_WIFI_ROOT)/include \
+ $(HDM_WIFI_ROOT)/platform/include \
+ $(HDM_WIFI_ROOT)/core \
+ $(LITEOSTOPDIR)/../../drivers/peripheral/wlan/client/include \
+ $(VENDOR_WIFI_ROOT)/driver/linuxkpi/include
+
+LOCAL_SRCS += $(wildcard adapter/*.c)
+
+LOCAL_CFLAGS += -fstack-protector-strong -fno-common -fsigned-char -fno-strict-aliasing
+
+include $(HDF_DRIVER)
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/adapter/hdf_wlan_sdio_adapt.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/adapter/hdf_wlan_sdio_adapt.c
new file mode 100755
index 0000000000000000000000000000000000000000..9bfe76c5cf53e0d9ad510e389a45832cf81425ca
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/adapter/hdf_wlan_sdio_adapt.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..50ecbe6ec1fc23a196ab1cbb0791140c78b5e80a
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/BUILD.gn
@@ -0,0 +1,441 @@
+# Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+import("//drivers/hdf_core/adapter/khdf/liteos/hdf.gni")
+
+module_switch =
+ defined(LOSCFG_DRIVERS_HDF_WIFI) && defined(LOSCFG_DRIVERS_HI3881)
+module_name = "hi3881"
+
+HDM_WIFI_ROOT = "//drivers/hdf_core/framework/model/network/wifi"
+
+n = false
+y = true
+
+##################path of compile file :start###############
+#####wifi#####
+OAL_PATH = "oal"
+OAM_PATH = "oam"
+FRW_PATH = "frw"
+MAC_PATH = "mac/common"
+HMAC_PATH = "mac/hmac"
+HCC_PATH = "hcc"
+WAL_PATH = "wal"
+ADPATER_PATH = "hdfadapt"
+
+CFG_ANTI_INTERF = y
+CFG_CCA_OPT = y
+CFG_DBAC = y
+CFG_EDCA_OPT = y
+CFG_EDCA_OPT_AP = y
+CFG_SCHEDULE = y
+CFG_TRAFFIC_CTL = n
+CFG_TPC = y
+CFG_RF_1102CALI = y
+CFG_RF_110X_CALI_DPD = n
+CFG_NEW_IQ = y
+CFG_ALG_CFG = n
+CFG_HCC_TASK = y
+
+########################flash cut begin########################
+######## CFG_XXX_ROM can't be set to n ########
+CFG_P2P = y
+CFG_P2P_ROM = y
+CFG_WAPI = n
+CFG_WAPI_ROM = y
+CFG_WOW = y
+CFG_WOW_ROM = y
+CFG_REKEY_OFFLOAD = n
+CFG_REKEY_OFFLOAD_ROM = y
+CFG_PROMIS = y
+CFG_PROMIS_ROM = y
+CFG_MFG_TEST = y
+CFG_CE_MODE = y
+CFG_FCC_MODE = n
+CFG_MFG_FW = n
+
+########################flash cut end##########################
+CFG_BTCOEX_ROM = y
+CFG_ANY = n
+CFG_STA_PM = y
+CFG_MESH = n
+CFG_TCP_OPT = n
+CFG_TX_CLASSIFY_LAN_TO_WLAN = n
+CFG_UAPSD = y
+CFG_ARP_OFFLOAD = y
+CFG_DHCP_OFFLOAD = y
+CFG_LITEOS = y
+CFG_SIGMA = y
+CFG_HIPRIV = y
+LOSCFG_COMPILER_HI3861_FLASH = n
+LOSCFG_COMPILER_HI3861_ASIC = n
+
+hdf_driver(module_name) {
+ sources = [
+ "$OAL_PATH/exception_rst.c",
+ "$OAL_PATH/oal_cfg80211.c",
+ "$OAL_PATH/oal_chr.c",
+ "$OAL_PATH/oal_kernel_file.c",
+ "$OAL_PATH/oal_main.c",
+ "$OAL_PATH/oal_mem.c",
+ "$OAL_PATH/oal_net.c",
+ "$OAL_PATH/oal_sdio_host.c",
+ "$OAL_PATH/oal_shellcmd.c",
+ "$OAL_PATH/oal_util.c",
+ "$OAL_PATH/plat_board_common_sdio.c",
+ "$OAL_PATH/plat_firmware.c",
+ "$OAL_PATH/plat_pm.c",
+ "$OAL_PATH/plat_pm_wlan.c",
+ "$OAL_PATH/plat_sdio.c",
+ ]
+ if (CFG_LITEOS) {
+ sources += [
+ "$OAL_PATH/hi_event.c",
+ "$OAL_PATH/hi_task.c",
+ "$OAL_PATH/hi_time.c",
+ "$OAL_PATH/os_sys.c",
+ ]
+ }
+ sources += [
+ "$ADPATER_PATH/hdf_driver_register.c",
+ "$ADPATER_PATH/hdfinit_3881.c",
+ "$ADPATER_PATH/net_adpater.c",
+ ]
+ sources += [
+ "$OAM_PATH/oam_log.c",
+ "$OAM_PATH/oam_main.c",
+ ]
+ sources += [
+ "$FRW_PATH/frw_event.c",
+ "$FRW_PATH/frw_event_sched.c",
+ "$FRW_PATH/frw_main.c",
+ "$FRW_PATH/frw_task.c",
+ "$FRW_PATH/frw_timer.c",
+ ]
+ sources += [
+ "$HMAC_PATH/hmac_11i.c",
+ "$HMAC_PATH/hmac_blockack.c",
+ "$HMAC_PATH/hmac_chan_mgmt.c",
+ "$HMAC_PATH/hmac_config.c",
+ "$HMAC_PATH/hmac_crypto_tkip.c",
+ "$HMAC_PATH/hmac_device.c",
+ "$HMAC_PATH/hmac_encap_frame.c",
+ "$HMAC_PATH/hmac_encap_frame_ap.c",
+ "$HMAC_PATH/hmac_encap_frame_sta.c",
+ "$HMAC_PATH/hmac_event.c",
+ "$HMAC_PATH/hmac_frag.c",
+ "$HMAC_PATH/hmac_fsm.c",
+ "$HMAC_PATH/hmac_main.c",
+ "$HMAC_PATH/hmac_mgmt_ap.c",
+ "$HMAC_PATH/hmac_mgmt_bss_comm.c",
+ "$HMAC_PATH/hmac_mgmt_classifier.c",
+ "$HMAC_PATH/hmac_mgmt_sta.c",
+ "$HMAC_PATH/hmac_protection.c",
+ "$HMAC_PATH/hmac_rx_data.c",
+ "$HMAC_PATH/hmac_rx_filter.c",
+ "$HMAC_PATH/hmac_scan.c",
+ "$HMAC_PATH/hmac_sme_sta.c",
+ "$HMAC_PATH/hmac_tx_data.c",
+ "$HMAC_PATH/hmac_uapsd.c",
+ "$HMAC_PATH/hmac_user.c",
+ "$HMAC_PATH/hmac_vap.c",
+ ]
+ if (CFG_EDCA_OPT_AP) {
+ sources += [ "$HMAC_PATH/hmac_edca_opt.c" ]
+ }
+ if (CFG_P2P) {
+ sources += [ "$HMAC_PATH/hmac_p2p.c" ]
+ }
+ if (CFG_TCP_OPT) {
+ sources += [ "$HMAC_PATH/hmac_tcp_opt.c" ]
+ }
+ if (CFG_TX_CLASSIFY_LAN_TO_WLAN) {
+ sources += [ "$HMAC_PATH/hmac_traffic_classify.c" ]
+ }
+ if (CFG_WOW) {
+ sources += [ "$HMAC_PATH/hmac_wow.c" ]
+ }
+ if (CFG_ANY) {
+ sources += [ "$HMAC_PATH/hmac_any.c" ]
+ }
+ if (CFG_WAPI) {
+ sources += [
+ "$HMAC_PATH/hmac_wapi.c",
+ "$HMAC_PATH/hmac_wapi_sms4.c",
+ "$HMAC_PATH/hmac_wapi_wpi.c",
+ ]
+ }
+ sources += [
+ "$WAL_PATH/hi_wifi_driver_api.c",
+ "$WAL_PATH/wal_11d.c",
+ "$WAL_PATH/wal_cfg80211.c",
+ "$WAL_PATH/wal_customize.c",
+ "$WAL_PATH/wal_event.c",
+ "$WAL_PATH/wal_event_msg.c",
+ "$WAL_PATH/wal_hipriv.c",
+ "$WAL_PATH/wal_ioctl.c",
+ "$WAL_PATH/wal_linux_flowctl.c",
+ "$WAL_PATH/wal_mac80211.c",
+ "$WAL_PATH/wal_main.c",
+ "$WAL_PATH/wal_regdb.c",
+ "$WAL_PATH/wal_scan.c",
+ ]
+ if (CFG_LITEOS) {
+ sources += [ "$WAL_PATH/wal_cfg80211_apt.c" ]
+ }
+ sources += [
+ "$MAC_PATH/mac_data.c",
+ "$MAC_PATH/mac_device.c",
+ "$MAC_PATH/mac_frame.c",
+ "$MAC_PATH/mac_ie.c",
+ "$MAC_PATH/mac_mib.c",
+ "$MAC_PATH/mac_pm_driver.c",
+ "$MAC_PATH/mac_regdomain.c",
+ "$MAC_PATH/mac_resource.c",
+ "$MAC_PATH/mac_user.c",
+ "$MAC_PATH/mac_vap.c",
+ ]
+ sources += [
+ "$HCC_PATH/hcc_comm.c",
+ "$HCC_PATH/hcc_hmac.c",
+ "$HCC_PATH/hcc_host.c",
+ "$HCC_PATH/hcc_task.c",
+ "$HCC_PATH/hmac_hcc_adapt.c",
+ ]
+
+ include_dirs = [
+ "$HDM_WIFI_ROOT/include",
+ "$HDM_WIFI_ROOT/core",
+ "$HDM_WIFI_ROOT/core/components/softap",
+ "$HDM_WIFI_ROOT/core/components/sta",
+ "$HDM_WIFI_ROOT/core/components/eapol",
+ "$HDM_WIFI_ROOT/platform/include",
+ "$HDM_WIFI_ROOT/core/module",
+ "$HDM_WIFI_ROOT/platform/include/qos",
+ "linuxkpi/include",
+ "wal",
+ "oam",
+ "mac/hmac",
+ "mac/common",
+ "hcc",
+ "frw",
+ "oal",
+ "include",
+ "hdfadapt",
+ ]
+
+ defines = [
+ "_PRE_OS_VERSION_LINUX=1",
+ "_PRE_OS_VERSION_LITEOS=2",
+ "_PRE_FRW_FEATURE_PROCESS_ENTITY_THREAD=0",
+ "_PRE_FRW_FEATURE_PROCESS_ENTITY_TASKLET=1",
+ "_PRE_FRW_FEATURE_PROCESS_ENTITY_TYPE=_PRE_FRW_FEATURE_PROCESS_ENTITY_THREAD",
+ "_PRE_MULTI_CORE_MODE_SMP=1",
+ "_PRE_MULTI_CORE_MODE_OFFLOAD_HMAC=2",
+ "_PRE_MULTI_CORE_MODE_OFFLOAD_DMAC=3",
+ "_PRE_BIG_CPU_ENDIAN=0",
+ "_PRE_LITTLE_CPU_ENDIAN=1",
+ "_PRE_CPU_ENDIAN=_PRE_LITTLE_CPU_ENDIAN",
+ "_HI_BOARD_FPGA=1",
+ "_HI_BOARD_ASIC=2",
+ "_PRE_WLAN_FEATURE_PMF",
+ "_PRE_WLAN_FEATURE_AUTORATE",
+ "_PRE_WLAN_PERFORM_TPC",
+ "_PRE_DBAC_DYNAMIC_POLICY",
+ "_PRE_WLAN_FEATURE_AGGR_OPTIMIZE",
+ "_PRE_WLAN_FEATURE_ALG_CFG_ROM",
+ "_PRE_WLAN_FEATURE_FLOWCTRL",
+ "_PRE_WLAN_FEATURE_CLASSIFY",
+ "_PRE_WLAN_FEATURE_ALWAYS_TX",
+ "_PRE_WLAN_FEATURE_WPA",
+ "_PRE_WLAN_FEATURE_WPA2",
+ "_PRE_WLAN_FEATURE_AMPDU",
+ "_PRE_WLAN_FEATURE_DHCP_OFFLOAD_ROM",
+ "_PRE_WLAN_FEATURE_PKT_MEM_OPT",
+ "_PRE_WLAN_PM_FEATURE_FORCESLP_RESUME",
+ "__BITS_PER_OAL_LONG=32",
+ "_PRE_WLAN_FEATURE_11D",
+ "_PRE_WLAN_FEATURE_ANY_ROM",
+ "_PRE_WLAN_FEATURE_CSI",
+ "_PRE_WLAN_FEATURE_STA_UAPSD",
+ "_PRE_WLAN_FEATURE_MESH_ROM",
+ "_PRE_WLAN_FEATURE_BW_HIEX",
+ "_PRE_XTAL_FREQUENCY_COMPESATION_ENABLE",
+ "CONFIG_MMC",
+ "CONFIG_PRINTK",
+ "_PRE_FEATURE_NO_GPIO",
+ "_PRE_WLAN_FEATURE_HILINK",
+ "_PRE_WLAN_FEATURE_SMARTCONFIG_APP",
+ "_PRE_WLAN_FEATURE_TEMP_PROTECT",
+ "_PRE_WLAN_FEATURE_SINGLE_DEVICE",
+ "_PRE_FEATURE_SDIO=1",
+ "_PRE_FEATURE_USB=2",
+ "_PRE_FEATURE_CHANNEL_TYPE=_PRE_FEATURE_SDIO",
+ "CONFIG_HI110X_SDIO_STD_CARD_SUPPORT",
+ ]
+ if (CFG_LITEOS) {
+ defines += [ "_PRE_OS_VERSION = _PRE_OS_VERSION_LITEOS" ]
+ } else {
+ defines += [ "_PRE_OS_VERSION = _PRE_OS_VERSION_LINUX" ]
+ }
+ if (LOSCFG_COMPILER_HI3861_FLASH) {
+ defines += [ "_PRE_MULTI_CORE_MODE=_PRE_MULTI_CORE_MODE_SMP" ]
+ } else {
+ defines += [ "_PRE_MULTI_CORE_MODE=_PRE_MULTI_CORE_MODE_OFFLOAD_DMAC" ]
+ }
+ if (LOSCFG_COMPILER_HI3861_ASIC) {
+ defines += [ "_PRE_WLAN_CHIP_VERSION=_HI_BOARD_ASIC" ]
+ } else {
+ defines += [ "_PRE_WLAN_CHIP_VERSION=_HI_BOARD_FPGA" ]
+ }
+ if (defined(QUICK_START)) {
+ defines += [ "_PRE_WLAN_FEATURE_QUICK_START" ]
+ }
+ if (defined(NO_32K)) {
+ defines += [ "_PRE_WLAN_FEATURE_NO_32K" ]
+ }
+ if (defined(BOARD_FUNC)) {
+ defines += [ "_PRE_WLAN_FPGA_DIGITAL" ]
+ }
+ if (CFG_SCHEDULE) {
+ defines += [ "_PRE_WLAN_FEATURE_SCHEDULE" ]
+ }
+ if (CFG_TPC) {
+ defines += [ "_PRE_WLAN_FEATURE_TPC" ]
+ }
+ if (CFG_DBAC) {
+ defines += [ "_PRE_WLAN_FEATURE_DBAC" ]
+ }
+ if (CFG_CCA_OPT) {
+ defines += [ "_PRE_WLAN_FEATURE_CCA_OPT" ]
+ }
+ if (CFG_EDCA_OPT) {
+ defines += [ "_PRE_WLAN_FEATURE_EDCA_OPT" ]
+ }
+ if (CFG_EDCA_OPT_AP) {
+ defines += [ "_PRE_WLAN_FEATURE_EDCA_OPT_AP" ]
+ }
+ if (CFG_ANTI_INTERF) {
+ defines += [ "_PRE_WLAN_FEATURE_ANTI_INTERF" ]
+ }
+ if (CFG_TRAFFIC_CTL) {
+ defines += [ "_PRE_WLAN_FEATURE_TRAFFIC_CTL" ]
+ }
+ if (CFG_ALG_CFG) {
+ defines += [ "_PRE_WLAN_FEATURE_ALG_CFG" ]
+ }
+ if (defined(CFG_ALG_INTRF_MODE)) {
+ defines += [ "_PRE_WLAN_FEATURE_INTRF_MODE" ]
+ }
+ if (CFG_TX_CLASSIFY_LAN_TO_WLAN) {
+ defines += [ "_PRE_WLAN_FEATURE_TX_CLASSIFY_LAN_TO_WLAN" ]
+ }
+ if (CFG_ARP_OFFLOAD) {
+ defines += [ "_PRE_WLAN_FEATURE_ARP_OFFLOAD" ]
+ }
+ if (CFG_DHCP_OFFLOAD) {
+ defines += [ "_PRE_WLAN_FEATURE_DHCP_OFFLOAD" ]
+ }
+ if (CFG_NEW_IQ) {
+ defines += [ "_PRE_WLAN_NEW_IQ" ]
+ }
+ if (CFG_P2P) {
+ defines += [ "_PRE_WLAN_FEATURE_P2P" ]
+ }
+ if (CFG_P2P_ROM) {
+ defines += [ "_PRE_WLAN_FEATURE_P2P_ROM" ]
+ }
+ if (CFG_ANY) {
+ defines += [ "_PRE_WLAN_FEATURE_ANY" ]
+ }
+ if (CFG_STA_PM) {
+ defines += [ "_PRE_WLAN_FEATURE_STA_PM" ]
+ }
+ if (CFG_MESH) {
+ defines += [ "_PRE_WLAN_FEATURE_MESH" ]
+ }
+ if (defined(CFG_BTCOEX)) {
+ defines += [ "_PRE_WLAN_FEATURE_BTCOEX" ]
+ }
+ if (CFG_BTCOEX_ROM) {
+ defines += [ "_PRE_WLAN_FEATURE_BTCOEX_ROM" ]
+ }
+ if (CFG_RF_110X_CALI_DPD) {
+ defines += [ "_PRE_WLAN_RF_110X_CALI_DPD" ]
+ }
+ if (CFG_RF_1102CALI) {
+ defines += [ "_PRE_WLAN_RF_1102CALI" ]
+ }
+ if (CFG_UAPSD) {
+ defines += [ "_PRE_WLAN_FEATURE_UAPSD" ]
+ }
+ if (CFG_WAPI) {
+ defines += [ "_PRE_WLAN_FEATURE_WAPI" ]
+ }
+ if (CFG_WAPI_ROM) {
+ defines += [ "_PRE_WLAN_FEATURE_WAPI_ROM" ]
+ }
+ if (CFG_TCP_OPT) {
+ defines += [ "_PRE_WLAN_TCP_OPT" ]
+ }
+ if (CFG_REKEY_OFFLOAD) {
+ defines += [ "_PRE_WLAN_FEATURE_REKEY_OFFLOAD" ]
+ }
+ if (CFG_REKEY_OFFLOAD_ROM) {
+ defines += [ "_PRE_WLAN_FEATURE_REKEY_OFFLOAD_ROM" ]
+ }
+ if (CFG_WOW) {
+ defines += [ "_PRE_WLAN_FEATURE_WOW" ]
+ }
+ if (CFG_WOW_ROM) {
+ defines += [ "_PRE_WLAN_FEATURE_WOW_ROM" ]
+ }
+ if (CFG_PROMIS) {
+ defines += [ "_PRE_WLAN_FEATURE_PROMIS" ]
+ }
+ if (CFG_PROMIS_ROM) {
+ defines += [ "_PRE_WLAN_FEATURE_PROMIS_ROM" ]
+ }
+ if (CFG_SIGMA) {
+ defines += [ "_PRE_WLAN_FEATURE_SIGMA" ]
+ }
+ if (CFG_MFG_TEST) {
+ defines += [ "_PRE_WLAN_FEATURE_MFG_TEST" ]
+ }
+ if (CFG_MFG_FW) {
+ defines += [ "_PRE_WLAN_FEATURE_MFG_FW" ]
+ }
+ if (CFG_CE_MODE) {
+ defines += [ "_PRE_CE_INITIAL_PARAMS_MODE" ]
+ }
+ if (CFG_FCC_MODE) {
+ defines += [ "_PRE_FCC_INITIAL_PARAMS_MODE" ]
+ }
+ if (CFG_HIPRIV) {
+ defines += [ "_PRE_WLAN_FEATURE_HIPRIV" ]
+ if (CFG_LITEOS) {
+ defines += [ "AT_DEBUG_CMD_SUPPORT" ]
+ } else {
+ defines += [ "_PRE_CONFIG_CONN_HISI_SYSFS_SUPPORT" ]
+ }
+ }
+ if (CFG_HCC_TASK) {
+ defines += [ "_PRE_FEATURE_HCC_TASK" ]
+ }
+ if (defined(LOSCFG_PLATFORM_HI3516EV300)) {
+ defines += [ "HISI_WIFI_PLATFORM_HI3516EV300" ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/Makefile b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/Makefile
new file mode 100755
index 0000000000000000000000000000000000000000..381f6fc9e028bd32f0d6c35541c24a820d4fbf60
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/Makefile
@@ -0,0 +1,135 @@
+#
+# Copyright (C) 2021-2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+include $(LITEOSTOPDIR)/config.mk
+include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk
+
+HDM_WIFI_ROOT = $(LITEOSTOPDIR)/../../drivers/hdf_core/framework/model/network/wifi
+WIFI_DRIVER_DIR = .
+
+MODULE_NAME := hi3881
+
+##################path of compile file :start###############
+#####wifi#####
+OAL_PATH := $(WIFI_DRIVER_DIR)/oal/
+OAM_PATH := $(WIFI_DRIVER_DIR)/oam/
+FRW_PATH := $(WIFI_DRIVER_DIR)/frw/
+MAC_PATH := $(WIFI_DRIVER_DIR)/mac/common/
+HMAC_PATH := $(WIFI_DRIVER_DIR)/mac/hmac/
+HCC_PATH := $(WIFI_DRIVER_DIR)/hcc/
+WAL_PATH := $(WIFI_DRIVER_DIR)/wal/
+ADPATER_PATH := $(WIFI_DRIVER_DIR)/hdfadapt/
+##################path of compile file :end###############
+
+LOCAL_INCLUDE = $(HDM_WIFI_ROOT)/include \
+ $(HDM_WIFI_ROOT)/core \
+ $(HDM_WIFI_ROOT)/core/components/softap \
+ $(HDM_WIFI_ROOT)/core/components/sta \
+ $(HDM_WIFI_ROOT)/core/components/eapol \
+ $(HDM_WIFI_ROOT)/platform/include \
+ $(HDM_WIFI_ROOT)/core/module \
+ $(HDM_WIFI_ROOT)/platform/include/qos \
+ $(WIFI_DRIVER_DIR)/linuxkpi/include
+
+CFG_LITEOS = y
+include $(WIFI_DRIVER_DIR)/env_config.mk
+
+HI1131_HOST_CFLAGS += -Wextra -fsigned-char -fno-strict-aliasing -Wdate-time \
+ -Wformat=2 -Wshadow -fvisibility=hidden -fno-common -fstack-protector-strong
+
+HI1131_HOST_CFLAGS += $(HI1131_WIFI_CFLAGS)
+
+
+####################################### platform module start #########################################
+oal-objs := oal_util.o oal_net.o oal_main.o oal_mem.o oal_shellcmd.o
+oal-objs += oal_cfg80211.o oal_sdio_host.o oal_kernel_file.o exception_rst.o \
+ plat_firmware.o plat_pm.o plat_pm_wlan.o plat_sdio.o oal_chr.o
+ifeq ($(CFG_LITEOS), y)
+oal-objs += hi_task.o hi_event.o hi_time.o os_sys.o
+endif
+oal-objs := $(addprefix $(OAL_PATH),$(oal-objs))
+
+adapter-objs := hdfinit_3881.o net_adpater.o hdf_driver_register.o
+adapter-objs := $(addprefix $(ADPATER_PATH),$(adapter-objs))
+
+oam-objs := oam_main.o oam_log.o
+oam-objs := $(addprefix $(OAM_PATH),$(oam-objs))
+
+board-objs := plat_board_common_sdio.o
+board-objs := $(addprefix $(OAL_PATH),$(board-objs))
+
+frw-objs += frw_event.o frw_event_sched.o frw_main.o frw_task.o frw_timer.o
+frw-objs := $(addprefix $(FRW_PATH),$(frw-objs))
+
+plat-objs = $(oal-objs) $(oam-objs) $(board-objs) $(frw-objs) $(adapter-objs)
+####################################### platform module end #########################################
+
+####################################### wifi module start #########################################
+hmac-objs := hmac_11i.o hmac_blockack.o hmac_chan_mgmt.o hmac_config.o hmac_crypto_tkip.o hmac_event.o hmac_uapsd.o \
+ hmac_device.o hmac_encap_frame.o hmac_encap_frame_ap.o hmac_encap_frame_sta.o hmac_frag.o hmac_fsm.o \
+ hmac_mgmt_ap.o hmac_mgmt_bss_comm.o hmac_mgmt_classifier.o hmac_mgmt_sta.o hmac_protection.o hmac_user.o \
+ hmac_rx_data.o hmac_tx_data.o hmac_rx_filter.o hmac_scan.o hmac_sme_sta.o hmac_vap.o \
+ hmac_main.o
+
+ifeq ($(CFG_EDCA_OPT_AP), y)
+hmac-objs += hmac_edca_opt.o
+endif
+ifeq ($(CFG_P2P), y)
+hmac-objs += hmac_p2p.o
+endif
+ifeq ($(CFG_TCP_OPT), y)
+hmac-objs += hmac_tcp_opt.o
+endif
+ifeq ($(CFG_TX_CLASSIFY_LAN_TO_WLAN), y)
+hmac-objs += hmac_traffic_classify.o
+endif
+ifeq ($(CFG_WOW), y)
+hmac-objs += hmac_wow.o
+endif
+ifeq ($(CFG_ANY), y)
+hmac-objs += hmac_any.o
+endif
+ifeq ($(CFG_WAPI), y)
+hmac-objs += hmac_wapi.o hmac_wapi_wpi.o hmac_wapi_sms4.o
+endif
+hmac-objs := $(addprefix $(HMAC_PATH),$(hmac-objs))
+
+wal-objs := wal_customize.o wal_cfg80211.o wal_11d.o wal_hipriv.o wal_event_msg.o hi_wifi_driver_api.o wal_linux_flowctl.o wal_ioctl.o wal_event.o wal_scan.o wal_main.o wal_regdb.o wal_mac80211.o
+ifeq ($(CFG_LITEOS), y)
+wal-objs += wal_cfg80211_apt.o
+endif
+wal-objs := $(addprefix $(WAL_PATH),$(wal-objs))
+
+mac-objs := mac_data.o mac_device.o mac_frame.o mac_ie.o mac_user.o mac_vap.o mac_mib.o mac_resource.o mac_regdomain.o mac_pm_driver.o
+mac-objs := $(addprefix $(MAC_PATH),$(mac-objs))
+
+hcc-objs := hcc_comm.o hcc_task.o hcc_host.o hcc_hmac.o hmac_hcc_adapt.o
+hcc-objs := $(addprefix $(HCC_PATH),$(hcc-objs))
+
+wifi-objs += $(mac-objs) $(hmac-objs) $(wal-objs) $(hcc-objs)
+####################################### wifi module end #########################################
+
+COBJS = $(wifi-objs) $(plat-objs)
+LOCAL_SRCS += $(patsubst %.o,%.c,$(COBJS))
+
+
+LOCAL_FLAGS += $(LITEOS_GCOV_OPTS)
+LOCAL_CFLAGS += $(HI1131_HOST_CFLAGS)
+
+include $(HDF_DRIVER)
+
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/current_module.rules b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/current_module.rules
new file mode 100755
index 0000000000000000000000000000000000000000..00c34cdb253884e1e5593f93e989ac767a10ec67
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/current_module.rules
@@ -0,0 +1,8 @@
+#src file(.c) root dir
+PRIM_XML_SRC_ROOT_DIR:=$(PRJ_ROOT)/code/wifi
+#src file(.c) sub dir
+PRIM_XML_SRC_SUB_DIR:=alg frw hal/hi1131hv100 hcc mac/common mac/hmac mac/dmac oal oam wal
+PRIM_XML_FILE_ID_FILE:= $(PRIM_XML_SRC_ROOT_DIR)/file_id.cfg
+PRIM_XML_MOD_ID_FILE:= $(PRIM_XML_SRC_ROOT_DIR)/mod_id.cfg
+#key_word for avoid file(folder) name collision with other module
+PRIM_XML_KEY_WORD:=wifi_drv
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/env_config.mk b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/env_config.mk
new file mode 100755
index 0000000000000000000000000000000000000000..158ee44e74eb504ad4e29fd179b4ac3ec38778b4
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/env_config.mk
@@ -0,0 +1,320 @@
+#
+# Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+#include $(SYSDIR)/config.mk
+
+#####################################WiFi config######################################
+CFG_ANTI_INTERF = y
+CFG_CCA_OPT = y
+CFG_DBAC = y
+CFG_EDCA_OPT = y
+CFG_EDCA_OPT_AP = y
+CFG_SCHEDULE = y
+CFG_TRAFFIC_CTL = n
+CFG_TPC = y
+CFG_RF_1102CALI = y
+CFG_RF_110X_CALI_DPD = n
+CFG_NEW_IQ = y
+CFG_ALG_CFG = n
+CFG_HCC_TASK = y
+########################flash cut begin########################
+######## CFG_XXX_ROM can't be set to n ########
+CFG_P2P = y
+CFG_P2P_ROM = y
+CFG_WAPI = n
+CFG_WAPI_ROM = y
+CFG_WOW = y
+CFG_WOW_ROM = y
+CFG_REKEY_OFFLOAD = n
+CFG_REKEY_OFFLOAD_ROM = y
+CFG_PROMIS = y
+CFG_PROMIS_ROM = y
+CFG_MFG_TEST = y
+CFG_CE_MODE = y
+CFG_FCC_MODE = n
+CFG_MFG_FW = n
+########################flash cut end##########################
+CFG_BTCOEX_ROM = y
+CFG_ANY = n
+CFG_STA_PM = y
+CFG_MESH = n
+CFG_TCP_OPT = n
+CFG_TX_CLASSIFY_LAN_TO_WLAN = n
+CFG_UAPSD = y
+CFG_ARP_OFFLOAD = y
+CFG_DHCP_OFFLOAD = y
+CFG_LITEOS = y
+CFG_SIGMA = y
+CFG_HIPRIV = y
+
+######################################################################################
+HI1131_WIFI_CFLAGS +=-D_PRE_OS_VERSION_LINUX=1
+HI1131_WIFI_CFLAGS +=-D_PRE_OS_VERSION_LITEOS=2
+ifeq ($(CFG_LITEOS), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_OS_VERSION=_PRE_OS_VERSION_LITEOS
+else
+HI1131_WIFI_CFLAGS +=-D_PRE_OS_VERSION=_PRE_OS_VERSION_LINUX
+endif
+
+HI1131_WIFI_CFLAGS +=-D_PRE_FRW_FEATURE_PROCESS_ENTITY_THREAD=0
+HI1131_WIFI_CFLAGS +=-D_PRE_FRW_FEATURE_PROCESS_ENTITY_TASKLET=1
+HI1131_WIFI_CFLAGS +=-D_PRE_FRW_FEATURE_PROCESS_ENTITY_TYPE=_PRE_FRW_FEATURE_PROCESS_ENTITY_THREAD
+
+#######################################HI1131#########################################
+HI1131_WIFI_CFLAGS +=-D_PRE_MULTI_CORE_MODE_SMP=1
+HI1131_WIFI_CFLAGS +=-D_PRE_MULTI_CORE_MODE_OFFLOAD_HMAC=2
+HI1131_WIFI_CFLAGS +=-D_PRE_MULTI_CORE_MODE_OFFLOAD_DMAC=3
+ifeq ($(LOSCFG_COMPILER_HI3861_FLASH), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_MULTI_CORE_MODE=_PRE_MULTI_CORE_MODE_SMP
+else
+HI1131_WIFI_CFLAGS +=-D_PRE_MULTI_CORE_MODE=_PRE_MULTI_CORE_MODE_OFFLOAD_DMAC
+endif
+
+HI1131_WIFI_CFLAGS +=-D_PRE_BIG_CPU_ENDIAN=0
+HI1131_WIFI_CFLAGS +=-D_PRE_LITTLE_CPU_ENDIAN=1
+HI1131_WIFI_CFLAGS +=-D_PRE_CPU_ENDIAN=_PRE_LITTLE_CPU_ENDIAN
+HI1131_WIFI_CFLAGS +=-D_HI_BOARD_FPGA=1
+HI1131_WIFI_CFLAGS +=-D_HI_BOARD_ASIC=2
+ifeq ($(LOSCFG_COMPILER_HI3861_ASIC), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_CHIP_VERSION=_HI_BOARD_ASIC
+else
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_CHIP_VERSION=_HI_BOARD_FPGA
+endif
+
+
+ifeq ($(QUICK_START),y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_QUICK_START
+endif
+ifeq ($(NO_32K),y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_NO_32K
+endif
+
+ifeq ($(BOARD_FUNC), DG)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FPGA_DIGITAL
+endif
+
+################################################################################
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_PMF
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_AUTORATE
+ifeq ($(CFG_SCHEDULE), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_SCHEDULE
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_PERFORM_TPC
+ifeq ($(CFG_TPC), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_TPC
+endif
+ifeq ($(CFG_DBAC), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_DBAC
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_DBAC_DYNAMIC_POLICY
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_AGGR_OPTIMIZE
+ifeq ($(CFG_CCA_OPT), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_CCA_OPT
+endif
+ifeq ($(CFG_EDCA_OPT), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_EDCA_OPT
+endif
+ifeq ($(CFG_EDCA_OPT_AP), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_EDCA_OPT_AP
+endif
+ifeq ($(CFG_ANTI_INTERF), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_ANTI_INTERF
+endif
+ifeq ($(CFG_TRAFFIC_CTL), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_TRAFFIC_CTL
+endif
+ifeq ($(CFG_ALG_CFG),y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_ALG_CFG
+endif
+ifeq ($(CFG_ALG_INTRF_MODE),y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_INTRF_MODE
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_ALG_CFG_ROM
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_FLOWCTRL
+ifeq ($(CFG_TX_CLASSIFY_LAN_TO_WLAN), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_TX_CLASSIFY_LAN_TO_WLAN
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_CLASSIFY
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_ALWAYS_TX
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_WPA
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_WPA2
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_AMPDU
+ifeq ($(CFG_ARP_OFFLOAD), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_ARP_OFFLOAD
+endif
+ifeq ($(CFG_DHCP_OFFLOAD), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_DHCP_OFFLOAD
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_DHCP_OFFLOAD_ROM
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_PKT_MEM_OPT
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_PM_FEATURE_FORCESLP_RESUME
+HI1131_WIFI_CFLAGS +=-D__BITS_PER_OAL_LONG=32
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_11D
+ifeq ($(CFG_NEW_IQ), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_NEW_IQ
+endif
+ifeq ($(CFG_P2P), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_P2P
+endif
+ifeq ($(CFG_P2P_ROM), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_P2P_ROM
+endif
+ifeq ($(CFG_ANY), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_ANY
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_ANY_ROM
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_CSI
+ifeq ($(CFG_STA_PM), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_STA_PM
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_STA_UAPSD
+ifeq ($(CFG_MESH), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_MESH
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_MESH_ROM
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_BW_HIEX
+ifeq ($(CFG_BTCOEX), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_BTCOEX
+endif
+ifeq ($(CFG_BTCOEX_ROM), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_BTCOEX_ROM
+endif
+#HI1131_WIFI_CFLAGS +=-D_PRE_PSM_DEBUG_MODE
+ifeq ($(CFG_RF_110X_CALI_DPD), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_RF_110X_CALI_DPD
+endif
+ifeq ($(CFG_RF_1102CALI), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_RF_1102CALI
+endif
+ifeq ($(CFG_UAPSD), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_UAPSD
+endif
+ifeq ($(CFG_WAPI), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_WAPI
+endif
+ifeq ($(CFG_WAPI_ROM), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_WAPI_ROM
+endif
+ifeq ($(CFG_TCP_OPT), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_TCP_OPT
+endif
+
+HI1131_WIFI_CFLAGS +=-D_PRE_XTAL_FREQUENCY_COMPESATION_ENABLE
+################################SDIO MMC CONFIG#############################
+HI1131_WIFI_CFLAGS +=-DCONFIG_MMC
+HI1131_WIFI_CFLAGS +=-DCONFIG_PRINTK
+HI1131_WIFI_CFLAGS +=-D_PRE_FEATURE_NO_GPIO
+ifeq ($(CFG_REKEY_OFFLOAD), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_REKEY_OFFLOAD
+endif
+ifeq ($(CFG_REKEY_OFFLOAD_ROM), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_REKEY_OFFLOAD_ROM
+endif
+ifeq ($(CFG_WOW), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_WOW
+endif
+ifeq ($(CFG_WOW_ROM), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_WOW_ROM
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_HILINK
+ifeq ($(CFG_PROMIS), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_PROMIS
+endif
+ifeq ($(CFG_PROMIS_ROM), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_PROMIS_ROM
+endif
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_SMARTCONFIG_APP
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_TEMP_PROTECT
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_SINGLE_DEVICE
+
+ifeq ($(CFG_SIGMA), y)
+#sigma tool support
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_SIGMA
+endif
+
+ifeq ($(CFG_MFG_TEST), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_MFG_TEST
+endif
+
+ifeq ($(CFG_MFG_FW), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_MFG_FW
+endif
+
+ifeq ($(CFG_CE_MODE), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_CE_INITIAL_PARAMS_MODE
+endif
+
+ifeq ($(CFG_FCC_MODE), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_FCC_INITIAL_PARAMS_MODE
+endif
+
+ifeq ($(CFG_HIPRIV), y)
+#sdv test support
+HI1131_WIFI_CFLAGS +=-D_PRE_WLAN_FEATURE_HIPRIV
+ifeq ($(CFG_LITEOS), n)
+HI1131_WIFI_CFLAGS +=-D_PRE_CONFIG_CONN_HISI_SYSFS_SUPPORT
+else
+HI1131_WIFI_CFLAGS +=-DAT_DEBUG_CMD_SUPPORT
+endif
+endif
+
+################################WAIT MODIFIED SDIO##############################
+HI1131_WIFI_CFLAGS +=-D_PRE_FEATURE_SDIO=1
+HI1131_WIFI_CFLAGS +=-D_PRE_FEATURE_USB=2
+HI1131_WIFI_CFLAGS +=-D_PRE_FEATURE_CHANNEL_TYPE=_PRE_FEATURE_SDIO
+HI1131_WIFI_CFLAGS +=-DCONFIG_HI110X_SDIO_STD_CARD_SUPPORT
+
+################################HCC_TASK##############################
+ifeq ($(CFG_HCC_TASK), y)
+HI1131_WIFI_CFLAGS +=-D_PRE_FEATURE_HCC_TASK
+endif
+
+################################WIFI_DRIVER_DIR##############################
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/wal
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/oam
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/mac/hmac
+
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/mac/common
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/hcc
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/frw
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/oal
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/include
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/include/securec
+
+################################device##############################
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/../include
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/../include/interface/rom/
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/../include/interface/
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/../include/wifi/
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/hdfadapt
+HI1131_WIFI_CFLAGS += -I $(WIFI_DRIVER_DIR)/../../../core/wal
+
+ifeq ($(LOSCFG_PLATFORM_HI3516EV300), y)
+HI1131_WIFI_CFLAGS +=-DHISI_WIFI_PLATFORM_HI3516EV300
+endif
+HDF_WIFI_DIR = $(WIFI_DRIVER_DIR)/../../../../../../drivers/hdf/common
+HI1131_WIFI_CFLAGS += -I $(HDF_WIFI_DIR)/hdf \
+ -I $(HDF_WIFI_DIR)/hdf/osal \
+ -I $(HDF_WIFI_DIR)/hdf/pal
+
+HI1131_WIFI_CFLAGS += -I $(HDF_WIFI_DIR)/hdm/wifi/bus/liteos \
+ -I $(HDF_WIFI_DIR)/hdm/wifi/bus \
+ -I $(HDF_WIFI_DIR)/hdm/wifi/net/liteos \
+ -I $(HDF_WIFI_DIR)/hdm/wifi/include \
+ -I $(HDF_WIFI_DIR)/hdm/wifi/message/include \
+ -I $(HDF_WIFI_DIR)/wifi/core/
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event.c
new file mode 100755
index 0000000000000000000000000000000000000000..6db734f2d4f79c2103a089505a6f3dc55d77606a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event.h
new file mode 100755
index 0000000000000000000000000000000000000000..2a9603ceda6a95aef61b0d974fe2c358d72894df
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event_sched.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event_sched.c
new file mode 100755
index 0000000000000000000000000000000000000000..54e184bca52f138fdaa02b3faec263443246e156
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event_sched.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event_sched.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event_sched.h
new file mode 100755
index 0000000000000000000000000000000000000000..955750b283778a4fd60e5dab86a397c77646c51c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_event_sched.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_main.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_main.c
new file mode 100755
index 0000000000000000000000000000000000000000..35d2ff11f618cbaf9efcb7a41ca91addcae878d1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_main.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_main.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_main.h
new file mode 100755
index 0000000000000000000000000000000000000000..a0fa209e01b10f772857b1c94b351efd355a2a13
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_main.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_task.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_task.c
new file mode 100755
index 0000000000000000000000000000000000000000..1808ab6824f7fb6b4ab2f44419eb1024c19f80b7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_task.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_task.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_task.h
new file mode 100755
index 0000000000000000000000000000000000000000..bfc408aeb1e29bf6063e2050c242ab305aee1798
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_task.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_timer.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_timer.c
new file mode 100755
index 0000000000000000000000000000000000000000..e36b4cded315174ce11623a7d49dc782033a28f5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_timer.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_timer.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_timer.h
new file mode 100755
index 0000000000000000000000000000000000000000..fdd7ca6316df372240e09e0ed95d44b647c1d12e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/frw/frw_timer.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_comm.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_comm.c
new file mode 100755
index 0000000000000000000000000000000000000000..3761d6bbb422f8d7ecc2fd70daa8975355c1d38d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_comm.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_comm.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_comm.h
new file mode 100755
index 0000000000000000000000000000000000000000..0590b58a2d96a1489f4a5e14f09a604ade86732c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_comm.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_hmac.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_hmac.c
new file mode 100755
index 0000000000000000000000000000000000000000..2f11a653441209bd59d77463a5ef6b0502933480
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_hmac.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_hmac_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_hmac_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..6010dc3a24debe42087f6d063a78fc9271b0150c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_hmac_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_host.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_host.c
new file mode 100755
index 0000000000000000000000000000000000000000..4614be767e186b75e258fb961289052c2da2d739
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_host.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_host.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_host.h
new file mode 100755
index 0000000000000000000000000000000000000000..3f27ac35feb952e6a84685f9a6b552f24620dfc0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_host.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_slave.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_slave.c
new file mode 100755
index 0000000000000000000000000000000000000000..d7a55d56d2815c3eb533024ce9df3e4d69a94f53
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_slave.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_slave.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_slave.h
new file mode 100755
index 0000000000000000000000000000000000000000..1d30a2e90c6317498814b4c8539971018a741e9f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_slave.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_task.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_task.c
new file mode 100755
index 0000000000000000000000000000000000000000..407c8545d4c4fe4debe80cb288dc54ae9dc438df
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_task.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_task.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_task.h
new file mode 100755
index 0000000000000000000000000000000000000000..ce1a251e2e58befd3a0c2460fc9662cb03fd1ed2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hcc_task.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hmac_hcc_adapt.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hmac_hcc_adapt.c
new file mode 100755
index 0000000000000000000000000000000000000000..ef5320533cc7bbfbcf4b9df66e3d1b723da14bc5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hmac_hcc_adapt.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hmac_hcc_adapt.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hmac_hcc_adapt.h
new file mode 100755
index 0000000000000000000000000000000000000000..3e563d81cb58cf59d9a42ca00c76aa569a80a60c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hcc/hmac_hcc_adapt.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/hdf_driver_register.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/hdf_driver_register.c
new file mode 100755
index 0000000000000000000000000000000000000000..6aa1b48bc93bbd9266273004c9ef716bbc76beea
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/hdf_driver_register.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/hdfinit_3881.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/hdfinit_3881.c
new file mode 100755
index 0000000000000000000000000000000000000000..b03a84924e820ac5299c11cb9446f9c58e160a9a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/hdfinit_3881.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/net_adpater.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/net_adpater.c
new file mode 100755
index 0000000000000000000000000000000000000000..d124b6ffe452e135bc940084e8a7335679a036bc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/net_adpater.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/net_adpater.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/net_adpater.h
new file mode 100755
index 0000000000000000000000000000000000000000..061fa437adbedf42a4b7b2e1c50c00c1f6de1041
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/hdfadapt/net_adpater.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_atomic.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_atomic.h
new file mode 100755
index 0000000000000000000000000000000000000000..a108a23ea746b330be239186731f539d73749627
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_atomic.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_config.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_config.h
new file mode 100755
index 0000000000000000000000000000000000000000..dd72c5c5a89cb81a22e5b43d8db44e60cf8a36b6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_config.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_errno.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_errno.h
new file mode 100755
index 0000000000000000000000000000000000000000..f40a8d43cb0847e5f92b7181cef307606c06b8f4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_errno.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_event.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_event.h
new file mode 100755
index 0000000000000000000000000000000000000000..2254b8d3aae143a646150309da2e3715d4186928
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_event.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_isr.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_isr.h
new file mode 100755
index 0000000000000000000000000000000000000000..74fcac0454e9ec4bc8cd5d1244607ffb77aa066b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_isr.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_list.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_list.h
new file mode 100755
index 0000000000000000000000000000000000000000..2be440ae06271227b8c31cacd35739eb50584d91
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_list.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_stdlib.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_stdlib.h
new file mode 100755
index 0000000000000000000000000000000000000000..89003a62f55d7518a4a685102bb347a15d51b7ea
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_stdlib.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_task.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_task.h
new file mode 100755
index 0000000000000000000000000000000000000000..f05ffbafb98ed9c4944ddd885ddb1b665d670e6d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_task.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_time.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_time.h
new file mode 100755
index 0000000000000000000000000000000000000000..22235057fcd04269e148784ffcbeac909ce6771f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_time.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_types.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_types.h
new file mode 100755
index 0000000000000000000000000000000000000000..cef9052a94fc30ef67590a03be0a00f1b0c63800
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_types.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_types_base.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_types_base.h
new file mode 100755
index 0000000000000000000000000000000000000000..4748a325bfc672d6637a582debec9ce984f7655a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_types_base.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_wifi_api.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_wifi_api.h
new file mode 100755
index 0000000000000000000000000000000000000000..5a9737673ddb51e51eff191e16ac5ae3665336e6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_wifi_api.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_wifi_csi_api.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_wifi_csi_api.h
new file mode 100755
index 0000000000000000000000000000000000000000..aba1fbab5511852ada22a2be7562f422fde0cee1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_wifi_csi_api.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_wifi_mfg_test_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_wifi_mfg_test_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..3ed919cd22532d20b7052a709182c3890a9ed43a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/include/hi_wifi_mfg_test_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/linuxkpi/include/linux/device.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/linuxkpi/include/linux/device.h
new file mode 100755
index 0000000000000000000000000000000000000000..05ab094b2c81022f8992ccdf3578559e7761c4b6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/linuxkpi/include/linux/device.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/linuxkpi/include/linux/platform_device.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/linuxkpi/include/linux/platform_device.h
new file mode 100755
index 0000000000000000000000000000000000000000..233564c0aaa17eac6fe517ad71be8f9ca40f4fe0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/linuxkpi/include/linux/platform_device.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/linuxkpi/include/linux/pm.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/linuxkpi/include/linux/pm.h
new file mode 100755
index 0000000000000000000000000000000000000000..e02c4bf77b9a99306362132193230c58e718a78a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/linuxkpi/include/linux/pm.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_cfg.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_cfg.h
new file mode 100755
index 0000000000000000000000000000000000000000..3e363c48636dc3fe7c8fc93d0b568ca64d34cea2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_cfg.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_data.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_data.c
new file mode 100755
index 0000000000000000000000000000000000000000..597c6d316e97c19c758a4175c705a3c12550d7ba
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_data.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_data.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_data.h
new file mode 100755
index 0000000000000000000000000000000000000000..5862d61599f6e2dc1d015bb1f7a9b9a2abcdf713
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_data.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_device.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_device.c
new file mode 100755
index 0000000000000000000000000000000000000000..61f47caf733b82f34f02b0599bed692df4a5fa26
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_device.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_device.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_device.h
new file mode 100755
index 0000000000000000000000000000000000000000..9f023389f21528646195370188bfa66e7a7cb55c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_device.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_frame.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_frame.c
new file mode 100755
index 0000000000000000000000000000000000000000..f23bc44b526397200137fad303e20a51a9ced81b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_frame.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_frame.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_frame.h
new file mode 100755
index 0000000000000000000000000000000000000000..dc1ed864491b3690a8f215899618b7d3a9df5076
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_frame.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_ie.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_ie.c
new file mode 100755
index 0000000000000000000000000000000000000000..7d862dc46a34a70e8811388d0403bb09be052a4b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_ie.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_ie.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_ie.h
new file mode 100755
index 0000000000000000000000000000000000000000..ced48e378bf592d103de049aed413fadc6524f6f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_ie.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_mib.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_mib.c
new file mode 100755
index 0000000000000000000000000000000000000000..a804ebe4f9e231d6068e455632e923a8b2ced4f3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_mib.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_mib.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_mib.h
new file mode 100755
index 0000000000000000000000000000000000000000..3e4f7d9030563663c3e50ad3a554010566cfdbfc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_mib.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_pm_driver.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_pm_driver.c
new file mode 100755
index 0000000000000000000000000000000000000000..937efeb0ee3d0dd7bf25dd8f6852745ae4b14ec7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_pm_driver.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_pm_driver.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_pm_driver.h
new file mode 100755
index 0000000000000000000000000000000000000000..9590b07cf3eeb5a506a702be2ef906af2ac87e1f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_pm_driver.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_regdomain.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_regdomain.c
new file mode 100755
index 0000000000000000000000000000000000000000..d2d84ad13e6e8d0e48ca89d1ec7488640f0f9781
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_regdomain.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_regdomain.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_regdomain.h
new file mode 100755
index 0000000000000000000000000000000000000000..626947bb47c2646baaf1df692e6feae3a6b7b92c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_regdomain.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_resource.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_resource.c
new file mode 100755
index 0000000000000000000000000000000000000000..2e37d516f61ef90c8f4b07f2ca8ec096f9b1b93b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_resource.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_resource.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_resource.h
new file mode 100755
index 0000000000000000000000000000000000000000..31bb0c6facc1f124ea9c3485dd1c2951e0ec2d59
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_resource.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_user.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_user.c
new file mode 100755
index 0000000000000000000000000000000000000000..21d3dc45afbece68932b4b61fb9394e080cabb61
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_user.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_user.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_user.h
new file mode 100755
index 0000000000000000000000000000000000000000..ac0b7c7eb7786f1582f466477cdffcab547d7e61
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_user.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_vap.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_vap.c
new file mode 100755
index 0000000000000000000000000000000000000000..e7af5353ec235193030ba88bb2a9d4a19eacf765
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_vap.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_vap.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_vap.h
new file mode 100755
index 0000000000000000000000000000000000000000..96a54facbcafa69eec931170f480a1d80472dcc8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/mac_vap.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/dmac_ext_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/dmac_ext_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..b433a4cc0f616cb5e460605d1b78393f2f215490
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/dmac_ext_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_11i.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_11i.c
new file mode 100755
index 0000000000000000000000000000000000000000..a3299350d2a7f357460dfccc0a345151937c5adb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_11i.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_11i.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_11i.h
new file mode 100755
index 0000000000000000000000000000000000000000..1143cb703c310b166927ae845dff344c8c4786be
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_11i.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_blockack.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_blockack.c
new file mode 100755
index 0000000000000000000000000000000000000000..81bf3e71512a21cfe4aeade7e853dc5dddb1ca05
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_blockack.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_blockack.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_blockack.h
new file mode 100755
index 0000000000000000000000000000000000000000..5900f734ccba620a2cfbca6cc9b007617d7cb254
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_blockack.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_cali_dpd.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_cali_dpd.c
new file mode 100755
index 0000000000000000000000000000000000000000..399795595786bad16f3d6d7cc02d8bea01f894f9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_cali_dpd.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_cali_dpd.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_cali_dpd.h
new file mode 100755
index 0000000000000000000000000000000000000000..e5cfd74aa0935c14ac7d6bff7e8aed8522dee956
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_cali_dpd.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_chan_mgmt.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_chan_mgmt.c
new file mode 100755
index 0000000000000000000000000000000000000000..6610e58c86daede2b0107f94b552dbeab98d39b5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_chan_mgmt.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_chan_mgmt.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_chan_mgmt.h
new file mode 100755
index 0000000000000000000000000000000000000000..3491b77e9718777546513ec53fc8f930ac09e3ab
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_chan_mgmt.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_config.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_config.c
new file mode 100755
index 0000000000000000000000000000000000000000..f731f0c2728c3943da5647fcaf7c3ecc8aeabfd6
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_config.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_config.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_config.h
new file mode 100755
index 0000000000000000000000000000000000000000..0f2c7dcdcb37c3c2fadc7169edda4e1886afb257
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_config.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_crypto_tkip.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_crypto_tkip.c
new file mode 100755
index 0000000000000000000000000000000000000000..b72fb2d3cb53399e2b4f80bbe5045a1abb4568ea
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_crypto_tkip.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_crypto_tkip.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_crypto_tkip.h
new file mode 100755
index 0000000000000000000000000000000000000000..fa1e22c33db481d1cc0f56f4c01b01cba977e98d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_crypto_tkip.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_device.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_device.c
new file mode 100755
index 0000000000000000000000000000000000000000..1dd33923f4489a7599cc141285f7b024712eabbd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_device.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_device.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_device.h
new file mode 100755
index 0000000000000000000000000000000000000000..b7fdfe34f752c35b1e218c99b9f36cc87e26b506
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_device.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_edca_opt.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_edca_opt.c
new file mode 100755
index 0000000000000000000000000000000000000000..1a4567644fcabc73a585196075462a15caba23e5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_edca_opt.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_edca_opt.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_edca_opt.h
new file mode 100755
index 0000000000000000000000000000000000000000..1f0c26802ea3ed9ec2c7855f960e2ef8b3fafe46
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_edca_opt.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame.c
new file mode 100755
index 0000000000000000000000000000000000000000..8634c6ae807da7e9ef91f0cd526a7c30884a39d0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame.h
new file mode 100755
index 0000000000000000000000000000000000000000..fc1a1aff6807eee8b27ec7ce80665c22f5e1276a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_ap.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_ap.c
new file mode 100755
index 0000000000000000000000000000000000000000..63718bf5656c95a2a626a2d024bfc923836989d0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_ap.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_ap.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_ap.h
new file mode 100755
index 0000000000000000000000000000000000000000..b448bddfcce7193ebca4aa5244d198ade05cc6ff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_ap.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_sta.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_sta.c
new file mode 100755
index 0000000000000000000000000000000000000000..1c08243f9398ff61cd8bbf13164bb35d4d58a5a4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_sta.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_sta.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_sta.h
new file mode 100755
index 0000000000000000000000000000000000000000..18165fb516b10e32e4806bf3304bdba1fdcc6eb1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_encap_frame_sta.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_event.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_event.c
new file mode 100755
index 0000000000000000000000000000000000000000..383be3e1ede67b387226bdd624e2170fc42f9a1b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_event.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_event.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_event.h
new file mode 100755
index 0000000000000000000000000000000000000000..673cc19a8a71022fd14ddd59c86f154d20de1411
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_event.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_ext_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_ext_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..4cd6763662ded69691edc4d4578ba7a025026086
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_ext_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_frag.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_frag.c
new file mode 100755
index 0000000000000000000000000000000000000000..f51be7d7891884ea1fbf79d304659e78965cea44
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_frag.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_frag.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_frag.h
new file mode 100755
index 0000000000000000000000000000000000000000..ef9f05a50f4249c934b964258ffc9f7439bfa96a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_frag.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_fsm.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_fsm.c
new file mode 100755
index 0000000000000000000000000000000000000000..0bb3650ff5d072a37030d0abc8b7f913e8990bb2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_fsm.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_fsm.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_fsm.h
new file mode 100755
index 0000000000000000000000000000000000000000..7dd5cfde78a38c5a3a340dfddacc2488b4fe8ac4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_fsm.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_main.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_main.c
new file mode 100755
index 0000000000000000000000000000000000000000..817c2bbbfc11b1d33e07424fae7f8376de7f306b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_main.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_main.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_main.h
new file mode 100755
index 0000000000000000000000000000000000000000..e81ba72e992cd267a1f57f05cfd54ab011ad8bc8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_main.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_ap.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_ap.c
new file mode 100755
index 0000000000000000000000000000000000000000..0c345ef95c3d4335f5470db4375460e0e4a7147c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_ap.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_ap.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_ap.h
new file mode 100755
index 0000000000000000000000000000000000000000..22a00b418248fe3633ef6c4711c3ba182af88f50
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_ap.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_bss_comm.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_bss_comm.c
new file mode 100755
index 0000000000000000000000000000000000000000..c41066e6ed796dee611d3efd2953459794caae47
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_bss_comm.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_bss_comm.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_bss_comm.h
new file mode 100755
index 0000000000000000000000000000000000000000..13f986825247d9d545862836d100c3747cf8486a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_bss_comm.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_classifier.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_classifier.c
new file mode 100755
index 0000000000000000000000000000000000000000..e514ab30ba93dcfeca7ca7d70f1fac1be2886917
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_classifier.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_classifier.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_classifier.h
new file mode 100755
index 0000000000000000000000000000000000000000..436e0461a6675af4397a5a4ea3b0836ae1918bb2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_classifier.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_sta.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_sta.c
new file mode 100755
index 0000000000000000000000000000000000000000..2e6244ce1850702314182adb0ab67f777847438c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_sta.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_sta.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_sta.h
new file mode 100755
index 0000000000000000000000000000000000000000..c0bcde966edb635353ca50485d343e131131b1ea
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_mgmt_sta.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_p2p.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_p2p.c
new file mode 100755
index 0000000000000000000000000000000000000000..172711de48fa6bed933eb40fb5e70f1565d56279
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_p2p.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_p2p.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_p2p.h
new file mode 100755
index 0000000000000000000000000000000000000000..bee4934a56ddb3943d2257d042e669335d7d5495
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_p2p.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_protection.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_protection.c
new file mode 100755
index 0000000000000000000000000000000000000000..045d1fe255eccc98871b0d52fcc4cb2eb179924a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_protection.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_protection.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_protection.h
new file mode 100755
index 0000000000000000000000000000000000000000..8836a71ff8e545294cee2be186c3325363d7824f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_protection.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_data.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_data.c
new file mode 100755
index 0000000000000000000000000000000000000000..2191b0b4f301ccb096b1e444ecbfb5534a74695d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_data.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_data.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_data.h
new file mode 100755
index 0000000000000000000000000000000000000000..b3bfeab450ff458527c827aedcc432a08e2d489d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_data.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_filter.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_filter.c
new file mode 100755
index 0000000000000000000000000000000000000000..d18723fb162d842a09817a70bdd0228f6d432235
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_filter.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_filter.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_filter.h
new file mode 100755
index 0000000000000000000000000000000000000000..db89114cfd1665e62623833eece894fce9e04cfa
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_rx_filter.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_scan.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_scan.c
new file mode 100755
index 0000000000000000000000000000000000000000..beb65faf909deb8042714d8305fce15796f9efab
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_scan.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_scan.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_scan.h
new file mode 100755
index 0000000000000000000000000000000000000000..be0a18bce6fcfc2df5de7ca61feceb61e4a27fde
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_scan.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_sme_sta.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_sme_sta.c
new file mode 100755
index 0000000000000000000000000000000000000000..cc781c928768a9bf43b88c4060f70ef95b4dfbbc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_sme_sta.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_sme_sta.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_sme_sta.h
new file mode 100755
index 0000000000000000000000000000000000000000..88fd9ca4eb2eb1a12fcc39b7b6fd2f7521ec303e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_sme_sta.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_traffic_classify.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_traffic_classify.c
new file mode 100755
index 0000000000000000000000000000000000000000..4287d897f81d50b5ac20510916daee8dd09a75b0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_traffic_classify.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_traffic_classify.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_traffic_classify.h
new file mode 100755
index 0000000000000000000000000000000000000000..a6605d527f91f6c95809e0f58fa77b091443b038
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_traffic_classify.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_tx_data.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_tx_data.c
new file mode 100755
index 0000000000000000000000000000000000000000..247c8eb53c580862df8e602dc02a477950d34ebd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_tx_data.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_tx_data.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_tx_data.h
new file mode 100755
index 0000000000000000000000000000000000000000..3208d5837abdbc8b33565b6d0937ecc542d111d2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_tx_data.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_uapsd.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_uapsd.c
new file mode 100755
index 0000000000000000000000000000000000000000..b113cc15fccafa04a18547fdc0700c90e0fb3982
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_uapsd.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_uapsd.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_uapsd.h
new file mode 100755
index 0000000000000000000000000000000000000000..14e8232ef456e59ad608d984fedea5439e6305ae
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_uapsd.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_user.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_user.c
new file mode 100755
index 0000000000000000000000000000000000000000..ed6721b16cad77cce3fad93e8a4ef9c5fddc5dda
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_user.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_user.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_user.h
new file mode 100755
index 0000000000000000000000000000000000000000..05a0069fd6cf3f03635b63ca70f564e68a701d68
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_user.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_vap.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_vap.c
new file mode 100755
index 0000000000000000000000000000000000000000..c1de54f779af07951e3ccd2dacb9379fce335b37
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_vap.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_vap.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_vap.h
new file mode 100755
index 0000000000000000000000000000000000000000..c8304a867c776294307a43164b1647331a50ee48
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_vap.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi.c
new file mode 100755
index 0000000000000000000000000000000000000000..d54809c57f4105486bf7f17b24884ca73ced77f2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi.h
new file mode 100755
index 0000000000000000000000000000000000000000..59251fb1217a2cc75bc99fd55381fa8572492a8f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_sms4.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_sms4.c
new file mode 100755
index 0000000000000000000000000000000000000000..de53e4f10e492c5dc188dcb5d78aff120b59f222
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_sms4.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_sms4.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_sms4.h
new file mode 100755
index 0000000000000000000000000000000000000000..1b02e25e4553d78794fcfe2e0727cfd57157a901
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_sms4.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_wpi.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_wpi.c
new file mode 100755
index 0000000000000000000000000000000000000000..6b44e1482664023c7874442c697a797dcabc54f9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_wpi.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_wpi.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_wpi.h
new file mode 100755
index 0000000000000000000000000000000000000000..716270d9cfb14bcef180ae7e859e37685a3a7005
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wapi_wpi.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wow.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wow.c
new file mode 100755
index 0000000000000000000000000000000000000000..b7a71918499570864a8a701e19f52f6545cf0787
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wow.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wow.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wow.h
new file mode 100755
index 0000000000000000000000000000000000000000..442b6de712af34f60f8d956e11f77676280ba7c1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/hmac_wow.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/exception_rst.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/exception_rst.c
new file mode 100755
index 0000000000000000000000000000000000000000..753d8e26916301ee645e2e5905d2ba58a2c3a4ce
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/exception_rst.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/exception_rst.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/exception_rst.h
new file mode 100755
index 0000000000000000000000000000000000000000..6872aa8efa26a2d209adc6d2d47ee55262bc0b17
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/exception_rst.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_event.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_event.c
new file mode 100755
index 0000000000000000000000000000000000000000..ec0eb6b9130e8b73f6efc6d2b51aad30fe811acf
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_event.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_isr.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_isr.c
new file mode 100755
index 0000000000000000000000000000000000000000..4a86eb9a7fdf2819331af308ffdfbe8cedf2ee70
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_isr.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_task.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_task.c
new file mode 100755
index 0000000000000000000000000000000000000000..53f3b66e89af0c6ac164002b324824ee456e1cc2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_task.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_time.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_time.c
new file mode 100755
index 0000000000000000000000000000000000000000..f21f243201e3838aaa771bbfd99cde504e8feeb3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/hi_time.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_atomic.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_atomic.h
new file mode 100755
index 0000000000000000000000000000000000000000..380dbfde946d6d6688899210a0a3e85a2316b018
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_atomic.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_cfg80211.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_cfg80211.c
new file mode 100755
index 0000000000000000000000000000000000000000..15f657e31eeef40e655934b65c9ec15179bcefc0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_cfg80211.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_cfg80211.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_cfg80211.h
new file mode 100755
index 0000000000000000000000000000000000000000..b63ed8499aaac326d68272894730ae898cafdcc5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_cfg80211.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_channel_host_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_channel_host_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..84b3295a9e9d595f028c48084fdb00881122f4f4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_channel_host_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_chr.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_chr.c
new file mode 100755
index 0000000000000000000000000000000000000000..aa249d6da4d62794d4fc909062202bc94c3936b2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_chr.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_chr.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_chr.h
new file mode 100755
index 0000000000000000000000000000000000000000..2406d397e10883800636fedb8925b66020dd0f23
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_chr.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_completion.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_completion.h
new file mode 100755
index 0000000000000000000000000000000000000000..dbf7ccd3ef21b06e7d1ad05c4f998d05a97bc686
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_completion.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_data_collect.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_data_collect.h
new file mode 100755
index 0000000000000000000000000000000000000000..9615849d53e03b06f4010d2deb666ae8e80058e1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_data_collect.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_err_wifi.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_err_wifi.h
new file mode 100755
index 0000000000000000000000000000000000000000..f52d7d0ccfc245290da4a621c5f96dd47c19df5a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_err_wifi.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_ext_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_ext_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..0d402b8686ca26f70098ef8da4684211e7ce25fb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_ext_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_file.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_file.h
new file mode 100755
index 0000000000000000000000000000000000000000..3ff42411378fd677837afc41b5842fdcce071691
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_file.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_interrupt.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_interrupt.h
new file mode 100755
index 0000000000000000000000000000000000000000..64c1375ad5e19d0b890d12c3ed428e883e5a93d9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_interrupt.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_kernel_file.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_kernel_file.c
new file mode 100755
index 0000000000000000000000000000000000000000..210dcaf29d8681034790b170c995c13fa79a6f37
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_kernel_file.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_kernel_file.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_kernel_file.h
new file mode 100755
index 0000000000000000000000000000000000000000..ee18de29f9dda7f6c307a8de62b9903e3c1524a5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_kernel_file.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_main.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_main.c
new file mode 100755
index 0000000000000000000000000000000000000000..0f90f6644149ca473c9c0448189166965dde9a89
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_main.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_main.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_main.h
new file mode 100755
index 0000000000000000000000000000000000000000..58781e9b36e1eb306a0c8108fb13e762956a7cf5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_main.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mem.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mem.c
new file mode 100755
index 0000000000000000000000000000000000000000..b2500db2d2630be33ab8e5efe366a5caf50bc76a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mem.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mem.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mem.h
new file mode 100755
index 0000000000000000000000000000000000000000..2fdc5ea0bb98a8e680020bb3e2109fffa1006a39
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mem.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mm.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mm.h
new file mode 100755
index 0000000000000000000000000000000000000000..a00e16087831ad70c1d01820d3881bb2b6c7eca5
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mm.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mutex.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mutex.h
new file mode 100755
index 0000000000000000000000000000000000000000..a5d902bd3f1cc9527b4e377cc4d53ca176a4ee1e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_mutex.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_net.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_net.c
new file mode 100755
index 0000000000000000000000000000000000000000..34fed83a45fc36cfce4b58c3acb718c0b022c086
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_net.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_net.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_net.h
new file mode 100755
index 0000000000000000000000000000000000000000..1bd86e933e9ed63802e4420791bccfc3d515d305
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_net.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_netbuf.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_netbuf.h
new file mode 100755
index 0000000000000000000000000000000000000000..14d092a79606e7956e99aeba6de6259fa80d14ff
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_netbuf.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_queue.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_queue.h
new file mode 100755
index 0000000000000000000000000000000000000000..330df96a6c87d8c1e29e2a46883b768dd190fced
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_queue.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_scatterlist.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_scatterlist.h
new file mode 100755
index 0000000000000000000000000000000000000000..2a20f4a6ae55432ee8a3b6e0f3be6fd32392d707
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_scatterlist.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_schedule.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_schedule.h
new file mode 100755
index 0000000000000000000000000000000000000000..862c8574371cc8377f5995b293ca1c641269d15f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_schedule.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio.h
new file mode 100755
index 0000000000000000000000000000000000000000..1e7281148537bb4b150c926924adbd9661beb4cd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_comm.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_comm.h
new file mode 100755
index 0000000000000000000000000000000000000000..219224d706c8d15f9905f8abd96af9f2d155a7cf
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_comm.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_host.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_host.c
new file mode 100755
index 0000000000000000000000000000000000000000..c2ad785541f48b1f7a00e9084d101678532bdffd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_host.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_host_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_host_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..dd814dedd3e686d543d90ba336b6c4981c766880
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_host_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..6497e21336aabcbcb98cdea80cbbbf1756ff49f4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_sdio_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_semaphore.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_semaphore.h
new file mode 100755
index 0000000000000000000000000000000000000000..366d67a7d7430ad9aa590d0073e349a937b74317
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_semaphore.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_shellcmd.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_shellcmd.c
new file mode 100755
index 0000000000000000000000000000000000000000..e86857be9f2b1e1ba32b4212bcc4aa1b70b0be36
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_shellcmd.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_spinlock.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_spinlock.h
new file mode 100755
index 0000000000000000000000000000000000000000..1b297e2bd8af8fab8ad11d0074ec3df0d0130d96
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_spinlock.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_task.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_task.h
new file mode 100755
index 0000000000000000000000000000000000000000..2dffae74dfc046358336e90120967cc2cd347071
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_task.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_thread.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_thread.h
new file mode 100755
index 0000000000000000000000000000000000000000..203f0301b80077e4198037bd978351f949cd14a0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_thread.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_time.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_time.h
new file mode 100755
index 0000000000000000000000000000000000000000..f68c1a5ba761cb3eb3c867e091c8995fbfbc3cc8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_time.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_timer.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_timer.h
new file mode 100755
index 0000000000000000000000000000000000000000..135efb300d5968743430bba16f20b8e0b1c4f2e4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_timer.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_util.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_util.c
new file mode 100755
index 0000000000000000000000000000000000000000..ba2c0a57b057fba8a3acdf3c4f3eb23cbb6f5e6d
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_util.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_util.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_util.h
new file mode 100755
index 0000000000000000000000000000000000000000..cf918a714f5ada5c8bd01346ba5ea7f7fd920263
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_util.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_wait.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_wait.h
new file mode 100755
index 0000000000000000000000000000000000000000..27bcda57141ac8ee7fdbfa0e5b219c114250bbe4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_wait.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_wakelock.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_wakelock.h
new file mode 100755
index 0000000000000000000000000000000000000000..c3211c7af4770b7ed20f688f0e222fe6383651e2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_wakelock.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_workqueue.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_workqueue.h
new file mode 100755
index 0000000000000000000000000000000000000000..d96c7fb9d1667bea5e99b36fb52b39e82d79c31e
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/oal_workqueue.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/os_sys.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/os_sys.c
new file mode 100755
index 0000000000000000000000000000000000000000..534421ba3bfe9c90e3c7cae813b85488ff969b6b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/os_sys.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_board_adapt.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_board_adapt.h
new file mode 100755
index 0000000000000000000000000000000000000000..bb9a3ea04d3bf34d55adbadca910f52e1ed3a01b
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_board_adapt.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_board_common_sdio.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_board_common_sdio.c
new file mode 100755
index 0000000000000000000000000000000000000000..3a2e7de702354da479bfac5bf38a82e10067b320
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_board_common_sdio.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_firmware.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_firmware.c
new file mode 100755
index 0000000000000000000000000000000000000000..2b518ec673e4a0d08f96ffad4164788142e181ec
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_firmware.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_firmware.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_firmware.h
new file mode 100755
index 0000000000000000000000000000000000000000..7f878950336e08b4bcec11cfdff086bfde0b94cb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_firmware.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm.c
new file mode 100755
index 0000000000000000000000000000000000000000..9e8a9b7f6ab8371853a40c6487dc7f27f9d66f54
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm.h
new file mode 100755
index 0000000000000000000000000000000000000000..e1819ec6a6c6c4ecbaa3a7e4bd81955b29192b55
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm_wlan.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm_wlan.c
new file mode 100755
index 0000000000000000000000000000000000000000..f4ab35daa9ee07ce69ab52215c0c00e6c62a60e7
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm_wlan.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm_wlan.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm_wlan.h
new file mode 100755
index 0000000000000000000000000000000000000000..42c60f21b70ed664818d7159a5b2ceb258018eb3
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_pm_wlan.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_rw.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_rw.h
new file mode 100755
index 0000000000000000000000000000000000000000..dd1d259260773c24507872cc93664a89c09ec346
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_rw.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_rw_mfg.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_rw_mfg.h
new file mode 100755
index 0000000000000000000000000000000000000000..7dc3935aca8b2cdaa1416abf1b0e8045707e606a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_rw_mfg.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_sdio.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_sdio.c
new file mode 100755
index 0000000000000000000000000000000000000000..52d4a1c7642edb923cca8dbb93bbf4ed4919efdd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_sdio.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_sdio.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_sdio.h
new file mode 100755
index 0000000000000000000000000000000000000000..4095e15f70f4953000806b739f6623b93d1df99a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_sdio.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_wifi_cfg.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_wifi_cfg.h
new file mode 100755
index 0000000000000000000000000000000000000000..7b471467ae01db1c8f7fc9b7b6b7a1eebcfc58bb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/plat_wifi_cfg.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/stack.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/stack.h
new file mode 100755
index 0000000000000000000000000000000000000000..98f6e957e72a2973b45163a39124e240ad6f9636
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/stack.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_mib.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_mib.h
new file mode 100755
index 0000000000000000000000000000000000000000..4a75fcdf02e918fc0f53626b45d21b9954a13b39
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_mib.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_spec.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_spec.h
new file mode 100755
index 0000000000000000000000000000000000000000..4607b437066adece5e274d47261e1332a0d51f12
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_spec.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_spec_1131h.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_spec_1131h.h
new file mode 100755
index 0000000000000000000000000000000000000000..3a778f9e7d80a182929ecd77a19c6268b8903738
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_spec_1131h.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_types.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_types.h
new file mode 100755
index 0000000000000000000000000000000000000000..c32b14784158b3b82f41d2497101a9470e619b47
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oal/wlan_types.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_ext_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_ext_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..717ca50eaff7ef000712cde2a43f2e1dfe40ad44
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_ext_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_log.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_log.c
new file mode 100755
index 0000000000000000000000000000000000000000..2e2d58d00f4b82466c9fc4c5a3930dd2dbbf3f4f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_log.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_log.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_log.h
new file mode 100755
index 0000000000000000000000000000000000000000..d55e9110e388c59a523f4700b3fa6306c82f0938
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_log.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_main.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_main.c
new file mode 100755
index 0000000000000000000000000000000000000000..861e07334e5e68292915670e66f4b931ba97b8df
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_main.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_main.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_main.h
new file mode 100755
index 0000000000000000000000000000000000000000..e53e6ee99208b9b67b7f96958d5480a6a6ed3dfd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/oam/oam_main.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/hi_wifi_driver_api.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/hi_wifi_driver_api.c
new file mode 100755
index 0000000000000000000000000000000000000000..41ba8c54ffe56f71ecdcccd7c26a8d0fc8e53b75
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/hi_wifi_driver_api.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/hi_wifi_driver_wpa_if.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/hi_wifi_driver_wpa_if.h
new file mode 100755
index 0000000000000000000000000000000000000000..af0f11fdf93364ebc5216894eaccd83be23304fe
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/hi_wifi_driver_wpa_if.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_11d.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_11d.c
new file mode 100755
index 0000000000000000000000000000000000000000..82853d0204c31ce8107b148d3d15614f9c512286
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_11d.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_11d.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_11d.h
new file mode 100755
index 0000000000000000000000000000000000000000..97c5aa8f117c09efd99e9c0906f3204d46ae92eb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_11d.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211.c
new file mode 100755
index 0000000000000000000000000000000000000000..d7b0b59039b0875c8d7f5f814c5f6c303d086430
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211.h
new file mode 100755
index 0000000000000000000000000000000000000000..691893a23e87bc57fdf65dee955a09a357c31ddc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211_apt.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211_apt.c
new file mode 100755
index 0000000000000000000000000000000000000000..a60b4b0d0f21bc7843b91f4b8907857a444bc671
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211_apt.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211_apt.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211_apt.h
new file mode 100755
index 0000000000000000000000000000000000000000..3ad27c32e4e3d50402ed040cb56fe30eb8ad76b1
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_cfg80211_apt.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_customize.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_customize.c
new file mode 100755
index 0000000000000000000000000000000000000000..95c8a8afe8eb5bd18b0a3f9a74be6e1a340ddefe
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_customize.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_customize.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_customize.h
new file mode 100755
index 0000000000000000000000000000000000000000..cbb20aa2a4125a142c396ae1616ab6c4318d3d97
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_customize.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event.c
new file mode 100755
index 0000000000000000000000000000000000000000..d7f0c6562a54923034428b713831cbddaff5a1ed
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event.h
new file mode 100755
index 0000000000000000000000000000000000000000..8fcf64ee9733cd4f47522f04fa826561f6bb9d10
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event_msg.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event_msg.c
new file mode 100755
index 0000000000000000000000000000000000000000..578f5804a78eaec0c85bf57475dec58f8c3ef91f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event_msg.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event_msg.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event_msg.h
new file mode 100755
index 0000000000000000000000000000000000000000..445acf2ef707c40a712efd5f1d2b5990832a3cc4
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_event_msg.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_hipriv.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_hipriv.c
new file mode 100755
index 0000000000000000000000000000000000000000..e7cb6f16fef10fff70a9578117403ab2c2e8e8c8
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_hipriv.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_hipriv.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_hipriv.h
new file mode 100755
index 0000000000000000000000000000000000000000..fa7d7448d8861efb8e48df622d92d7fd4f03ed9c
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_hipriv.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_ioctl.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_ioctl.c
new file mode 100755
index 0000000000000000000000000000000000000000..2ecc03f1f74ff50d44585354cf1b7a113d66450a
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_ioctl.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_ioctl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_ioctl.h
new file mode 100755
index 0000000000000000000000000000000000000000..4c158b6a74b9b2c9e32b407876b5311779b564ea
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_ioctl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_linux_flowctl.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_linux_flowctl.c
new file mode 100755
index 0000000000000000000000000000000000000000..fb77e3978dbfb1c7cce5fcd7ad4d657b062ace3f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_linux_flowctl.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_linux_flowctl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_linux_flowctl.h
new file mode 100755
index 0000000000000000000000000000000000000000..b1a39791d8896ebe2984d31cd69fbcf6647753fb
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_linux_flowctl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_mac80211.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_mac80211.c
new file mode 100755
index 0000000000000000000000000000000000000000..649355b843cee92f99c56ba37063ffed95a6078f
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_mac80211.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_main.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_main.c
new file mode 100755
index 0000000000000000000000000000000000000000..59fb985433907e35638de1bfeeb5775397c6ef10
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_main.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_main.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_main.h
new file mode 100755
index 0000000000000000000000000000000000000000..fc63cbca0ab3e8698d9189eab9c4a2fe507c04e2
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_main.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_maintenance.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_maintenance.c
new file mode 100755
index 0000000000000000000000000000000000000000..b763baa487242f9d1ce2044d50cd049f2beba885
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_maintenance.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_maintenance.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_maintenance.h
new file mode 100755
index 0000000000000000000000000000000000000000..023aadf6ebbd8dd20b8287999ec0efbd074a8ad9
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_maintenance.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_net.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_net.h
new file mode 100755
index 0000000000000000000000000000000000000000..b3495bab5344895631cbd5dca2178a9869a51b11
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_net.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_regdb.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_regdb.c
new file mode 100755
index 0000000000000000000000000000000000000000..a608a215fb365d3b02fd6b4135cc50514ed8f697
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_regdb.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_regdb.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_regdb.h
new file mode 100755
index 0000000000000000000000000000000000000000..1383441fa0f034d45031b789e3e3faa38e82e661
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_regdb.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_scan.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_scan.c
new file mode 100755
index 0000000000000000000000000000000000000000..99a81e1096f30d9d20337dc76e0bd19bbf00cec0
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_scan.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_scan.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_scan.h
new file mode 100755
index 0000000000000000000000000000000000000000..213f957131ed47807adb8430bb9cf8f2a6dba4cc
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_scan.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_wpa_ioctl.c b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_wpa_ioctl.c
new file mode 100755
index 0000000000000000000000000000000000000000..346dbba835fb8ad31c516d6e9c569946ae6872ae
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_wpa_ioctl.c differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_wpa_ioctl.h b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_wpa_ioctl.h
new file mode 100755
index 0000000000000000000000000000000000000000..7c3fe3a9d09370873308bcd9a7143008c2409bfd
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/wal/wal_wpa_ioctl.h differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/firmware/BUILD.gn b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/firmware/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..7ea921830a19eb9c9661483aef7e9fea699e5f1d
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/firmware/BUILD.gn
@@ -0,0 +1,47 @@
+# Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+if (defined(ohos_lite)) {
+ import("//build/lite/config/component/lite_component.gni")
+} else {
+ import("//build/ohos.gni")
+}
+
+if (defined(ohos_lite)) {
+ copy("wifi_firmware") {
+ sources = [ "../firmware" ]
+ outputs = [ "$root_out_dir/vendor/firmware/hi3881" ]
+ }
+} else {
+ ohos_prebuilt_etc("wifi_cfg") {
+ source = "wifi_cfg"
+ module_install_dir = "firmware/hi3881"
+ install_images = [ chipset_base_dir ]
+ part_name = "hisilicon_products"
+ }
+ ohos_prebuilt_etc("wifi_fw_bin") {
+ source = "hi3881_fw.bin"
+ module_install_dir = "firmware/hi3881"
+ install_images = [ chipset_base_dir ]
+ part_name = "hisilicon_products"
+ }
+ group("wifi_firmware") {
+ deps = [
+ ":wifi_cfg",
+ ":wifi_fw_bin",
+ ]
+ }
+}
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/firmware/hi3881_fw.bin b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/firmware/hi3881_fw.bin
new file mode 100755
index 0000000000000000000000000000000000000000..d3689995cd2299895eddad267ca2f10812cccf73
Binary files /dev/null and b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/firmware/hi3881_fw.bin differ
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/firmware/wifi_cfg b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/firmware/wifi_cfg
new file mode 100755
index 0000000000000000000000000000000000000000..4f3e6fe19e172739645a682e1237b4e418baaad5
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/common/platform/wifi/hi3881v100/firmware/wifi_cfg
@@ -0,0 +1,11 @@
+@WiFi patch info
+CFG_COUNTRY_CODE=CN;
+CFG_RSSI_OFFSET=0;
+CFG_MAC=00:00:00:00:00:00;
+CFG_DBB_PARAMS=0x6B6B6D6E,0x67676767,0x50545F60,0x565E5E5E,0x4F4F5656,0x00000000,0x01000000;
+CFG_FREQ_COMP=105,100,-30;
+CFG_CH_TXPWR_OFFSET=0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff;
+PARA_VERSION=Hi3881V100;
+ADDR_FILE_FILES=1,0xe4280,/vendor/firmware/hi3881/hi3881_fw.bin;
+PARA_CONFIG=0xe4280,4;
+QUIT;
\ No newline at end of file
diff --git a/os/OpenHarmony/khzg_patch/device/soc/hisilicon/ss928v100/NOTICE b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/ss928v100/NOTICE
new file mode 100755
index 0000000000000000000000000000000000000000..5bed24bfd8391e44e04f2697b92e73046b65ea4e
--- /dev/null
+++ b/os/OpenHarmony/khzg_patch/device/soc/hisilicon/ss928v100/NOTICE
@@ -0,0 +1,3002 @@
+OPEN SOURCE SOFTWARE NOTICE
+
+Please note we provide an open source software notice for the third party open source software along with this software and/or this software component (in the following just “this SOFTWARE”). The open source software licenses are granted by the respective right holders.
+
+Warranty Disclaimer
+THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
+
+Copyright Notice and License Texts
+
+
+
+Software: Das U-Boot 2020.01
+
+Copyright notice:
+Copyright (C) ARM Limited
+Copyright (C) 2000-2001 Deep Blue Solutions Ltd.
+Copyright 2015-2016 Freescale Semiconductor, Inc.
+Copyright 2017 NXP
+Copyright 2017-2018 NXP
+Copyright (C) 2018, STMicroelectronics - All Rights Reserved
+Copyright (C) 2019, STMicroelectronics - All Rights Reserved
+Copyright (C) 2015-2017, STMicroelectronics - All Rights Reserved
+Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
+(C) Copyright 2014 Andreas Bießmann
+(C) Copyright 2008 Semihalf
+Copyright (c) 2013, Google Inc.
+Copyright (c) 2017 Heinrich Schuchardt
+Copyright (C) 1993, 1996, 2001, 2002 Free Software Foundation, Inc.
+Copyright 2014 Google, Inc
+Copyright (C) 2011 The ChromiumOS Authors.
+COPYRIGHT (c) 2000 BY ABATRON AG
+Copyright 2018 NXP
+(C) Copyright 2013 Thomas Petazzoni
+(c) 2012 Daniel Stodden
+(C) Copyright 2015 DENX Software Engineering GmbH
+Copyright (c) 2014 Google, Inc
+Copyright 2008 Extreme Engineering Solutions, Inc.
+Copyright (c) 2005-2006 Gianluigi Tiesi
+Copyright (c) 2017 Imagination Technologies Ltd.
+(C) Copyright 2011 Free Electrons
+Copyright (C) 2012 Samsung Electronics
+Copyright (C) 2016 Marvell International Ltd.
+Copyright (C) 2018 MediaTek Inc.
+Copyright (C) 2011 Marek Vasut
+Copyright (C) 2012-2013 Marek Vasut
+Copyright (C) 2012 Marek Vasut
+Copyright 2009 Extreme Engineering Solutions, Inc.
+Copyright 2012-2014 Freescale Semiconductor, Inc.
+Copyright 2012 Freescale Semiconductor, Inc.
+Copyright (C) 2017 Andes Technology
+Copyright (c) 2013 Google, Inc
+Copyright 2013 Freescale Semiconductor, Inc.
+(C) Copyright 2015 Google, Inc
+(C) 2017 Theobroma Systems Design und Consulting GmbH
+(C) Copyright 2015 Google, Inc
+Copyright 2019 Google LLC
+Copyright (C) 2014 Charles Manning
+Copyright (c) 2019, Simon Goldschmidt
+Copyright © 2016 NextThing Co.
+Copyright © 2016 Free Electrons
+(C) Copyright 2016 DENX Software Engineering GmbH
+Copyright (C) 2015 Nathan Rossi
+Copyright (C) 2018 Alexander Graf
+Copyright (C) 2016 Michal Simek
+Copyright (C) 2019 Luca Ceresoli
+Copyright (C) 2018 Michal Simek
+Copyright (C) 2015 Beckhoff Automation GmbH
+Copyright (C) 2011 Freescale Semiconductor, Inc.
+Copyright (C) 2015 Beckhoff Automation GmbH & Co. KG
+Copyright (C) 2012 Freescale Semiconductor, Inc.
+Copyright (C) 2013 Ludovic Desroches
+Copyright (C) 2018 Álvaro Fernández Rojas
+Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com
+Copyright 2014 Maxime Ripard
+(C) Copyright 2011 Freescale Semiconductor, Inc.
+(C) Copyright 2009 Freescale Semiconductor, Inc.
+Copyright (C) 2017 Beckhoff Automation GmbH & Co. KG
+Copyright (C) 2016 Imagination Technologies
+Copyright (C) 1999-2015 Tensilica Inc.
+Copyright (C) 1999-2015 Cadence Design Systems Inc.
+(C) Copyright 2015 Texas Insturments
+(C) Copyright 2008 Texas Insturments
+Copyright (c) 2018 Heinrich Schuchardt
+Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
+Copyright (C) 2016 Chen-Yu Tsai
+Copyright (C) 2013 - ARM Ltd
+Copyright (C) 2014 STMicroelectronics All Rights Reserved
+(C) Copyright 2016 Beniamino Galvani
+(C) Copyright 2018 Neil Armstrong
+(C) Copyright 2019 Julien Masson
+(C) Copyright 2019 Neil Armstrong
+Copyright 2008 Freescale Semiconductor, Inc.
+Copyright 2004, 2007 Freescale Semiconductor, Inc.
+Copyright (C) Freescale Semiconductor, Inc. 2006-2007
+Copyright (C) 2015 Paul Kocialkowski
+Copyright (C) 2014 STMicroelectronics
+Copyright (C) 2017, STMicroelectronics - All Rights Reserved
+(C) Copyright 2009 Magnus Lilja
+(c) 2007 Pengutronix, Sascha Hauer
+Copyright 2013 Broadcom Corporation.
+Copyright 2014 Broadcom Corporation.
+Copyright (c) 2015 Samsung Electronics
+Copyright 2018 Google LLC
+Copyright (C) 2015 Google, Inc
+(C) 2018 Theobroma Systems Design und Consulting GmbH
+Copyright (C) 2019 Intel Corporation
+Copyright (C) 2018 Texas Instruments Incorporated
+Copyright (C) 2019 STMicroelectronics - All Rights Reserved
+Copyright (c) 2015 National Instruments
+Copyright (C) 2018 Xilinx, Inc.
+Copyright (C) 2013 Google, Inc
+Copyright (c) 2016, NVIDIA CORPORATION.
+(C) Copyright 2019 - Texas Instruments Incorporated - http://www.ti.com/
+Copyright (c) 2018 Google, Inc
+Copyright (C) 2019 Ramon Fried
+Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+Copyright (C) 2017 Google, Inc
+Copyright (c) 2018, STMicroelectronics
+Copyright (C) 2018 Ramon Fried
+(C) Copyright 2015 Mateusz Kulikowski
+Copyright (C) 2018 Linaro Limited
+Copyright (C) 2015 Thomas Chou
+Copyright (C) 2018, Bin Meng
+Copyright 2017 Google, Inc
+Copyright (C) 2012 Altera Corporation
+(c) Copyright 2015 Xilinx, Inc. All rights reserved.
+Copyright (C) 2010 Albert ARIBAUD
+Copyright (C) Marvell International Ltd. and its affiliates
+Copyright (C) 2006 Freescale Semiconductor, Inc.
+Copyright (C) 2007 Logic Product Development, Inc.
+Copyright (C) 2007 MontaVista Software, Inc.
+Copyright (C) 2015-2016 Wills Wang
+Copyright (C) 2001 Red Hat, Inc.
+Copyright 2014 Freescale Semiconductor
+Copyright 2014 Freescale Semiconductor, Inc.
+Copyright 2008-2014 Freescale Semiconductor, Inc.
+Copyright 2007-2014 Freescale Semiconductor, Inc.
+Copyright 2009-2013 Freescale Semiconductor, Inc.
+Copyright 2010-2011 Freescale Semiconductor, Inc.
+Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
+Copyright (c) 2000 MontaVista Software, Inc (source@mvista.com)
+Copyright (c) 2003 Motorola,Inc.
+Copyright 2004,2007-2011 Freescale Semiconductor, Inc.
+(C) Copyright 2002, 2003 Motorola Inc.
+Copyright 2007-2011 Freescale Semiconductor, Inc.
+(C) Copyright 2003 Motorola Inc.
+Copyright 2009-2012 Freescale Semiconductor, Inc
+Copyright (c) 2000 MontaVista Software, Inc. Dan Malek (dmalek@jlc.net)
+(C) Copyright 2000 Sysgo Real-Time Solutions, GmbH
+Copyright 2009-2011 Freescale Semiconductor, Inc.
+Copyright 2009-2010 Freescale Semiconductor, Inc.
+(C) Copyright 2003 Motorola Inc. (MPC85xx port)
+Copyright 2008-2011 Freescale Semiconductor, Inc.
+Copyright 2008,2010 Freescale Semiconductor, Inc.
+Copyright 2010 Freescale Semiconductor, Inc.
+Copyright 2011 Freescale Semiconductor, Inc.
+Copyright 2004 Freescale Semiconductor.
+Copyright (C) 2003 Motorola Inc.
+Copyright 2004, 2007-2011 Freescale Semiconductor, Inc.
+Copyright 2009 Freescale Semiconductor, Inc.
+Copyright 2007 Freescale Semiconductor.
+Copyright (C) 2003 Motorola
+Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
+Copyright (C) 2011 by Vladimir Zapolskiy
+Copyright (C) 2011-2015 Vladimir Zapolskiy
+Copyright (C) 2008 by NXP Semiconductors
+(C) Copyright 2014 DENX Software Engineering GmbH
+Copyright (C) 2011 Vladimir Zapolskiy
+Copyright (C) 2013 Texas Instruments, Inc.
+(C)Copyright 2016 Rockchip Electronics Co., Ltd
+Copyright (c) 1999-2002 Vojtech Pavlik
+Copyright (c) 2015 Hans de Goede
+Copyright (C) 2007,2010 Freescale Semiconductor, Inc.
+Copyright (C) 2006-2009 Freescale Semiconductor, Inc.
+(C) Copyright 2003, Psyent Corporation
+Copyright (C) 2009, Wind River Systems Inc
+Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2004,2005 Free Software Foundation, Inc.
+Copyright 2018 Google
+Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
+Copyright (c) 2018 Microsemi Corporation
+Copyright (c) 2019 Microsemi Corporation
+Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.
+(C) Copyright 2015 Stephen Warren
+(C) Copyright 2014 Suriyan Ramasami
+Copyright (C) 1999 Magnus Damm
+Copyright 2012 Stefan Roese
+Copyright (c) 2015 Andreas Bießmann
+Copyright (c) 2011 The Chromium OS Authors.
+Copyright (C) 2018 Stefan Roese
+Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
+Copyright (C) 2015 Simon Arlott
+Copyright (C) 2008 Maxime Bizon
+Copyright (C) 2000-2010 Broadcom Corporation
+Copyright (C) 2010 Broadcom Corporation
+Copyright (C) 2015 - 2018 Texas Instruments Incorporated
+Copyright 2004,2007,2008 Freescale Semiconductor, Inc.
+Copyright (c) 2015 Tyco Fire Protection Products.
+Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
+Copyright (c) 2005-2008 Analog Devices Inc.
+Copyright (C) 2010 Thomas Chou
+Copyright 2017 Andes Technology, Inc.
+Copyright (C) 2015 Atmel Corporation
+Copyright (C) 2018 Cryptera A/S
+Copyright (C) 2007 Atmel Corporation
+Copyright (C) 2017 Álvaro Fernández Rojas
+Copyright (C) 2012-2013 Jonas Gorski
+Copyright (C) 2009-2012 Florian Fainelli
+Copyright (C) 2010 Tanguy Bouzeloc
+(C) Copyright 2018 Cisco Systems, Inc.
+Copyright (C) 2004-2009 Freescale Semiconductor, Inc.
+Copyright (C) 2018 Angelo Dureghello
+Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+Copyright (C) 2014 Stefan Roese
+Copyright (c) 2009, Intel Corporation.
+(C) Copyright 2012 SAMSUNG Electronics
+Copyright (C) 2004-2009, 2015 Freescale Semiconductor, Inc.
+Copyright 2013-2015 Freescale Semiconductor, Inc.
+Copyright 2013-2014 Freescale Semiconductor, Inc.
+Copyright (c) 2011-12 The Chromium OS Authors.
+Copyright (C) 2014 Beniamino Galvani
+Copyright (C) 2018 BayLibre, SAS
+Copyright (c) 2006 Ben Warren, Qstreams Networks Inc.
+Copyright (c) 2001 Navin Boppuri / Prashant Patel
+Copyright (c) 2001 Gerd Mennchen
+Copyright (c) 2001 Wolfgang Denk, DENX Software Engineering, .
+Copyright (C) 2011 Sergiy
+Copyright (C) 2011-2013 Gabor Juhos
+Copyright (C) 2014-2015 Felix Fietkau
+Copyright (C) 2019 MediaTek Inc. All Rights Reserved.
+Copyright (C) 2015 Marvell International Ltd.
+Copyright (C) 2016 Stefan Roese
+Copyright (C) 2008, Guennadi Liakhovetski
+Copyright (C) 2019 DENX Software Engineering
+Copyright (C) 2016 Jagan Teki
+Copyright (C) 2010 Dirk Behme
+Copyright (C) 2005, 2006 Nokia Corporation
+Copyright (c) 2015, Microchip Technology Inc.
+Copyright (C) 2018 Marek Vasut
+(C) 2019 Theobroma Systems Design und Consulting GmbH
+(C) Copyright 2008-2013 Rockchip Electronics
+Copyright (c) 2011-2013 The Chromium OS Authors.
+Copyright (C) 2013 Renesas Electronics Corporation
+Copyright (C) 2013 Nobuhiro Iwamatsu
+Copyright (C) 2011-2012 Renesas Solutions Corp.
+Copyright (C) 2011 Renesas Solutions Corp.
+Copyright (C) 2018 Exceet Electronics GmbH
+Copyright (C) 2018 Bootlin
+Copyright 2018 SiFive, Inc.
+Copyright 2019 Bhargav Shah
+(C) Copyright 2017 Whitebox Systems / Northend Systems B.V.
+(C) Copyright 2017 Olimex Ltd..
+Copyright (C) 2012 - 2014 Allwinner Tech
+Copyright (C) 2014 Maxime Ripard
+Copyright (c) 2010-2013 NVIDIA Corporation
+(C) Copyright 2015 NVIDIA Corporation
+(C) Copyright 2014 Google, Inc
+Copyright (C) 2013, Texas Instruments, Incorporated
+Copyright 2019 Socionext, Inc.
+Copyright (c) 2015 Jagan Teki
+Copyright (c) 2012 Stephan Linz
+Copyright (c) 2010 Graeme Smecher
+Copyright (c) 2010 Thomas Chou
+(C) Copyright 2018 Xilinx
+(C) Copyright 2013 Xilinx, Inc.
+(C) Copyright 2015 Jagan Teki
+Copyright 2007,2009-2011 Freescale Semiconductor, Inc.
+Copyright (C) 2008 Advanced Micro Devices, Inc.
+Copyright (C) 2009 coresystems GmbH
+Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
+Copyright (C) 2004-2008, 2012 Freescale Semiconductor, Inc.
+(C) Copyright 2004-2008, 2012 Freescale Semiconductor, Inc.
+Copyright (C) 2015, Bin Meng
+(C) Copyright 2016 Google, Inc
+(C) Copyright 2019 Rockchip Electronics Co., Ltd
+Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+(c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
+Copyright (C) 2017 Jagan Teki
+Copyright (C) 2015 Hans de Goede
+Copyright (C) 2014 Roman Byshko
+Copyright (C) 2014 Google, Inc
+(C) Copyright 2016 Savoir-faire Linux Inc.
+(C) Copyright 2011 Andes Technology Corp
+(C) Copyright 2019 Vasily Khoruzhick
+Copyright (C) 2016, Imagination Technologies Ltd.
+Copyright (C) 2019,STMicroelectronics - All Rights Reserved
+Copyright (C) 2012-2013 Texas Instruments, Inc.
+Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
+Copyright (c) 2008 Eric Jarrige
+Copyright (c) 2009 Ilya Yanok
+Copyright (c) 2019 Linaro Limited
+Copyright (c) 2019 Heinrich Schuchardt
+(C) Copyright 2018 Simon Goldschmidt
+Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+Copyright (C) 2018-2019 Xilinx, Inc.
+Copyright 2010-2012 Freescale Semiconductor, Inc.
+Copyright (C) 2012 rockchips
+Copyright (C) 2019 ROHM Semiconductors
+Copyright (C) 2015 Samsung Electronics
+(C) Copyright 2016 Texas Instruments Incorporated,
+Copyright (C) 2012-2015 Samsung Electronics
+Copyright (C) 2016 Rockchip Electronics Co., Ltd
+Copyright (C) 2014 - STMicroelectronics Inc.
+Copyright (C) 2014-2015 Samsung Electronics
+Copyright (C) 2019 Disruptive Technologies Research AS
+Copyright (C) 2018 Samsung Electronics
+Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
+Copyright (c) 2015 Google, Inc
+Copyright (C) EETS GmbH, 2017, Felix Brack
+Copyright (c) Marc A. Viredaz, 1998
+Copyright 2018-2019 NXP
+Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
+Copyright (C) 2017, Grinn - http://grinn-global.com/
+Copyright (C) 2016, Texas Instruments, Incorporated - http://www.ti.com/
+Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
+Copyright (C) 2013, Adeneo Embedded
+Copyright (C) 2009, Texas Instruments, Incorporated
+Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+Copyright 2017 Texas Instruments, Inc.
+(C) Copyright 2017 Linaro Ltd.
+Copyright (C) 2017, Konsulko Group
+Copyright (c) 2019 Western Digital Corporation or its affiliates.
+Copyright (C) 2017 Impinj
+Copyright (C) 2018 Pengutronix, Lucas Stach
+Copyright (c) 2019 BayLibre, SAS
+Copyright (C) 2016 Glider bvba
+Copyright (C) 2016 Cogent Embedded Inc.
+Copyright (C) 2018 Jacopo Mondi
+Copyright (C) 2017 Cogent Embedded Inc.
+Copyright (C) 2018 Renesas Electronics Corp.
+Copyright (C) 2018 Cogent Embedded, Inc.
+Copyright (C) 2017 Glider bvba
+Copyright © 2015 Broadcom
+Copyright (c) 2015-2016, NVIDIA CORPORATION.
+Copyright 2016 Timesys Corporation
+Copyright 2016 Advantech Corporation
+Copyright 2015 Timesys Corporation.
+Copyright 2015 General Electric Company
+(C) Copyright 2011-2012
+Copyright 2019 Toradex
+Copyright (C) 2014 Renesas Electronics Corporation
+(C) Copyright 2007 - 2013 Tensilica Inc.
+(C) Copyright 2014 - 2016 Cadence Design Systems Inc.
+Copyright (C) 2018 Marek Behun
+Copyright (C) 2013 Boundary Devices
+Copyright (C) 2013-2017, ISEE 2007 SL - http://www.isee.biz/
+Copyright (C) 2013, ISEE 2007 SL - http://www.isee.biz/
+Copyright (C) 2015 Sakari Ailus
+Copyright (C) 2018 Marvell International Ltd.
+Copyright 2013-2016 Freescale Semiconductor, Inc.
+Copyright (C) 2014 Freescale Semiconductor
+Copyright (c) 2017 Amlogic, Inc. All rights reserved.
+Copyright (c) 2018 Amlogic, Inc. All rights reserved.
+Copyright (C) 2016 Endless Mobile, Inc.
+Copyright (C) 2017 Socionext Inc.
+Copyright (c) 2014, Steffen Trumtrar
+Copyright (C) 2016-2018 Intel Corporation. All rights reserved
+Copyright (C) 2016 Altera Corporation. All rights reserved
+Copyright (c) 2018 Baylibre SAS.
+Copyright (c) 2016 BayLibre, SAS.
+Copyright (c) 2017 Amlogic, inc.
+Copyright (c) 2019 BayLibre, SAS.
+Copyright (c) 2016 BayLibre, SAS
+Copyright (c) 2018 Amlogic, inc.
+Copyright (C) Broadcom Corporation
+Copyright (C) 2017 Impinj, Inc.
+Copyright (C) 2018 Zodiac Inflight Innovations
+Copyright (C) 2019 MediaTek Inc.
+Copyright (C) STMicroelectronics 2018 - All Rights Reserved
+Copyright (C) 2017 Priit Laes
+Copyright (C) 2016 Maxime Ripard
+Copyright (C) 2017 Icenowy Zheng
+Copyright (C) 2016 Icenowy Zheng
+Copyright 2016 Maxime Ripard
+Copyright (C) 2016 Chen-Yu Tsai
+Copyright (C) 2017 Chen-Yu Tsai
+Copyright (C) 2016 Icenowy Zheng
+Copyright (c) 2015, NVIDIA CORPORATION.
+Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
+Copyright (C) 2018, EETS GmbH, http://www.eets.ch/
+Copyright (C) 2018 EETS GmbH - http://www.eets.ch/
+Copyright (c) 2013 Imagination Technologies
+Copyright (c) 2006-2013 Ingenic Semiconductor
+Copyright (C) 2013 Marek Vasut
+(C) Copyright 2019 Matthias Brugger
+Copyright (C) 2012 Vikram Narayananan
+(C) Copyright 2012,2015 Stephen Warren
+Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
+Copyright (C) Jasbir Matharu
+Copyright (C) UDOO Team
+Copyright (C) 2017 Microchip
+Copyright (C) 2016 Andes Technology Corporation
+Copyright 2016 Google Inc.
+Copyright (C) 2015 Broadcom Corporation
+Copyright (c) 2014 Samsung Electronics Co., Ltd.
+Copyright (c) 2016-2017 Linaro Ltd.
+Copyright (c) 2016-2017 HiSilicon Technologies Co., Ltd.
+Copyright (c) 2015 Hisilicon Limited.
+Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
+Copyright 2013 Lucas Stach, Pengutronix
+Copyright (C) 2016 Freescale Semiconductor, Inc.
+Copyright (C) 2014 Freescale Semiconductor, Inc.
+Copyright (C) 2015 Freescale Semiconductor, Inc.
+Copyright 2016 Freescale Semiconductor, Inc.
+(c) 2015 Purna Chandra Mandal
+Copyright (c) 2018 BayLibre, SAS
+Copyright (c) 2018 MediaTek Inc.
+Copyright (c) 2019 MediaTek Inc.
+Copyright (c) 2017 Rockchip Electronics Co. Ltd.
+Copyright (C) 2014 Renesas Solutions Corp.
+Copyright (C) 2014 Wolfram Sang, Sang Engineering
+Copyright 2013 Ideas On Board SPRL
+Copyright (C) 2015 Renesas Electronics Corp.
+Copyright (C) 2016 Cogent Embedded, Inc.
+Copyright (C) 2014 Renesas Electronics Corporation
+Copyright (C) 2016 Renesas Electronics Corp.
+Copyright (C) 2017 Cogent Embedded, Inc.
+Copyright (c) 2014 MundoReader S.L.
+(C) Copyright 2017 Rockchip Electronics Co., Ltd
+(C) Copyright 2017 Rockchip Electronics Co., Ltd.
+Copyright (c) 2019 Rockchip Electronics Co. Ltd.
+(C) Copyright 2016 Rockchip Electronics Co., Ltd
+Copyright (c) 2015 Heiko Stuebner
+Copyright (c) 2016 Rockchip Electronics Co. Ltd.
+Copyright (C) 2015 Actions Semi Co., Ltd.
+Copyright (C) 2018 Manivannan Sadhasivam
+Copyright (C) 2018-2019 SiFive, Inc.
+Copyright (C) 2017 Synopsys
+Copyright (C) 2016 STMicroelectronics
+Copyright 2015 Maxime Ripard
+Copyright (c) 2017 Icenowy Zheng
+Copyright (c) 2016 Icenowy Zheng
+Copyright (C) 2018 Jernej Skrabec
+Copyright (C) 2014-2018 Xilinx, Inc.
+Copyright (C) 2015-2016 Marvell International Ltd.
+Copyright (C) 2015 Stefan Roese
+(C) Copyright 2014 - 2018 Xilinx, Inc.
+Copyright (C) 2010-2013 Freescale Semiconductor, Inc.
+Copyright (C) 2013, Boundary Devices
+Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD
+Copyright (C) 2015 Stefan Wahren
+Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+Copyright (c) 2015 Linaro Limited.
+Copyright (C) 2018 Texas Instruments
+Copyright (C) 2009 Nokia
+Copyright (C) 2009-2010 Texas Instruments
+(C) Copyright 2018 Ramon Fried
+Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
+Copyright (c) 2013 MundoReader S.L.
+Copyright (C) STMicroelectronics 2017 - All Rights Reserved
+Copyright (C) 2019 Jagan Teki
+(C) Copyright 2017 Theobroma Systems Design und Consulting GmbH
+Copyright (c) 2013 The Chromium OS Authors.
+Copyright (C) 2014 STMicroelectronics -- All Rights Reserved
+Copyright (C) 2017 Stefano Babic
+Copyright 2009-2014 Freescale Semiconductor, Inc.
+(C) Copyright 2014 Freescale Semiconductor, Inc.
+(C) Copyright 2014 Angelo Dureghello
+Copyright (c) 2016 Rockchip Electronics Co., Ltd
+Copyright (C) 2011 Andes Technology Corporation
+(C) Copyright 2009 Faraday Technology
+(c) Copyright 2016 Topic Embedded Products.
+(c) 2009 Ilya Yanok, Emcraft Systems
+Copyright (C) 2012 Philippe Reynes
+(C) Copyright 2009 Samsung Electronics
+(C) Copyright 2009 SAMSUNG Electronics
+Copyright (c) 2009 Samsung Electronics
+Copyright (C) 2009 Samsung Electronics
+(C) Copyright 2010 Samsung Electronics
+Copyright (C) 2009 Samsung Electrnoics
+Copyright (C) 2011 Samsung Electronics
+Copyright (C) 2019 Philippe Reynes
+Copyright (c) 2018 BayLibre, SAS.
+Copyright (C) 2016 BayLibre, SAS
+Copyright (C) 2015 Amlogic, Inc. All rights reserved.
+(C) Copyright 2013-2014 Luc Verhaegen
+(C) Copyright 2014-2015 Hans de Goede
+(C) Copyright 2017 Icenowy Zheng
+Copyright (C) 2012 Ilya Yanok
+(C) Copyright 2011, Ilya Yanok, Emcraft Systems
+Copyright 2019 NXP
+Copyright (C) 1996-2000 Russell King
+Copyright (c) 1996 Russell King.
+Copyright (C) 2016 ARM Ltd.
+Original copyright in armv7.h was:
+(C) Copyright 2010 Texas Instruments, Aneesh V
+Copyright 1995, Russell King.
+(C) Copyright 2017 NVIDIA Corporation
+Copyright (C) 2012 ARM Ltd.
+Copyright (C) 1994-2002 Russell King
+Copyright (C) 2003-2012 ARM Ltd.
+Copyright (C) 2014 ARM Ltd.
+Copyright (C) 2007 Sergey Kubushyn
+Copyright (C) 2006 Texas Instruments.
+Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com
+Copyright (C) 2009-2010 Texas Instruments, Inc.
+Copyright 2015 Freescale Semiconductor, Inc.
+Copyright (C) 1996 Russell King
+Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD
+Copyright (C) 2000-2002 Russell King
+Copyright (c) 2009 Wind River Systems, Inc.
+Copyright (C) 2003-2005 Nokia Corporation
+Copyright (C) 2012, Ilya Yanok
+Copyright (C) 2012 ARM Limited
+Copyright (C) 2012 Linaro Limited
+Copyright (C) 1996-1998 Russell King.
+Copyright (C) 1995-2002 Russell King
+Copyright (c) 2012 The Chromium OS Authors.
+(C) Copyright 2016 Alexander Graf
+Copyright (C) 1997-1999 Russell King
+Copyright (C) 2008 ARM Limited
+Copyright (c) 2017 Google, Inc
+Copyright (c) 2016 Google, Inc
+Copyright (C) 1999-2010 Tensilica Inc.
+Copyright (c) 2017 Intel Corporation
+(C) Copyright 2018 Theobroma Systems Design und Consulting GmbH
+Copyright (c) 2017 General Electric Company. All rights reserved.
+(C) Copyright 2016 Linaro
+Copyright (C) 2014, Barco (www.barco.com)
+Copyright (C) 2014 Gateworks Corporation
+Copyright (C) 2018 Armadeus Systems
+Copyright (c) 2012 Michael Walle
+Copyright 2015 Timesys Corporation
+Copyright (C) 2019 BayLibre, SAS
+Copyright (C) 2013, Intel Corporation
+Copyright (C) 2014, Bin Meng
+Copyright 2007-2008 Freescale Semiconductor, Inc.
+Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
+Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
+Copyright (C) 2012-2017 Marek Vasut
+Copyright (C) 2014-2017 Olaf Mandel
+Copyright (C) 2010 Freescale Semiconductor, Inc.
+Copyright (C) 2010 Ilya Yanok, Emcraft Systems, yanok@emcraft.com
+Copyright (C) 2007 Freescale Semiconductor, Inc.
+(C) Copyright 2017 CompuLab, Ltd. http://www.compulab.com
+Copyright (C) 2015-2016 Freescale Semiconductor, Inc.
+Copyright 2018 Linaro
+Copyright 2006, 2008-2009, 2011 Freescale Semiconductor
+Copyright (C) 2018 Synopsys
+Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. All rights reserved.
+Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
+Copyright (C) 2004, 2007-2010, 2011-2015 Synopsys, Inc. All rights reserved.
+Copyright (C) 2015 Synopsys, Inc. All rights reserved.
+Copyright (C) 2014 Synopsys, Inc. All rights reserved.
+Copyright 2002 by Kai Germaschewski
+Copyright abandoned, Michael Chastain, .
+Copyright 2017 General Electric Company
+Copyright 2016 General Electric Company
+Copyright (C) 2017 Renesas Electronics
+Copyright (C) Chris Brandt
+Copyright (C) 2013 Google Inc.
+Copyright (C) 2016 Bin Meng
+Copyright (C) 2016, Bin Meng
+Copyright (C) 2008 Jean-Christophe PLAGNIOL-VILLARD
+Copyright (C) 2008 Renaud CERRATO r.cerrato@til-technologies.fr
+Copyright (C) 2007 Miguel Gaio
+Copyright (C) 2008 Florian Fainelli
+Copyright (C) 2013 Altera Corporation
+(c) Copyright 2004 Faraday Technology Corp. (www.faraday-tech.com)
+Copyright 2017 CS Systemes d'Information
+Copyright (C) 2011 Gabor Juhos
+Copyright (C) 2013 John Crispin
+(c) Copyright 2000 Oleg Drokin
+Copyright (c) 2004 Texas Instruments.
+Copyright (c) 2005 David Brownell
+Copyright (c) 2011-2018 Xilinx Inc.
+Copyright (C) 2003 Ralf Baechle
+Copyright (C) 2003, 2004 Ralf Baechle
+Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle
+Copyright (C) 2000, 2002 Maciej W. Rozycki
+Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
+Copyright (C) 2015 - 2016 Xilinx, Inc.
+Copyright (C) 2017 National Instruments Corp
+Copyright (c) 2017 Andy Yan
+Copyright (C) 2011-2015 by Vladimir Zapolskiy
+Copyright 2019 NXP Semiconductors
+Copyright 2016-2018 NXP
+Copyright 2015, Freescale Semiconductor
+Copyright 2014-2015, Freescale Semiconductor
+Copyright 2015 Freescale Semiconductor
+Copyright 2017-2019 NXP
+Copyright 2016 NXP Semiconductor, Inc.
+Copyright 2014-2015, Freescale Semiconductor, Inc.
+Copyright 2017 NXP Semiconductor, Inc.
+Copyright 2015-2018 NXP
+Copyright (C) 2016 Amarula Solutions B.V.
+Copyright (C) 2016 Engicam S.r.l.
+Copyright (C) 2016 Masahiro Yamada
+Copyright 2004, 2011 Freescale Semiconductor.
+(C) Copyright 2002 Scott McNutt
+Copyright (C) 2018 Marek Vasut
+Copyright (C) 2017 Marek Vasut
+Copyright (C) 2013 Ideas On Board SPRL
+Copyright (C) 2015-2017 Glider bvba
+Copyright (C) 2015 Glider bvba
+Copyright (C) 2017-2018 Marek Vasut
+Copyright (C) 2015-2016 Glider bvba
+Copyright (c) 2015-2018 National Instruments
+Copyright (c) 2015-2018 Joe Hershberger
+Copyright (c) 2011-2012 The Chromium OS Authors.
+Copyright (C) 2017, Bin Meng
+Copyright (C) Freescale Semiconductor, Inc. 2006.
+Copyright (C) 2017 The Android Open Source Project
+Copyright (C) 2008 The Android Open Source Project
+Copyright (C) 2007 The Android Open Source Project
+(C) Copyright 2007-2008 Semihalf
+copyright (c) 2013-2016, ARM Limited and Contributors. All rights
+Copyright (C) 2016-2017 Rockchip Electronic Co.,Ltd
+Copyright (C) 2012 Atmel Corporation
+Copyright (C) 2005-2006 Atmel Corporation
+Copyright (C) 2014 Josh Datko, Cryptotronix, jbd@cryptotronix.com
+2016 Tomas Hlavacek, CZ.NIC, tmshlvck@gmail.com
+2017 Marek Behun, CZ.NIC, marek.behun@nic.cz
+(C) Copyright 2018, Linaro Limited
+(C) Copyright 2012 Henrik Nordstrom
+(C) Copyright 2013 Oliver Schinagl
+(C) Copyright 2016 Chen-Yu Tsai
+(C) Copyright 2015 Vishnu Patekar
+(C) Copyright 2015 Hans de Goede
+Copyright (C) 1996-1999 SciTech Software, Inc.
+Copyright 2018 Google, Inc
+Copyright (C) 2017 Texas Instruments
+Copyright (C) 1996-2002 Julian R Seward. All rights reserved.
+Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+Copyright (c) 2017 Rob Clark
+Copyright (c) 2009 Analog Devices Inc.
+Copyright 2014 Red Hat, Inc.
+Copyright 2012 Texas Instruments
+Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
+Copyright(c) 2009 Dialog Semiconductor Ltd.
+Copyright 2014 Google Inc.
+Copyright (C) 2003 Bernardo Innocenti
+Copyright (C) 2006-2015 Nicolas Pitre
+Copyright (C) 2013 Texas Instruments
+Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
+Copyright 2014 Rockchip Inc.
+(C) Copyright 2017 Jernej Skrabec
+Copyright 2003 Motorola,Inc.
+Copyright (c) 2018 The Chromium OS Authors. All rights reserved.
+Copyright (C) Nalin Dahyabhai
+(C) Copyright 2009-2016 CompuLab, Ltd.
+Copyright (C) 1999 VA Linux Systems
+Copyright (C) 1999 Walt Drummond
+Copyright (C) 1999, 2002-2003 Hewlett-Packard Co.
+Copyright (c) 2017 Heinrich Schuchardt
+Copyright (c) 2016 Alexander Graf
+Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com
+Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
+Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com
+(C) Copyright 2001 Sysgo Real-Time Solutions, GmbH
+Copyright (C) 2014 Samsung Electronics
+Copyright (c) 2018, Heinrich Schuchardt
+(C) Copyright 2011 - 2012 Samsung Electronics
+Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com
+Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+Copyright 2011 Sebastian Andrzej Siewior
+Copyright 2014 Linaro, Ltd.
+Copyright 2015 Free Electrons.
+Copyright (C) 2008 Freescale Semiconductor, Inc.
+Copyright 2009-2012 Freescale Semiconductor, Inc.
+Copyright 2008-2016 Freescale Semiconductor, Inc.
+Copyright 2017-2018 NXP Semiconductor
+Copyright 2007, 2011 Freescale Semiconductor, Inc.
+Copyright (C) 2004-2007, 2015 Freescale Semiconductor, Inc.
+Copyright 2013 - 2015 Freescale Semiconductor, Inc.
+Copyright 2007-2008,2010-2011 Freescale Semiconductor, Inc
+Copyright 2009-2012, 2013 Freescale Semiconductor, Inc.
+(C) Copyright 2015 Freescale Semiconductor, Inc.
+Copyright (C) 2018 Intel Corporation
+(C) Copyright 2009-2013 ADVANSEE
+Copyright 2008 Silicon Turnkey Express, Inc.
+Copyright (C) 2000, 2004, 2005 MIPS Technologies, Inc.
+Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
+Copyright (C) 2018 Synopsys, Inc. All rights reserved.
+Copyright 2019 Heinrich Schuchardt
+Copyright (c) 2009 MontaVista Software, Inc.
+Copyright (c) 2012 Samsung Electronics
+Copyright (C) 2009 Sergey Kubushyn
+Copyright (C) 2009 - 2013 Heiko Schocher
+(C) 2000 by Paolo Scaffardi (arsenio@tin.it)
+(C) Copyright 2002 ELTEC Elektronik AG
+(C) Copyright 2018 Linaro Ltd.
+Copyright 2016 Freescale Semiconductors, Inc.
+(C) Copyright 2014 Freescale Semiconductor, Inc
+Copyright (C) 1997-2001, 2004, 2007 Free Software Foundation, Inc.
+Copyright (c) 2014 Google, Inc.
+(C) Copyright 2005-2010 Freescale Semiconductor, Inc.
+Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/
+Copyright 2003-2004 Red Hat, Inc. All rights reserved.
+Copyright 2003-2004 Jeff Garzik
+(C) Copyright 2012 Samsung Electronics
+Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu)
+Copyright (C) 1996,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+Copyright (C) 2001 Peter Bergner, IBM Corp.
+Copyright (C) 2004 by FS Forth-Systeme GmbH.
+(C) Copyright 2012 Freescale Semiconductor, Inc.
+Copyright (C) 2009 Marc Kleine-Budde
+Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved.
+Copyright (C) 2009, Guennadi Liakhovetski
+Copyright (c) 1992 Simon Glass
+Copyright 2010-2011 Calxeda, Inc.
+(C) Copyright 2009 Industrie Dial Face S.p.A.
+Copyright (C) 2010 Guennadi Liakhovetski
+Copyright (C) 2006 Nokia Corporation
+Copyright (C) 2012-2013, Samsung Electronics, Co., Ltd.
+Copyright (C) 2018 STMicroelectronics - All Rights Reserved
+Copyright 2008,2010 Freescale Semiconductor, Inc
+Copyright (C) 2004-2007, 2010 Freescale Semiconductor, Inc.
+Copyright 2004, 2007 Freescale Semiconductor.
+Copyright(c) 2003 Motorola Inc.
+Copyright 2006 Freescale Semiconductor.
+Copyright (C) 2013 Imagination Technologies
+Copyright (C) 2018 Toradex
+Copyright 1994 - 2000 Neil Russell.
+(C) 2009 by Detlev Zundel, DENX Software Engineering GmbH
+(c) Rob Taylor, Flying Pig Systems. 2000.
+(C) 2005 Wind River Systems
+Copyright (C) 2017 NXP Semiconductors
+Copyright (C) 2017 Bin Meng
+Copyright (C) 2005-2007 Samsung Electronics
+(C) Copyright 2012-2013
+Copyright (C) 2008 RuggedCom, Inc.
+Copyright 2009 CJSC "NII STT", http://www.niistt.ru/
+Copyright (C) 2013 Gabor Juhos
+Copyright (c) 2018 Toradex, Inc.
+Copyright 2015 Stephen Warren
+Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+Copyright (c) 2011 samsung electronics
+(C) Copyright 2015 Miao Yan
+(C) Copyright 2008-2014 Rockchip Electronics
+Copyright 2000-2002 by Hans Reiser, licensing governed by reiserfs/README
+Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+(C) Copyright 2003 Sysgo Real-Time Solutions, AG
+Copyright (c) 2013, Henrik Nordstrom
+Copyright (c) 2012, Google Inc.
+Copyright (c) 2013, Compulab Inc.
+Copyright 2011, Marvell Semiconductor Inc.
+Copyright (C) 2017 Toradex
+Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+Copyright (C) 2010-2013 Wolfgang Denk
+Copyright (C) 2015 Renesas Electronics Corporation
+Copyright (c) 2008 Magnus Damm
+Copyright 2009, Matthias Fuchs
+Copyright (c) 2004-2005 Sergey Lyubka
+Copyright (c) 2018 Ramon Fried
+Copyright (C) 2010 The Android Open Source Project
+Copyright (C) 2003 Arabella Software Ltd.
+Copyright (C) 2008 Atmel Corporation
+Copyright (C) 2013 Jagannadha Sutradharudu Teki, Xilinx Inc.
+Copyright (C) STMicroelectronics SA 2017
+Copyright 2013 Texas Instruments, Inc.
+Copyright (c) 2018 Linaro Limited
+Copyright (C) 2013 Samsung Electronics
+Copyright (c) 2014 Texas Instruments Incorporated - http://www.ti.com
+Copyright (c) 2012 Samsung Electronics Co., Ltd.
+Coypright (c) 2013 Guntermann & Drunck GmbH
+Copyright (c) 2018 Bootlin
+Copyright 2004, 2007, 2009, 2011, 2013 Freescale Semiconductor, Inc.
+(C) Copyright 2003, Motorola, Inc.
+(C) Copyright 2009 Reinhard Arlt, reinhard.arlt@esd-electronics.com
+(C) Copyright 2003 Stefan Roese, stefan.roese@esd-electronics.com
+Copyright (C) 2007-2009 Texas Instruments, Inc.
+Copyright (C) 2006-2008 Nokia Corporation
+(C) Copyright 2008-2009
+Copyright (c) Thomas Gleixner
+(C) Copyright 2010 - 2011 NVIDIA Corporation
+Copyright (c) 2000, 2001, 2002 Lineo
+Copyright (c) 2001 Hewlett Packard
+Copyright (C) 2011 Samsung Electrnoics
+Copyright (c) 2004, 2008 IBM Corporation
+Copyright (c) 2009 Pattrick Hueper
+(C) Copyright 2019 Xilinx, Inc,
+Siva Durga Prasad Paladugu
+(C) Copyright 1997-2002 ELTEC Elektronik AG
+Copyright (C) 2018, Tuomas Tynkkynen
+Copyright 2008 Freescale Semiconductor, Inc. This file is licensed
+Copyright 2013, 2015 Freescale Semiconductor, Inc.
+Copyright (c) 2015 Free Electrons
+Copyright (c) 2015 NextThing Co
+Copyright (c) 2018 Microchip Technology, Inc.
+(C) Copyright 2015 Xilinx, Inc,
+Michal Simek
+(C) Copyright 2012-2013, Xilinx, Michal Simek
+Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
+(C) Copyright 2010,2011 NVIDIA Corporation
+Copyright (C) 2014 Sage Electronics Engineering, LLC.
+Copyright (C) 2018 Marek Vasut
+(C) Copyright 2014, Cavium Inc.
+Copyright (C) 2018 Amarula Solutions.
+Copyright (C) 2018 Amarula Solutions B.V.
+Copyright (C) 2002 Roman Zippel
+Copyright (C) 2002-2003 Romain Lievin
+Copyright (c) 2009-2010 Wind River Systems, Inc.
+Copyright 2011 Linaro
+Copyright (C) 2008 Nir Tzachar
+Copyright (C) 2002-2005 Roman Zippel
+Copyright (C) 2002-2005 Sam Ravnborg
+Copyright (C) 2017 Intel Corporation
+Copyright Altera Corporation (C) 2014-2015
+Copyright (C) 2016-2018 Intel Corporation
+Copyright (C) 2017-2018 Intel Corporation
+Copyright Altera Corporation (C) 2012-2015
+Copyright (C) 2016 Google, Inc
+Copyright (C) Nelson Integration, LLC 2016
+Copyright (C) 2013 Henrik Nordstrom
+Copyright (c) 2018 Microsemi Coprporation
+Copyright (C) 2015 Phil Sutter
+Copyright (C) 2015 Phil Sutter
+Copyright (C) 1999-2007 Tensilica Inc.
+Copyright (C) 2011 Simon Guinot
+Copyright (C) 2012 Renesas Solutions Corp.
+(C) Copyright 2015 Savoir-faire Linux Inc.
+(C) Copyright 2007-2018 Michal Simek
+(C) Copyright 2007 Michal Simek
+Copyright (C) 2008-2009 Samsung Electronics
+Copyright (C) 2014-2019, Toradex AG
+Copyright (C) 2014-2016, Toradex AG
+Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries
+Copyright (C) 2012 Stefan Roese
+Copyright 2007,2009 Wind River Systems, Inc.
+Copyright 2007 Embedded Specialties, Inc.
+Copyright (C) 2015, Intel Corporation
+Copyright (C) 2016 Nelson Integration, LLC
+(C) Copyright 2013 Atmel Corporation
+Copyright (C) 2005 David Brownell
+Copyright (C) 2005 Ivan Kokshaysky
+Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries
+Copyright (C) 2011 The Chromium OS Authors. All rights reserved.
+Copyright (C) 2008-2009 coresystems GmbH
+Copyright (C) 2012 The Chromium OS Authors. All rights reserved.
+Copyright (c) 2011, Google Inc.
+Copyright (C) 2007-2008 coresystems GmbH
+Copyright (C) 2011 Google Inc.
+Copyright 2004-2006,2010 Freescale Semiconductor, Inc. All Rights Reserved.
+Copyright (C) 2008 by Sascha Hauer
+Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH,
+(C) Copyright 2009-2010 Freescale Semiconductor, Inc.
+Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com
+Copyright 2008,2011 Freescale Semiconductor, Inc.
+Copyright 2008,2010-2011 Freescale Semiconductor, Inc.
+Copyright 2006, 2007, 2010-2011 Freescale Semiconductor.
+Copyright (c) 2010 Texas Instruments Incorporated
+Copyright (C) 2005 Texas Instruments.
+(c) 2011 Comelit Group SpA, Luca Ceresoli
+Copyright 2000 Roland Borde
+Copyright 2000 Paolo Scaffardi
+Copyright 2000-2002 Wolfgang Denk, wd@denx.de
+Copyright 1994, 1995, 2000 Neil Russell.
+Copyright 2000-2004 Wolfgang Denk, wd@denx.de
+Copyright (c) 2001 Charles Mott
+Copyright (c) 2008 coresystems GmbH
+Copyright (c) 2008 Pieter Voorthuijsen
+Copyright (c) 2009 Robin Getz
+(C) Masami Komiya 2005
+Copyright 2009, Robin Getz
+Copyright (C) 2016 The Android Open Source Project
+Copyright (C) 2003 by Arthur van Hoff (avh@strangeberry.com)
+Copyright (C) 2004 by David Brownell
+Copyright (C) 2010 by Joe Hershberger
+(C) Masami Komiya 2004
+Copyright 2019 Ramon Fried
+Copyright 2000, 2001 DENX Software Engineering, Wolfgang Denk, wd@denx.de
+Copyright 2011 Comelit Group SpA,
+Luca Ceresoli
+Copyright 2018 Lothar Felten, lothar.felten@gmail.com
+(C) Copyright 2016 Vladimir Zapolskiy
+(C) Copyright 2007 Nobuhiro Iwamatsu
+Copyright (C) 2013 Lothar Waßmann
+Copyright 2014 - 2015 Freescale Semiconductor, Inc.
+Copyright (C) 2017 NXP
+Copyright 2017 - 2018 NXP
+© 2001-2006 Red Hat, Inc.
+(C) Copyright 2018-2019 Rockchip Electronics Co., Ltd
+(C) Copyright 2016 Heiko Stuebner
+(C) Copyright 2017-2019 Rockchip Electronics Co., Ltd
+Copyright 2016 Rockchip Electronics Co., Ltd
+(C) Copyright 2009 Atin Malaviya (atin.malaviya@gmail.com)
+Copyright (C) 2004-2007 Texas Instruments
+Copyright (C) 2008 Nokia Corporation
+Copyright 2015-2019 Toradex, Inc.
+Copyright 2017 Toradex AG
+Copyright 2014 Toradex, Inc.
+Copyright (C) 2004 by Thomas Rathbone
+Copyright (C) 2005 by HP Labs
+Copyright (C) 2005 by David Brownell
+Copyright (C) 2004 by Thomas Rathbone, HP Labs
+Copyright (C) 2005 by Ivan Kokshaysky
+Copyright (C) 2006 by SAN People
+Copyright (C) 2005-2013 Atmel Corporation
+Copyright 2015 Broadcom Corporation.
+Copyright (C) 2006-2008 David Brownell
+Copyright (C) 2003 David Brownell
+Copyright (C) 2008 for Samsung Electronics
+Copyright (C) 2005 for Samsung Electronics
+Copyright (C) 2004 Herbert Poetzl