diff --git a/OAT.xml b/OAT.xml
index 5fb9254e2d0a97af528dee72e1978858a58ee784..c1182cf7adb4bfed56eec5dd91f180a8a31f967e 100644
--- a/OAT.xml
+++ b/OAT.xml
@@ -59,6 +59,11 @@
+
+
+
+
+
diff --git a/riscv64_virt/BUILD.gn b/riscv64_virt/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..8ec701bfee451c6aec354a961dc9071a16d70713
--- /dev/null
+++ b/riscv64_virt/BUILD.gn
@@ -0,0 +1,31 @@
+# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
+# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other materials
+# provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be used
+# to endorse or promote products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+group("riscv64_virt") {
+}
diff --git a/riscv64_virt/README_zh.md b/riscv64_virt/README_zh.md
new file mode 100755
index 0000000000000000000000000000000000000000..74ec639b3260171bdef0d74b9917012c15eb39bf
--- /dev/null
+++ b/riscv64_virt/README_zh.md
@@ -0,0 +1,36 @@
+# Qemu RISCV-64 Virt 标准系统教程
+
+## 简介
+
+`riscv64_virt/linux` 子目录包含部分Qemu RISCV-64虚拟化平台验证的Linux kernel的适配代码,含驱动配置、板端配置等。
+
+RISCV-64 虚拟化平台是一个 `qemu-system-riscv64` 的目标设备,通过它来模拟一个通用的、基于RISCV-64架构的单板。
+
+
+提示: 系统内存硬编码为2048MB。
+
+## 环境搭建
+
+参考链接: [环境搭建](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/device-dev/quick-start/quickstart-standard.md)
+
+## 源码构建
+
+在已经获取的源码根目录,请输入:
+
+```
+./build.sh --product-name qemu-riscv64-linux-min
+```
+
+在构建完成之后,对应的镜像文件在out/qemu-riscv64-linux/packages/phone/images/目录下。
+qemu-riscv64-linux-min表示部件最小集合的产品。
+
+## 运行镜像
+
+如果没有安装 `qemu-system-riscv64` ,安装请参考链接 [Qemu installation](https://gitee.com/openharmony/device_qemu/blob/HEAD/README_zh.md)
+
+提示:当前引入的功能在virt-5.1的目标machine已经完成测试,不保证所有的Qemu版本都能够运行成功,因此需要保证你的qemu-system-riscv64
+版本尽可能在5.1及以上。
+
+## 退出qemu环境
+
+先按组合键`Ctrl+a` 再单按`x`键,可退出qemu虚拟环境。
diff --git a/riscv64_virt/linux/BUILD.gn b/riscv64_virt/linux/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..c13bcd1b6a408aaf2e15b8ec27d6216322d200a2
--- /dev/null
+++ b/riscv64_virt/linux/BUILD.gn
@@ -0,0 +1,36 @@
+# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
+# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other materials
+# provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be used
+# to endorse or promote products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+group("qemu-riscv64-linux-group") {
+ deps = [
+ "//device/qemu/riscv64_virt/linux/chipset:chipset_files",
+ "//device/qemu/riscv64_virt/linux/images:all_image_conf",
+ "//device/qemu/riscv64_virt/linux/rootfs:rootfs_files",
+ ]
+}
diff --git a/riscv64_virt/linux/chipset/BUILD.gn b/riscv64_virt/linux/chipset/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..ca2b1a46b536cb05193b0b14d99d5441497c4e32
--- /dev/null
+++ b/riscv64_virt/linux/chipset/BUILD.gn
@@ -0,0 +1,27 @@
+# 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/ohos.gni")
+
+ohos_prebuilt_etc("fstab.qemu.riscv64.linux") {
+ source = "etc/fstab.qemu.riscv64.linux"
+ module_install_dir = "etc"
+ part_name = "qemu_riscv64_linux_chipset"
+ install_images = [ chipset_base_dir ]
+}
+
+group("chipset_files") {
+ deps = [
+ ":fstab.qemu.riscv64.linux",
+ "//kernel/linux/build:linux_kernel",
+ ]
+}
diff --git a/riscv64_virt/linux/chipset/etc/fstab.qemu.riscv64.linux b/riscv64_virt/linux/chipset/etc/fstab.qemu.riscv64.linux
new file mode 100755
index 0000000000000000000000000000000000000000..f0743f180f87caf4fe3cf4291ce05f4f966a3bc2
--- /dev/null
+++ b/riscv64_virt/linux/chipset/etc/fstab.qemu.riscv64.linux
@@ -0,0 +1,6 @@
+# fstab file.
+#
+/dev/block/vdb /usr ext4 ro,barrier=1 wait,required
+/dev/block/vdc /vendor ext4 ro,barrier=1 wait,required
+/dev/block/vdd /data ext4 nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc wait,reservedsize=104857600
+/dev/block/vda /misc none none wait
diff --git a/riscv64_virt/linux/chipset/etc/fstab.updater b/riscv64_virt/linux/chipset/etc/fstab.updater
new file mode 100755
index 0000000000000000000000000000000000000000..24386a19fb2953b3c27c2077d5dcee7c49f92374
--- /dev/null
+++ b/riscv64_virt/linux/chipset/etc/fstab.updater
@@ -0,0 +1,6 @@
+#
+/dev/block/platform/soc/10100000.himci.eMMC/by-name/system /system ext4 ro,barrier=1 wait
+/dev/block/platform/soc/10100000.himci.eMMC/by-name/vendor /vendor ext4 ro,barrier=1 wait
+/dev/block/platform/soc/10100000.himci.eMMC/by-name/userdata /data ext4 nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc wait,reservedsize=104857600
+/dev/block/platform/soc/10100000.himci.eMMC/by-name/misc /misc none none wait
+/dev/block/platform/soc/100f0000.himci.SD/mmcblk1p1 /sdcard ext4 rw wait
diff --git a/riscv64_virt/linux/images/BUILD.gn b/riscv64_virt/linux/images/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..0653db5cb008fedcb27441a90b10c10f58c760ff
--- /dev/null
+++ b/riscv64_virt/linux/images/BUILD.gn
@@ -0,0 +1,23 @@
+# 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/ohos.gni")
+
+ohos_copy("all_image_conf") {
+ sources = [
+ "system_image_conf.txt",
+ "updater_image_conf.txt",
+ "userdata_image_conf.txt",
+ "vendor_image_conf.txt",
+ ]
+ outputs = [ "${product_output_dir}/imagesconf/{{source_file_part}}" ]
+}
diff --git a/riscv64_virt/linux/images/system_image_conf.txt b/riscv64_virt/linux/images/system_image_conf.txt
new file mode 100755
index 0000000000000000000000000000000000000000..b92a4898da92416b8b5f7056fbd268ae3ee4fa77
--- /dev/null
+++ b/riscv64_virt/linux/images/system_image_conf.txt
@@ -0,0 +1,32 @@
+ # Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
+ # Copyright (c) 2020-2022 Huawei Device Co., Ltd. All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without modification,
+ # are permitted provided that the following conditions are met:
+ #
+ # 1. Redistributions of source code must retain the above copyright notice, this list of
+ # conditions and the following disclaimer.
+ #
+ # 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ # of conditions and the following disclaimer in the documentation and/or other materials
+ # provided with the distribution.
+ #
+ # 3. Neither the name of the copyright holder nor the names of its contributors may be used
+ # to endorse or promote products derived from this software without specific prior written
+ # permission.
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+/
+1572864000
+--fs_type=ext4
+--dac_config ../../build/ohos/images/mkimage/dac.txt
diff --git a/riscv64_virt/linux/images/updater_image_conf.txt b/riscv64_virt/linux/images/updater_image_conf.txt
new file mode 100755
index 0000000000000000000000000000000000000000..3c4ff5f8f59a905a16324a7e7f32c5983e2a9e31
--- /dev/null
+++ b/riscv64_virt/linux/images/updater_image_conf.txt
@@ -0,0 +1,5 @@
+/updater
+67108864
+--fs_type=ext4
+--dac_config ../../build/ohos/images/mkimage/dac.txt
+--file_context obj/base/security/selinux_adapter/file_contexts.bin
diff --git a/riscv64_virt/linux/images/userdata_image_conf.txt b/riscv64_virt/linux/images/userdata_image_conf.txt
new file mode 100755
index 0000000000000000000000000000000000000000..9aa0d45756eaaaf7eefeb0802ad68e030bfc5d59
--- /dev/null
+++ b/riscv64_virt/linux/images/userdata_image_conf.txt
@@ -0,0 +1,33 @@
+ # Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
+ # Copyright (c) 2020-2022 Huawei Device Co., Ltd. All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without modification,
+ # are permitted provided that the following conditions are met:
+ #
+ # 1. Redistributions of source code must retain the above copyright notice, this list of
+ # conditions and the following disclaimer.
+ #
+ # 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ # of conditions and the following disclaimer in the documentation and/or other materials
+ # provided with the distribution.
+ #
+ # 3. Neither the name of the copyright holder nor the names of its contributors may be used
+ # to endorse or promote products derived from this software without specific prior written
+ # permission.
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/data
+1572864000
+--fs_type=ext4
+--dac_config ../../build/ohos/images/mkimage/dac.txt
diff --git a/riscv64_virt/linux/images/vendor_image_conf.txt b/riscv64_virt/linux/images/vendor_image_conf.txt
new file mode 100755
index 0000000000000000000000000000000000000000..832e81339c56e841ea85f69646cb925baa000c59
--- /dev/null
+++ b/riscv64_virt/linux/images/vendor_image_conf.txt
@@ -0,0 +1,33 @@
+ # Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
+ # Copyright (c) 2020-2022 Huawei Device Co., Ltd. All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without modification,
+ # are permitted provided that the following conditions are met:
+ #
+ # 1. Redistributions of source code must retain the above copyright notice, this list of
+ # conditions and the following disclaimer.
+ #
+ # 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ # of conditions and the following disclaimer in the documentation and/or other materials
+ # provided with the distribution.
+ #
+ # 3. Neither the name of the copyright holder nor the names of its contributors may be used
+ # to endorse or promote products derived from this software without specific prior written
+ # permission.
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/vendor
+536870912
+--fs_type=ext4
+--dac_config ../../build/ohos/images/mkimage/dac.txt
diff --git a/riscv64_virt/linux/ohos.build b/riscv64_virt/linux/ohos.build
new file mode 100755
index 0000000000000000000000000000000000000000..cd1a6161a95ab58251f3fac4032c46c128d3c3cd
--- /dev/null
+++ b/riscv64_virt/linux/ohos.build
@@ -0,0 +1,10 @@
+{
+ "subsystem": "device_riscv64_virt",
+ "parts": {
+ "qemu_riscv64_linux_chipset": {
+ "module_list": [
+ "//device/qemu/riscv64_virt/linux:qemu-riscv64-linux-group"
+ ]
+ }
+ }
+}
diff --git a/riscv64_virt/linux/rootfs/BUILD.gn b/riscv64_virt/linux/rootfs/BUILD.gn
new file mode 100755
index 0000000000000000000000000000000000000000..de99f6b544a0c9af3da6f922cf154ceeceb2f10a
--- /dev/null
+++ b/riscv64_virt/linux/rootfs/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("//base/startup/init/services/etc/param/param_fixer.gni")
+import("//build/ohos.gni")
+
+ohos_prebuilt_etc("qemu.riscv64.linux.init.cfg") {
+ source = "init.qemu.riscv64.linux.cfg"
+ if (!enable_ramdisk) {
+ install_images = [ "system" ]
+ } else {
+ install_images = [ chipset_base_dir ]
+ }
+ part_name = "qemu_riscv64_linux_chipset"
+}
+
+ohos_prebuilt_etc("qemu.riscv64.linux.usb.cfg") {
+ source = "init.qemu.riscv64.linux.usb.cfg"
+ if (!enable_ramdisk) {
+ install_images = [ "system" ]
+ } else {
+ install_images = [ chipset_base_dir ]
+ }
+ part_name = "qemu_riscv64_linux_chipset"
+}
+
+ohos_prebuilt_etc("qemu.riscv64.linux.updater.cfg") {
+ source = "qemu.riscv64.linux.updater.cfg"
+ install_images = [ "updater" ]
+ part_name = "qemu_riscv64_linux_chipset"
+}
+
+ohos_prebuilt_para("default_param") {
+ source = "default.para"
+ install_images = [ chipset_base_dir ]
+ module_install_dir = "etc/param"
+ part_name = "qemu_riscv64_linux_chipset"
+}
+
+group("rootfs_files") {
+ deps = [
+ ":default_param",
+ ":qemu.riscv64.linux.init.cfg",
+ ":qemu.riscv64.linux.updater.cfg",
+ ":qemu.riscv64.linux.usb.cfg",
+ ]
+}
diff --git a/riscv64_virt/linux/rootfs/default.para b/riscv64_virt/linux/rootfs/default.para
new file mode 100755
index 0000000000000000000000000000000000000000..cb7544f0e446db02eb9dd3fc034b25f24c84cf79
--- /dev/null
+++ b/riscv64_virt/linux/rootfs/default.para
@@ -0,0 +1,16 @@
+# 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.
+
+persist.hdc.mode=tcp
+persist.hdc.port=5555
+
diff --git a/riscv64_virt/linux/rootfs/init.qemu.riscv64.linux.cfg b/riscv64_virt/linux/rootfs/init.qemu.riscv64.linux.cfg
new file mode 100755
index 0000000000000000000000000000000000000000..e4bbe9a2a2c6f6b5cbaa11c8d8abbb9937344a9f
--- /dev/null
+++ b/riscv64_virt/linux/rootfs/init.qemu.riscv64.linux.cfg
@@ -0,0 +1,28 @@
+{
+ "import" : [
+ "init.qemu.riscv64.linux.usb.cfg"
+ ],
+ "jobs" : [{
+ "name" : "pre-init",
+ "cmds" : [
+ "write /proc/sys/vm/min_free_kbytes 10240"
+ ]
+ }, {
+ "name" : "init",
+ "cmds" : [
+ "mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755"
+ ]
+ }, {
+ "name" : "fs",
+ "cmds" : [
+ ]
+ }, {
+ "name" : "boot",
+ "cmds" : [
+ "chmod 777 /dev/ttyAMA2",
+ "chmod 0440 /proc/interrupts",
+ "chmod 0440 /proc/stat"
+ ]
+ }
+ ]
+}
diff --git a/riscv64_virt/linux/rootfs/init.qemu.riscv64.linux.usb.cfg b/riscv64_virt/linux/rootfs/init.qemu.riscv64.linux.usb.cfg
new file mode 100755
index 0000000000000000000000000000000000000000..a6df3255922ab5f311ccb1ea1b861fdfe82e596d
--- /dev/null
+++ b/riscv64_virt/linux/rootfs/init.qemu.riscv64.linux.usb.cfg
@@ -0,0 +1,51 @@
+{
+ "jobs" : [{
+ "name" : "boot",
+ "cmds" : [
+ "mkdir /dev/usb-ffs 0770 shell shell",
+ "mkdir /dev/usb-ffs/hdc 0770 shell shell",
+ "mount configfs none /config",
+ "mkdir /config/usb_gadget/g1 0770 shell shell",
+ "write /config/usb_gadget/g1/idVendor 0x12D1",
+ "write /config/usb_gadget/g1/idProduct 0x5000",
+ "write /config/usb_gadget/g1/os_desc/use 1",
+ "write /config/usb_gadget/g1/bcdDevice 0x0223",
+ "write /config/usb_gadget/g1/bcdUSB 0x0200",
+ "mkdir /config/usb_gadget/g1/strings/0x409 0770",
+ "copy /sys/block/mmcblk0/device/cid /config/usb_gadget/g1/strings/0x409/serialnumber",
+ "write /config/usb_gadget/g1/strings/0x409/manufacturer HISILICON",
+ "write /config/usb_gadget/g1/strings/0x409/product \"HDC Device\"",
+ "mkdir /config/usb_gadget/g1/functions/ffs.hdc",
+ "mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell",
+ "mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell",
+ "write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1",
+ "write /config/usb_gadget/g1/os_desc/qw_sign MSFT100",
+ "write /config/usb_gadget/g1/configs/b.1/MaxPower 500",
+ "symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1",
+ "mount functionfs hdc /dev/usb-ffs/hdc uid=2000,gid=2000",
+ "setparam sys.usb.configfs 1",
+ "setparam sys.usb.controller 100e0000.hidwc3_0"
+ ]
+ }, {
+ "name" : "param:sys.usb.config=none && param:sys.usb.configfs=1",
+ "condition" : "sys.usb.config=none && sys.usb.configfs=1",
+ "cmds" : [
+ "write /config/usb_gadget/g1/os_desc/use 0",
+ "setparam sys.usb.ffs.ready 0"
+ ]
+ }, {
+ "name" : "param:init.svc.hdcd=stopped",
+ "condition" : "init.svc.hdcd=stopped",
+ "cmds" : [
+ "setparam sys.usb.ffs.ready 0"
+ ]
+ }, {
+ "name" : "param:sys.usb.config=hdc && param:sys.usb.configfs=1",
+ "condition" : "sys.usb.config=hdc && sys.usb.configfs=1",
+ "cmds" : [
+ "write /config/usb_gadget/g1/idProduct 0x5000",
+ "write /config/usb_gadget/g1/os_desc/use 1"
+ ]
+ }
+ ]
+}
diff --git a/riscv64_virt/linux/rootfs/qemu.riscv64.linux.updater.cfg b/riscv64_virt/linux/rootfs/qemu.riscv64.linux.updater.cfg
new file mode 100755
index 0000000000000000000000000000000000000000..746be03d19b6f36584fa017a9a3ef5f8df9ae857
--- /dev/null
+++ b/riscv64_virt/linux/rootfs/qemu.riscv64.linux.updater.cfg
@@ -0,0 +1,10 @@
+{
+ "jobs" : [
+ {
+ "name" : "init",
+ "cmds" : [
+
+ ]
+ }
+ ]
+}
diff --git a/riscv64_virt/ohos.build b/riscv64_virt/ohos.build
new file mode 100755
index 0000000000000000000000000000000000000000..8e0acadf5c7f3757ab6973b77f7ec0292bb4b8f7
--- /dev/null
+++ b/riscv64_virt/ohos.build
@@ -0,0 +1,10 @@
+{
+ "parts": {
+ "device_riscv64_virt": {
+ "module_list": [
+ "//device/qemu/riscv64_virt:riscv64_virt"
+ ]
+ }
+ },
+ "subsystem": "device_riscv64_virt"
+}