1、前置条件
sudo apt install git python3-distutils gcc g++ make file wget \
gawk diffstat bzip2 cpio chrpath zstd lz4 bzip2
2、构建OpenBMC
git clone https://github.com/openbmc/openbmc.git
. setup romulus
bitbake obmc-phosphor-image
注意:这个构建通常会因为网络原因构建失败,只需要重复构建多次即可
构建之后的镜像在如下目录:tmp/deploy/images/romulus/obmc-phosphor-image-romulus.static.mtd
3、下载并启动QEMU
wget https://jenkins.openbmc.org/job/latest-qemu-x86/lastSuccessfulBuild/artifact/qemu/build/qemu-system-arm
chmod u+x qemu-system-arm
cp ./tmp/deploy/images/romulus/obmc-phosphor-image-romulus.static.mtd ./
启动QEMU并映射指定端口:
./qemu-system-arm -m 256 -M romulus-bmc -nographic \
-drive file=./obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd \
-net nic \
-net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostfwd=udp:127.0.0.1:2623-:623,hostname=qemu
22是ssh端口,443是rest端口,623是ipmi端口
4、登录QEMU
默认密码:root/0penBmc(注意第一个是零不是o)
标签:obmc,QEMU,image,romulus,构建,qemu,OpenBMC,运行 From: https://www.cnblogs.com/servlet-context/p/18368243退出QEMU:先按ctrl + a,释放后按x