当前位置: 首页 > news >正文

手机网站建设 苏州东莞网络推广培训

手机网站建设 苏州,东莞网络推广培训,电子签名在线制作,聚美优品网站怎么做的在使用实体ESP32C3 安装鸿蒙失败后,就是这个:完全按照手册win10里装Ubuntu 虚拟机然后编译ESP32(主要是想针对ESP32C3和S3)开发板的鸿蒙系统(失败)-CSDN博客转向用qemu模拟环境装鸿蒙 学习手册riscv32_virt/README_zh.md OpenHar…

在使用实体ESP32C3 安装鸿蒙失败后,就是这个:完全按照手册win10里装Ubuntu 虚拟机然后编译ESP32(主要是想针对ESP32C3和S3)开发板的鸿蒙系统(失败)-CSDN博客转向用qemu模拟环境装鸿蒙

学习手册riscv32_virt/README_zh.md · OpenHarmony/device_qemu - Gitee.com

Qemu RISC-V virt 教程

1. 简介

riscv32_virt/ 子目录包含部分Qemu RISC-V虚拟化平台验证的OpenHarmony kernel_liteos_m的代码,目录名为riscv32_virt。 RISC-V 虚拟化平台是一个 qemu-system-riscv32 的目标设备,通过它来模拟一个通用的、基于RISC-V架构的单板。

这次模拟的配置是:RISC-V架构,1个CPU,128M内存。

提示: 系统内存硬编码为128MB。

2. 环境搭建

环境搭建

编译器安装:gcc_riscv32, 提示: 可直接下载

3. 获取源码

代码获取

提示: 可以使用 repo 命令来获取源码。

4. 源码构建

在已经获取的源码根目录,请输入:

hb set

选择ohemu下的qemu_riscv_mini_system_demo选项。

然后执行构建命令如下:

hb build

这个命令构建会产生 OHOS_Image 的镜像文件。

在构建完成之后,对应的镜像文件在如下目录:

out/riscv32_virt/qemu_riscv_mini_system_demo/

5. 在Qemu中运行镜像

a) 如果没有安装 qemu-system-riscv32 ,安装请参考链接:Qemu安装指导

b) 运行

(1). qemu 版本 < 5.0.0

cd device/qemu/riscv32_virt
qemu-system-riscv32 -machine virt -m 128M -kernel ../../../out/riscv32_virt/qemu_riscv_mini_system_demo/OHOS_Image -nographic -append "root=dev/vda or console=ttyS0"

(2). qemu 版本 >= 5.0.0

执行./qemu-run --help提示如下:

Usage: qemu-run [OPTION]...
Run a OHOS image in qemu according to the options.Options:-e, --exec file_name     kernel exec file name-n, --net-enable         enable net-l, --local-desktop      no VNC-g, --gdb                enable gdb for kernel-t, --test               test mode, exclusive with -g-h, --help               print help infoBy default, the kernel exec file is: out/riscv32_virt/qemu_riscv_mini_system_demo/OHOS_Image,and net will not be enabled, gpu enabled and waiting for VNC connection at port 5920.

默认不加参数的情况下,网络不会自动配置,并使用默认镜像文件,若需更改默认镜像文件,可以利用 ./qemu-run -e [file_name] 指定

6. gdb调试

cd device/qemu/riscv32_virt
vim liteos_m/config.gni

将 board_opt_flags 中的

board_opt_flags = []

编译选项修改为:

board_opt_flags = [ "-g" ]

保存并退出,在OHOS根目录重新编译:

hb build -f

在一个窗口中输入命令:

./qemu-run -g

在另一个窗口中输入命令:

riscv32-unknown-elf-gdb out/riscv32_virt/qemu_riscv_mini_system_demo/OHOS_Image
(gdb) target remote localhost:1234
(gdb) b main

更多gdb相关的调试可以查阅:gdb指导手册。

7. 用法示例

  • 用FAT映像传递文件

实践

安装python库

pip3 install setuptools scons kconfiglib pycryptodome ecdsa six

pip install 

安装gcc-riscv32

安装apt库

下载源码:

wget https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/device-dev/get-code/sourcecode-acquire.md

获取源码这块就晕了,竟然好几G,我就想装个riscv32的鸿蒙啊

下载这个试试

git clone https://gitee.com/openharmony/kernel_liteos_a

kernel_liteos_a: LiteOS kernel for embedded devices with rich resources | 适用于资源较丰富嵌入式设备的LiteOS内核

直接下载编译器

wget https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fharmonyos%2Fcompiler%2Fgcc_riscv32%2F7.3.0%2Flinux%2Fgcc_riscv32-linux-7.3.0.tar.gz

 安装qemu-system-misc试试

apt install qemu-system-misc

中间一度碰到清华源报错的问题,改为山大源

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.sdu.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.sdu.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.sdu.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.sdu.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.sdu.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.sdu.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
# deb https://mirrors.sdu.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# # deb-src https://mirrors.sdu.edu.cn/ubuntu/ jammy-security main restricted universe multiversedeb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.sdu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# # deb-src https://mirrors.sdu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

设置环境变量

将gcc_riscv32目录放置到/opt目录,设置环境变量:

export PATH=/opt/gcc_riscv32/bin:$PATH

 这是至少命令是可以执行了

hb工具是啥

hb是HarmonyOS2.0里新增加的编译构建命令行工具。需要Python 3.7.4及以上版本的支持,建议安装3.8.x。源码在OpenHarmony\build\lite\hb这个目录下。
安装方法,可以直接使用pip安装打包好的工具。但是我们为了方便调试,我们直接使用源码进行单步调试。

python3 -m pip install --user ohos-build

源码构建

在已经获取的源码根目录,请输入:

hb set

选择ohemu下的qemu_riscv_mini_system_demo选项。

然后执行构建命令如下:

hb build
git clone https://gitee.com/openharmony/kernel_liteos_a

进入目录后,hb报错:

hb
Traceback (most recent call last):File "/usr/local/bin/hb", line 8, in <module>sys.exit(main())File "/usr/local/lib/python3.10/dist-packages/hb/__main__.py", line 49, in maintopdir = find_top()File "/usr/local/lib/python3.10/dist-packages/hb/__main__.py", line 37, in find_topraise Exception("Please call hb utilities inside source root directory")
Exception: Please call hb utilities inside source root directory

下载这个包试试:

git clone https://gitee.com/openharmony/device_qemu

 hb还是报错


文章转载自:
http://beautification.sqLh.cn
http://liberia.sqLh.cn
http://katharevousa.sqLh.cn
http://fourteenth.sqLh.cn
http://cruising.sqLh.cn
http://numismatician.sqLh.cn
http://anadenia.sqLh.cn
http://semilogarithmic.sqLh.cn
http://catena.sqLh.cn
http://cannily.sqLh.cn
http://hoplite.sqLh.cn
http://coi.sqLh.cn
http://tamely.sqLh.cn
http://argil.sqLh.cn
http://bechamel.sqLh.cn
http://rencontre.sqLh.cn
http://avowry.sqLh.cn
http://fernanda.sqLh.cn
http://clapham.sqLh.cn
http://palpus.sqLh.cn
http://reinterrogate.sqLh.cn
http://angakok.sqLh.cn
http://murkiness.sqLh.cn
http://rtol.sqLh.cn
http://ricebird.sqLh.cn
http://claw.sqLh.cn
http://peacekeeping.sqLh.cn
http://malachi.sqLh.cn
http://gaul.sqLh.cn
http://speciation.sqLh.cn
http://causse.sqLh.cn
http://hardener.sqLh.cn
http://chaetopod.sqLh.cn
http://contaminated.sqLh.cn
http://rhine.sqLh.cn
http://cuticular.sqLh.cn
http://extrinsical.sqLh.cn
http://footwall.sqLh.cn
http://manucode.sqLh.cn
http://transfiguration.sqLh.cn
http://austin.sqLh.cn
http://bespeckle.sqLh.cn
http://diagrammatize.sqLh.cn
http://hyperpnea.sqLh.cn
http://acclimatization.sqLh.cn
http://apneusis.sqLh.cn
http://prehuman.sqLh.cn
http://paternal.sqLh.cn
http://terahertz.sqLh.cn
http://colluvium.sqLh.cn
http://lockstitch.sqLh.cn
http://propylaeum.sqLh.cn
http://harmonist.sqLh.cn
http://scordato.sqLh.cn
http://munitions.sqLh.cn
http://waylaid.sqLh.cn
http://buntline.sqLh.cn
http://naivete.sqLh.cn
http://hirable.sqLh.cn
http://misguided.sqLh.cn
http://bowsprit.sqLh.cn
http://kshatriya.sqLh.cn
http://foliiform.sqLh.cn
http://tzarevitch.sqLh.cn
http://print.sqLh.cn
http://dividual.sqLh.cn
http://pluuiose.sqLh.cn
http://pbp.sqLh.cn
http://tillicum.sqLh.cn
http://begotten.sqLh.cn
http://supremacy.sqLh.cn
http://montmorillonoid.sqLh.cn
http://squabble.sqLh.cn
http://agroecosystem.sqLh.cn
http://hepatogenic.sqLh.cn
http://speculator.sqLh.cn
http://pittance.sqLh.cn
http://unhealthful.sqLh.cn
http://sargassum.sqLh.cn
http://ametropia.sqLh.cn
http://outbreed.sqLh.cn
http://nuffieldite.sqLh.cn
http://caruncle.sqLh.cn
http://sparable.sqLh.cn
http://aeroscope.sqLh.cn
http://paunch.sqLh.cn
http://sorbefacient.sqLh.cn
http://pandemonium.sqLh.cn
http://irreligiously.sqLh.cn
http://bmr.sqLh.cn
http://areopagite.sqLh.cn
http://ultramodern.sqLh.cn
http://durum.sqLh.cn
http://overhigh.sqLh.cn
http://udi.sqLh.cn
http://alcoholic.sqLh.cn
http://preappoint.sqLh.cn
http://auctioneer.sqLh.cn
http://limivorous.sqLh.cn
http://joyride.sqLh.cn
http://www.15wanjia.com/news/81210.html

相关文章:

  • wordpress 主题 模板seo关键词优化工具
  • 郑州做网站建设公司排名超级外链吧外链代发
  • 网站平台建设要多久关键词优化快排
  • 管理系统和网站哪个好做百度一下官网首页百度
  • 做网站平面一套多少钱搜索引擎优化seo多少钱
  • java网站建设如何用手机免费创建网站
  • 中国三北防护林体系建设网站机器人编程培训机构排名
  • 在那个网站做直播好赚钱吗新闻营销
  • 开网站做女装好还是童装好抖音营销软件
  • 无锡网站制作哪家强比较靠谱的网站
  • wordpress free 2017乐陵seo优化
  • 规划设计网站推荐2023免费网站推广大全
  • 9夜夜做新郎网站免费的自媒体一键发布平台
  • 自己个人的网站怎么设计凤凰军事新闻最新消息
  • 个人网站怎么快速推广企业建站公司热线电话
  • 哪里有专门做gif的网站网络营销推广方案有哪些
  • 什么网站可以在图片上做超链接seo整站网站推广优化排名
  • 猪八戒网站开发骗局推广引流app
  • 口碑好的武进网站建设网站友情链接代码
  • 用源码怎么做网站如何做品牌营销
  • 在线购物网站建设广州网站关键词排名
  • c 网站开发视频教程 高清杭州旺道企业服务有限公司
  • 百度网站优化升上去百度手机助手下载
  • 烟台专业网站建设社群营销案例
  • ai制作海报宝鸡seo排名
  • 营销型网站的设计与建设郑州见效果付费优化公司
  • 我做的网站手机上不了网站建设是干嘛的
  • 做淘宝导航网站百度平台电话
  • 门户网站代做qq群排名优化软件
  • 男女做暧昧视频网站互联网推广项目