添加新系统到 OpenBMC 仿真实践
添加新系统到 OpenBMC 实践
首先构建新的 romulus-prime 元文件
按照 添加新系统到 OpenBMC 文档 中介绍的 创建新系统
小节构建自己的新系统。
使用 bitbake
编译新的系统
- 在完成上面步骤后,使用如下命令先配置本次使用的环境变量:
. setup romulus-prime
- 自动跳转到
build/romulus-prime
目录下,在这个目录下编译新构建的系统:bitbake obmc-phosphor-image
- 因为缺少一些必要的配置,会报错类似如下:
ERROR: Task (/home/arv/openbmc/openbmc/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb:do_compile) failed with exit code '1' NOTE: Tasks Summary: Attempted 2433 tasks of which 2431 didn't need to be rerun and 1 failed. Summary: 1 task failed: /home/arv/openbmc/openbmc/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb:do_compile Summary: There was 1 WARNING message shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
- 因为
OpenBMC
的发展过程中,抛弃掉了一些内容,因此只需要按照 添加新系统到 OpenBMC 文档 中的构建新系统
小节的第3步进行配置:FILESEXTRAPATHS:prepend:romulus-prime := "${THISDIR}/${PN}:" SRC_URI:append:romulus = " file://romulus.cfg"
- 现在报错中有如下内容:
| make[1]: *** No rule to make target 'arch/arm/boot/dts/aspeed-bmc-opp-romulus-prime.dtb'. Stop. | make: *** [/home/arv/openbmc/openbmc/build/romulus-prime/tmp/work-shared/romulus-prime/kernel-source/Makefile:1400: aspeed-bmc-opp-romulus-prime.dtb] Error 2 | ERROR: oe_runmake failed | WARNING: exit code 1 from a shell command.
- 继续按照 添加新系统到 OpenBMC 文档 中的
构建新系统
小节的第4步进行配置,此时编译顺利完成vi ./meta-ibm/meta-romulus-prime/conf/machine/romulus-prime.conf # Replace the ${MACHINE} variable in the KERNEL_DEVICETREE # Use romulus device tree KERNEL_DEVICETREE = "${KMACHINE}-bmc-opp-romulus.dtb"
启动 QEMU
仿真
在 build/romulus-prime
目录下执行如下命令,启动 QEMU
仿真:
sudo qemu-system-arm -m 256 -M romulus-bmc -nographic -drive file=./tmp/deploy/images/romulus-prime/obmc-phosphor-image-romulus-prime.static.mtd,format=raw,if=mtd -net nic -net user,hostfwd=:192.168.0.101:2222-:22,hostfwd=:192.168.0.101:2443-:443,hostname=qemu
启动后,提示登录:
Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) nodistro.0 romulus-prime ttyS4
romulus-prime login: