qemu-system-arm安装和基本使用

安装OpenBMC维护的qemu

x86机器,ubuntu 22 LTS

1.

git clone https://github.com/openbmc/qemu.git

git 不下来的可以试试git clone https://github.com/openbmc/qemu

2.

cd qemu

3.

git submodule update --init dtc

4.

mkdir build

5.

cd build

6.

sudo apt-get install libslirp-dev

7.

../configure --target-list=arm-softmmu --enable-slirp

出现一些问题报错在尝试下述步骤后删除qemu重复1-6:

sudo apt-get install libsdl2-2.0-0 libsdl2-dev

sudo apt-get install build-essential zlib1g-dev pkg-config libglib2.0-dev

sudo apt-get install binutils-dev libboost-all-dev autoconf libtool libssl-dev

sudo apt-get install libpixman-1-dev python3 python-pip

此处部分内容参考自:https://blog.csdn.net/nightmarezzh/article/details/123502926

8.

make

9.编译好的qemu-system-arm在arm-softmmu文件夹下,进入该文件夹后可以查看支持的相应机器

./qemu-system-arm -M help

./qemu-system-arm -machine help

10. 以master用户为例,创建软链接,让qemu-system-arm全局可用

sudo ln -s /home/master/qemu/build/arm-softmmu/qemu-system-arm /usr/bin

成功后可以直接使用 qemu-system-arm -M help,不必再在指定路径用 ./

本地启动romulus镜像

sudo qemu-system-arm -m 256 -M romulus-bmc -nographic -drive file=path,format=raw,if=mtd -net nic -net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostname=qemu

其中256是指虚拟机内存大小,romulus-bmc是指机型,nographic为无窗口运行,path是指romulus的镜像文件,raw为指定格式,mtd为执行文件类型,-net nic添加一块虚拟的网卡

具体参考:ubuntu下qemu使用:图文详解_ubuntu qemu_MasterHu88的博客-CSDN博客

登录

root

0penBmc

网页登录:https://127.0.0.1:2443/#/login

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值