• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3#Copyright 2024 Institute of Software, Chinese Academy of Sciences.
4#Licensed under the Apache License, Version 2.0 (the "License");
5#you may not use this file except in compliance with the License.
6#You may obtain a copy of the License at
7#
8#    http://www.apache.org/licenses/LICENSE-2.0
9#
10#Unless required by applicable law or agreed to in writing, software
11#distributed under the License is distributed on an "AS IS" BASIS,
12#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13#See the License for the specific language governing permissions and
14#limitations under the License.
15
16OHOS_IMG="out/qemu-riscv64-linux/packages/phone/images"
17
18qemu-system-riscv64 \
19	-machine virt -m 2028 \
20	-smp 2 \
21	-nographic \
22	--no-reboot \
23	-kernel ${OHOS_IMG}/Image \
24	-initrd ${OHOS_IMG}/ramdisk.img \
25	-drive if=none,file=${OHOS_IMG}/updater.img,format=raw,id=updater,index=3 -device virtio-blk-device,drive=updater \
26	-drive if=none,file=${OHOS_IMG}/system.img,format=raw,id=system,index=2 -device virtio-blk-device,drive=system \
27	-drive if=none,file=${OHOS_IMG}/vendor.img,format=raw,id=vendor,index=1 -device virtio-blk-device,drive=vendor \
28	-drive if=none,file=${OHOS_IMG}/userdata.img,format=raw,id=userdata,index=0 -device virtio-blk-device,drive=userdata \
29	-append "loglevel=4 console=ttyS0,115200 init=init root=/dev/ram0 rw  ohos.boot.hardware=qemu.riscv64.linux default_boot_device=10007000.virtio_mmio sn=8823456789 ohos.required_mount.system=/dev/block/vdb@/usr@ext4@ro,barrier=1@wait,required ohos.required_mount.vendor=/dev/block/vdc@/vendor@ext4@ro,barrier=1@wait,required ohos.required_mount.data=/dev/block/vdd@/data@ext4@nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc@wait,reservedsize=104857600"
30
31